Skip to content

Save pipelines and stages

PUT
/api/v1/pipelines
curl --request PUT \
--url https://digize.com/api/v1/pipelines \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "pipelines": [ { "id": "example", "name": "example", "stages": [ { "id": "example", "name": "example", "probability": 1, "kind": "open" } ] } ] }'

Saves every pipeline and its stages in order. Pipelines and stages without an id are added; ones left out are deleted, which they can only be once they hold no opportunities.

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
pipelines
required
Array<object>
<= 20 items
object
id
string
>= 1 characters <= 64 characters
name
required
string
>= 1 characters <= 60 characters
stages
required
Array<object>
>= 1 items <= 20 items
object
id
string
>= 1 characters <= 64 characters
name
required
string
>= 1 characters <= 40 characters
probability
required
integer
<= 100
kind
required
string
Allowed values: open won lost

Done

Media typeapplication/json
Array<object>
object
id
required
string
name
required
string
stages
required
Array<object>
object
id
required
string
name
required
string
probability
required

How likely an opportunity in it is to be won, from 0 to 100.

number
kind
required

Moving an opportunity to a won or lost stage closes it.

string
Allowed values: open won lost

Example

[
{
"stages": [
{
"kind": "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"
}
}