Skip to content

CRM lists, scoring and tasks

The CRM’s contacts, companies and opportunities have their own pages in the API reference. This page covers what works across many contacts at once, and the records kept beside them.

GET /api/v1/contacts and GET /api/v1/contacts/page narrow contacts by any of these, all of which must hold:

Parameter Takes contacts who
search match these words at the start of their name, email or phone
stage, source, ownerId are at one of these stages, came from one of these sources, or belong to one of these members
tag, tagMode have any of these tags, or all of them with tagMode: "all"
excludeTag have none of these tags
fields have one of these options picked in a dropdown field, by key
conditions meet every custom field condition: is, is_not, contains, set, not_set, and gt or lt for numbers, money (in minor units) and dates
scoreMin, scoreMax have a lead score in this range
activeWithinDays, inactiveForDays, createdWithinDays had something happen recently, or haven’t for a while, or were added recently
listId are in this list

A smart list keeps a filter and holds whoever matches it whenever it’s read, so it never needs updating. A static list holds the contacts added to it. Make one with POST /api/v1/lists, read who’s in it with GET /api/v1/contacts and listId, and fill a static list with POST /api/v1/lists/{id}/contacts, up to 1,000 contacts a call. A smart list can’t name another list.

POST /api/v1/lists
{
"name": "Big wholesale accounts",
"kind": "smart",
"filter": {
"tag": ["wholesale"],
"conditions": [{ "key": "monthly_volume", "op": "gt", "value": 10 }]
}
}

A newsletter post (Newsletter, POST /api/v1/newsletter/posts) takes lists as its audience (audience.lists), smart or static, alongside its tags and stages.

Each contact has a score: the points the scoring rules give them. PUT /api/v1/scoring-rules sets every rule at once, in order, and rescores every contact.

kind Gives its points
tag while they have config.tag
field while their custom field config.key equals config.value (a multi-select when it has that option)
inactive once nothing has happened with them for config.days
opened, clicked, booked, paid each time they open an email, click a newsletter link, book, or pay an order or invoice
page_visited each time they visit a page on a Digize site whose path starts with config.path

Negative points take points away, such as -20 for 30 days without activity. A rule that counts each time stops at maxPoints. Scores change in the same transaction as what changed them; inactivity is checked by a timer, so it can take a few minutes to show.

Operation Does
POST /api/v1/contacts/bulk/tags adds add and takes off remove tags on up to 1,000 contacts, in one transaction
POST /api/v1/contacts/bulk/owner gives up to 1,000 contacts to a member, or to nobody
POST /api/v1/contacts/bulk/delete deletes up to 1,000 contacts
POST /api/v1/contacts/bulk/message texts or emails up to 100 contacts, each in their own conversation, with {{first_name}} and the other variables filled in; who can’t get it is skipped with the reason

Each tag that goes on or comes off starts the automations that wait for it, as it does one contact at a time.

Notes are records of their own: list them with GET /api/v1/contacts/{contactId}/notes, add one with POST /api/v1/contacts/{id}/notes, and change, pin or delete one with PATCH /api/v1/contact-notes/{id}, POST /api/v1/contact-notes/{id}/pin and DELETE /api/v1/contact-notes/{id}. Each is on the contact’s timeline too. A member can change their own notes; an API key, an owner or an admin can change any.

A file goes to a contact in three steps: POST /api/v1/contacts/{contactId}/files/uploads answers with an uploadUrl and a key; PUT the file’s bytes to the URL within half an hour, with no API key; then POST /api/v1/contacts/{contactId}/files with the key keeps it on the contact. Files are up to 25 MB. GET /api/v1/contacts/{contactId}/files answers with links that work for an hour.

Tasks are things for a member to do, maybe by a time, about a contact, company or opportunity: POST /api/v1/tasks, GET /api/v1/tasks, POST /api/v1/tasks/{id}/complete. When a task’s dueAt comes, its owner is notified and automations waiting for a task to come due start.

GET /api/v1/contacts/duplicates answers with pairs of contacts that look like the same person (the same email, the same phone, or the same name at the same company), the one added first in each pair, up to 200. Merge a pair with POST /api/v1/contacts/{id}/merge.

Send lines with POST /api/v1/opportunities or PATCH /api/v1/opportunities/{id}, each a commerce product (productId or variantId, priced from the store unless you give unitPrice) or free text with a unitPrice, and a quantity. While an opportunity has lines, its value is their total. Winning or losing one with POST /api/v1/opportunities/{id}/status or POST /api/v1/opportunities/{id}/move takes a reason; the usual ones are in CRM settings.