Contacts

Update a contact

Changes the contact. Only the fields you send change. A new email or phone another contact already has returns `outcome` `duplicate` and saves nothing, unless you send `force: true`.

PATCH
/crm/contacts/{contactId}

Changes the contact. Only the fields you send change. A new email or phone another contact already has returns outcome duplicate and saves nothing, unless you send force: true.

Authorization

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

Company API key, created under Settings > API Keys.

In: header

Path Parameters

contactId*string

The contact id.

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

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/crm/contacts/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "matches": [    {      "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"        }      },      "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",      "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",      "phone": "string",      "role": "string",      "sharedViaChain": true,      "sharedViaChainName": "string",      "tags": [        {          "colorHex": "string",          "label": "string",          "optionId": "string"        }      ],      "timeZone": "string",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "outcome": "duplicate",  "reason": "email"}