Skip to content

Make a contact list

POST
/api/v1/lists
curl --request POST \
--url https://digize.com/api/v1/lists \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "id": "example", "name": "example", "description": "example", "kind": "smart", "filter": { "search": "example", "stage": [ "lead" ], "source": [ "checkout" ], "ownerId": [ "example" ], "tag": [ "example" ], "tagMode": "any", "excludeTag": [ "example" ], "companyId": "example", "fields": { "additionalProperty": [ "example" ] }, "conditions": [ { "key": "example", "op": "is", "value": "example" } ], "scoreMin": 1, "scoreMax": 1, "activeWithinDays": 1, "inactiveForDays": 1, "createdWithinDays": 1, "newsletter": [ { "kind": "status", "in": [ "pending" ] } ] } }'

Makes a smart list, which holds whoever matches its filter whenever it’s read, or a static list, which holds the contacts added to it.

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
id
string
>= 1 characters <= 64 characters
name
required
string
>= 1 characters <= 80 characters
description
string
<= 300 characters
kind
required
string
Allowed values: smart static
filter
Any of:

Which contacts it takes: the same filters as crm.contacts.list, all of which must hold.

object
search
string
<= 200 characters
stage
Array<string>
Allowed values: lead customer repeat
source
Array<string>
Allowed values: checkout form booking import manual message google_ads google_local_services lead_ad
ownerId
Array<string>
<= 50 items
tag
Array<string>
<= 50 items
tagMode

Whether a contact needs any of the tags (the default) or all of them.

string
Allowed values: any all
excludeTag

Leaves out contacts with any of these tags.

Array<string>
<= 50 items
companyId
string
>= 1 characters <= 64 characters
fields

Dropdown fields’ options to match, by field key.

object
key
additional properties
Array<string>
conditions

Custom field conditions, all of which must hold. gt and lt compare numbers, money (in minor units) and dates.

Array<object>
<= 20 items
object
key
required

A contact custom field’s key.

string
<= 40 characters
op
required
string
Allowed values: is is_not contains set not_set gt lt
value
Any of:
string
<= 200 characters
scoreMin

Lead score at least this.

integer
>= -9007199254740991 <= 9007199254740991
scoreMax

Lead score at most this.

integer
>= -9007199254740991 <= 9007199254740991
activeWithinDays

Something happened with them in the last this many days.

integer
>= 1 <= 3650
inactiveForDays

Nothing has happened with them for at least this many days.

integer
>= 1 <= 3650
createdWithinDays
integer
>= 1 <= 3650
newsletter

Newsletter conditions, all of which must hold: subscription state, engagement stars, opened or clicked lately, signup source, form, UTM tag, country.

Array
<= 20 items
One of:
object
kind
required
string
Allowed value: status
in
required

Their subscription is in one of these states; none for contacts never on the list.

Array<string>
>= 1 items <= 4 items
Allowed values: pending subscribed unsubscribed none

Done

Media typeapplication/json
object
id
required
string
name
required
string
description
required
string
kind
required

Smart: whoever matches its filter now; static: the contacts added to it.

string
Allowed values: smart static
filter
required
Any of:
object
search
string
<= 200 characters
stage
Array<string>
Allowed values: lead customer repeat
source
Array<string>
Allowed values: checkout form booking import manual message google_ads google_local_services lead_ad
ownerId
Array<string>
<= 50 items
tag
Array<string>
<= 50 items
tagMode

Whether a contact needs any of the tags (the default) or all of them.

string
Allowed values: any all
excludeTag

Leaves out contacts with any of these tags.

Array<string>
<= 50 items
companyId
string
>= 1 characters <= 64 characters
fields

Dropdown fields’ options to match, by field key.

object
key
additional properties
Array<string>
conditions

Custom field conditions, all of which must hold. gt and lt compare numbers, money (in minor units) and dates.

Array<object>
<= 20 items
object
key
required

A contact custom field’s key.

string
<= 40 characters
op
required
string
Allowed values: is is_not contains set not_set gt lt
value
Any of:
string
<= 200 characters
scoreMin

Lead score at least this.

integer
>= -9007199254740991 <= 9007199254740991
scoreMax

Lead score at most this.

integer
>= -9007199254740991 <= 9007199254740991
activeWithinDays

Something happened with them in the last this many days.

integer
>= 1 <= 3650
inactiveForDays

Nothing has happened with them for at least this many days.

integer
>= 1 <= 3650
createdWithinDays
integer
>= 1 <= 3650
listId

Only the contacts in this list.

string
>= 1 characters <= 64 characters
newsletter

Newsletter conditions, all of which must hold: subscription state, engagement stars, opened or clicked lately, signup source, form, UTM tag, country.

Array
<= 20 items
One of:
object
kind
required
string
Allowed value: status
in
required

Their subscription is in one of these states; none for contacts never on the list.

Array<string>
>= 1 items <= 4 items
Allowed values: pending subscribed unsubscribed none
contacts
required

How many contacts it holds now.

number
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"kind": "smart",
"filter": {
"stage": [
"lead"
],
"source": [
"checkout"
],
"tagMode": "any",
"conditions": [
{
"op": "is"
}
],
"newsletter": [
{
"kind": "status",
"in": [
"pending"
]
}
]
}
}

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