Skip to main content
PATCH
/
opportunities
/
{id}
Update an opportunity
curl --request PATCH \
  --url https://api.gospott.com/opportunities/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "companyId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "stageId": "<string>",
  "ownerId": "<string>",
  "closeDate": {
    "target": "2023-11-07T05:31:56Z"
  },
  "clientTeam": [
    {
      "id": "<string>"
    }
  ]
}
'
{
  "status": 0,
  "message": "<string>",
  "requestId": "<string>"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get your API key from Settings → API Keys in your Spott dashboard.

Path Parameters

id
string
required

Body

application/json
companyId
string

The ID of the company this opportunity belongs to

Minimum string length: 1
name
string

The name of the opportunity

Minimum string length: 1
description
string | null

Detailed description of the opportunity

stageId
string

The pipeline stage ID

Minimum string length: 1
ownerId
string | null

The user ID of the opportunity owner. Set to null to remove the owner.

Minimum string length: 1
closeDate
object

The target close date. Set to null to clear the close date.

clientTeam
object[]

Client contacts to associate with this opportunity

Response

Opportunity updated successfully