Skip to content

Update an opportunity

PATCH
/api/v1/opportunities/{id}
curl --request PATCH \
--url https://digize.com/api/v1/opportunities/example \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "name": "example", "pipelineId": "example", "stageId": "example", "status": "open", "value": 1, "contactId": "example", "companyId": "example", "ownerId": "example", "source": "example", "expectedClose": "example", "notes": "example", "lostReason": "example" }'

Changes an opportunity’s name, value, contact, company, owner, source, close date or notes. A new stage moves it there, last in that stage.

Needs the crm:write permission.

id
required
string
>= 1 characters <= 64 characters
Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
name
string
<= 120 characters
pipelineId
string
>= 1 characters <= 64 characters
stageId
string
>= 1 characters <= 64 characters
status
string
Allowed values: open won lost abandoned
value

In the workspace currency’s minor unit: 150000 is $1,500.00.

integer
<= 9007199254740991
contactId
Any of:
string
>= 1 characters <= 64 characters
companyId
Any of:
string
>= 1 characters <= 64 characters
ownerId
Any of:
string
>= 1 characters <= 64 characters
source
string
<= 60 characters
expectedClose
Any of:
string
<= 10 characters
notes
string
<= 5000 characters
lostReason
Any of:
string
<= 200 characters

Done

Media typeapplication/json
object
id
required
string
name
required
string
pipelineId
required
string
stageId
required
string
status
required
string
Allowed values: open won lost abandoned
value
required

In the workspace currency’s minor unit.

number
contact
required
Any of:
object
id
required
string
name
required
string
email
required
string | null
company
required
Any of:
object
id
required
string
name
required
string
ownerId
required
string | null
source
required
string
expectedClose
required

A day on the workspace’s calendar, such as 2026-11-14.

string | null
notes
required
string
lostReason
required
string | null
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
activity
required
Array<object>
object
id
required
string
label
required
string
detail
required
string | null
at
required
string format: date-time

Example

{
"status": "open"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}