Skip to main content
PUT
/
organisations
/
{orgId}
/
workspaces
/
{workspaceId}
/
opportunities
/
{opportunityId}
Update opportunity
curl --request PUT \
  --url https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/opportunities/{opportunityId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "read": false,
  "status": "New",
  "title": "Improve Customer Onboarding Experience",
  "description": "Streamline the initial user setup process to reduce drop-offs",
  "solutionsGeneratingState": "initial",
  "createdBy": "user",
  "ownerId": "d4e71c2b-a498-42af-b7f5-69de06a0d7c4",
  "insightIds": [
    "<string>"
  ],
  "outcomeIds": [
    "<string>"
  ],
  "solutionIds": [
    "<string>"
  ],
  "topicIds": [
    "<string>"
  ]
}
'
{
  "data": {
    "id": "f5d8df32-60b4-417a-8b83-8d4dcb4e88e1",
    "read": false,
    "status": "New",
    "title": "Improve Customer Onboarding Experience",
    "description": "Streamline the initial user setup process to reduce drop-offs",
    "solutionsGeneratingState": "initial",
    "createdBy": "user",
    "hideContent": false,
    "createdAt": "2023-01-01T00:00:00.000Z",
    "updatedAt": "2023-01-01T00:00:00.000Z",
    "hasUnseenInsights": false,
    "solutions": [],
    "insights": [],
    "outcomes": [],
    "topics": [],
    "ownerId": "d4e71c2b-a498-42af-b7f5-69de06a0d7c4"
  }
}

Authorizations

Authorization
string
header
required

JWT authentication for organization-scoped endpoints.

Authorization
string
header
required

API key authentication for public API endpoints. This key is scoped by workspace so a unique key is required per workspace within an organisation.

Path Parameters

orgId
string
required

Organization ID

workspaceId
string
required

Workspace ID

opportunityId
string
required

Opportunity ID

Body

application/json

Request schema for updating an opportunity

read
boolean

Whether the opportunity has been read

Example:

false

status
enum<string>

Current status of the opportunity

Available options:
New,
Solved,
Planned,
InProgress
Example:

"New"

title
string

Title of the opportunity

Example:

"Improve Customer Onboarding Experience"

description
string

Description of the opportunity

Example:

"Streamline the initial user setup process to reduce drop-offs"

solutionsGeneratingState
enum<string>

Current state of solution generation

Available options:
generating,
generated,
initial,
error
Example:

"initial"

createdBy
enum<string>

How the opportunity was created

Available options:
user,
generated
Example:

"user"

ownerId
string

ID of the opportunity owner

Example:

"d4e71c2b-a498-42af-b7f5-69de06a0d7c4"

insightIds
string[]
outcomeIds
string[]
solutionIds
string[]
topicIds
string[]

Response

Opportunity updated successfully

Response containing a single opportunity

data
object
required

Opportunity data