Contacts

List contacts

Returns one page of the people in your CRM, sorted by name unless `sortBy` says otherwise. Archived contacts are left out by default. Query parameters: - `search`: matches the name, email or phone ignoring case, or the contact number when the term is a whole number. - `page`: page number, starting at 1. Defaults to 1. - `limit`: contacts per page, 1 to 200. Defaults to 50. - `sortBy`: `name` (default), `createdAt` or `lastActivityAt`. - `sortDirection`: `asc` or `desc`. Defaults to `asc`, and to `desc` when sorting by `lastActivityAt`. - `includeArchived`: `true` adds archived contacts to the list. - `archivedOnly`: `true` returns only archived contacts. Wins over `includeArchived`. - `createdFrom`, `createdTo`: ISO 8601 date-times. Only contacts created within the range, both ends included. - `chainRecordId`: a record assigned to you through your chain. Lists the contacts of the chain company that owns it instead of your own. - `chainScope`: what kind of record `chainRecordId` is: `Deal` (default), `Contact`, `Company` or `Order`.

GET
/crm/contacts

Returns one page of the people in your CRM, sorted by name unless sortBy says otherwise. Archived contacts are left out by default.

Query parameters:

  • search: matches the name, email or phone ignoring case, or the contact number when the term is a whole number.
  • page: page number, starting at 1. Defaults to 1.
  • limit: contacts per page, 1 to 200. Defaults to 50.
  • sortBy: name (default), createdAt or lastActivityAt.
  • sortDirection: asc or desc. Defaults to asc, and to desc when sorting by lastActivityAt.
  • includeArchived: true adds archived contacts to the list.
  • archivedOnly: true returns only archived contacts. Wins over includeArchived.
  • createdFrom, createdTo: ISO 8601 date-times. Only contacts created within the range, both ends included.
  • chainRecordId: a record assigned to you through your chain. Lists the contacts of the chain company that owns it instead of your own.
  • chainScope: what kind of record chainRecordId is: Deal (default), Contact, Company or Order.

Authorization

x-api-key
x-api-key<token>

Company API key, created under Settings > API Keys.

In: header

Query Parameters

page?number
Range1 <= value
limit?number
Range1 <= value <= 200
search?string
sortBy?unknown

lastActivityAt (FR-B3) sorts by the record's most-recent timeline entry.

Value in

  • "createdAt"
  • "lastActivityAt"
  • "name"
sortDirection?unknown

Value in

  • "asc"
  • "desc"
includeArchived?boolean

Include archived contacts in the list (default false — archived are hidden).

archivedOnly?boolean

Show only archived contacts (takes precedence over includeArchived).

chainRecordId?string

Scope the list to the owning tenant of this assigned chain record instead of the caller's own book.

Match^[0-9a-fA-F]{24}$
chainScope?unknown

The entity scope of chainRecordId (defaults to Deal).

Value in

  • "Company"
  • "Contact"
  • "Deal"
  • "Order"
createdFrom?string

ISO instant; records created before it are excluded.

Formatdate-time
createdTo?string

ISO instant; records created after it are excluded.

Formatdate-time

Header Parameters

x-company-id?string

Optional with an API key or OAuth token: leave it out and the company the key or token belongs to is used. If sent, it must be that same company, otherwise the request is refused with 403 API_KEY_WRONG_COMPANY or OAUTH_WRONG_COMPANY.

Match^[0-9a-fA-F]{24}$

Response Body

application/json

curl -X GET "https://example.com/crm/contacts"
{  "data": [    {      "archivedAt": "2019-08-24T14:15:22Z",      "attribution": {        "firstTouch": {          "capturedAt": "string",          "fbclid": "string",          "gclid": "string",          "landingPage": "string",          "msclkid": "string",          "referrer": "string",          "ttclid": "string",          "utmCampaign": "string",          "utmContent": "string",          "utmMedium": "string",          "utmSource": "string",          "utmTerm": "string"        },        "lastTouch": {          "capturedAt": "string",          "fbclid": "string",          "gclid": "string",          "landingPage": "string",          "msclkid": "string",          "referrer": "string",          "ttclid": "string",          "utmCampaign": "string",          "utmContent": "string",          "utmMedium": "string",          "utmSource": "string",          "utmTerm": "string"        }      },      "company": {        "id": "string",        "name": "string"      },      "companyId": "string",      "companyName": "string",      "createdAt": "2019-08-24T14:15:22Z",      "customFields": [        {          "fieldId": "string",          "iconName": "string",          "key": "string",          "label": "string",          "options": [            {              "colorHex": "string",              "id": "string",              "label": "string",              "order": 0            }          ],          "type": "Checkbox",          "values": [            "string"          ]        }      ],      "email": "string",      "hasPossibleDuplicate": true,      "id": "string",      "isPrimary": true,      "itxCustomerId": "string",      "itxLastSyncError": "string",      "itxLastSyncedAt": "2019-08-24T14:15:22Z",      "language": "da",      "lastActivityAt": "2019-08-24T14:15:22Z",      "name": "string",      "normalizedEmail": "string",      "normalizedPhone": "string",      "number": 0,      "organizationId": "string",      "owner": {        "avatarRef": "string",        "companyUserId": "string",        "name": "string"      },      "phone": "string",      "role": "string",      "sharedViaChain": true,      "sharedViaChainName": "string",      "tags": [        {          "colorHex": "string",          "label": "string",          "optionId": "string"        }      ],      "timeZone": "string",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "limit": 0,  "page": 0,  "total": 0,  "totalPages": 0}