Skip to content

Add an opportunity

POST
/api/v1/opportunities
curl --request POST \
--url https://digize.com/api/v1/opportunities \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "name": "Northloop wholesale order", "pipelineId": "pl_01JF3Z9A2B4C6D8E0F1G3H5J7K", "stageId": "stg_01JF3Z9A2B4C6D8E0F1G3H5J7M", "value": 150000, "contactId": "ct_01JF3Z8Q4R6M2W9T5V7X1Y3B4C" }'

Adds an opportunity to a stage of a pipeline, first in that stage. A won or lost stage closes it as it’s added.

Needs the crm:write permission.

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
required
string
>= 1 characters <= 120 characters
pipelineId
required
string
>= 1 characters <= 64 characters
stageId
required
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
id
string
>= 1 characters <= 64 characters

Example

{
"name": "Northloop wholesale order",
"pipelineId": "pl_01JF3Z9A2B4C6D8E0F1G3H5J7K",
"stageId": "stg_01JF3Z9A2B4C6D8E0F1G3H5J7M",
"value": 150000,
"contactId": "ct_01JF3Z8Q4R6M2W9T5V7X1Y3B4C"
}

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"
}
}