Skip to main content
ContactsVersion: v3New

Update Contact

PUT/contacts/{contactId}

Update a contact using contactId

Conditional updates are not supported: If-Match is ignored, so the update is applied even if the contact changed after you read it. Do not use the response ETag for concurrency control. If a request times out, get the contact again before you retry.

Update is a partial update. Only the fields you send change. Fields you leave out keep their current values.

  • To remove a value, send null. This works for firstName, lastName, email, phone, address1, city, state, postalCode, country, website, timezone, dateOfBirth, assignedTo and source. To remove the name, send firstName and lastName as null; name: null leaves the name unchanged. An empty string does not remove a value. Depending on the field, it is ignored or rejected with 422.
  • tags replaces all of the contact's tags. Send [] or null to remove every tag.
  • additionalEmails and additionalPhones replace the stored lists. Send [] or null to empty them.
  • In customFields, only the custom fields you list change. To clear one, send it with value set to null or an empty string.
  • dndSettings changes only the channels you send. dndSettings: null is rejected with 400.
  • If the contact has no country and the request does not set one, the location's country is saved on the contact, or the agency's country if the location has none.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:contacts.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version. Send v3.

Available optionsv3
Example:v3

Path Parameters

contactIdstringrequired

Unique identifier of the contact

Example:ve9EPM428h8vShlRW1KT

Body

firstNamestringnullable

First name of the contact

Example:rosan
lastNamestringnullable

Last name of the contact

Example:Deo
namestringnullable

Full name of the contact

Example:rosan Deo
emailstringnullable

Email address of the contact

phonestringnullable

Phone number of the contact.

Phone numbers in phone and additionalPhones are saved in E.164 format, for example +14155550123. Send E.164 when you can. A number without a country code is read as a number in the country you send. If you do not send country, the contact's saved country is used on update, then the location's country, then US. Spaces, dashes and brackets are removed.

Example:+14155550123
address1stringnullable

Street address of the contact

Example:3535 1st St N
citystringnullable

City of the contact

Example:Dolomite
statestringnullable

State of the contact

Example:AL
postalCodestringnullable

Postal code of the contact. A number is saved as a string. On update, send null to remove it. An empty string leaves it unchanged.

Example:35061
websitestringnullable

Website URL of the contact

Example:https://www.tesla.com
timezonestringnullable

Timezone of the contact

Example:America/Chihuahua
dndboolean

Global Do Not Disturb switch for all channels; true blocks every channel irrespective of current dndSettings, and it does not add or change any dndSettings entry

Example:true
inboundDndSettingsobject

Do Not Disturb for inbound communication from the contact, independent of dnd and dndSettings; only the all key is accepted, with status active or inactive, and any other key is rejected with 422

Example
{
  "all": {
    "status": "active",
    "message": "Do not contact me"
  }
}
tagsstring[]

Replaces all of the contact's tags with this list. Tags that are not in the list are removed from the contact, and an empty array removes every tag. Leave this field out to keep the current tags. Tag names are saved in lowercase, and a tag that does not exist in the location yet is created.

To add or remove tags without replacing the others, use Add Tags (POST /contacts/{contactId}/tags) or Remove Tags (DELETE /contacts/{contactId}/tags).

Example:["nisi sint commodo amet","consequat"]
customFieldsobject[]

List of custom field values to assign to the contact

Example
[
  {
    "id": "6dvNaf7VhkQ9snc5vnjJ",
    "key": "my_custom_field",
    "fieldValue": "My Text"
  }
]
sourcestringnullable

Source from which the contact was updated

Example:public api
dateOfBirthstringnullable

The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY

Example:1990-09-25
genderstringdeprecated

Gender of the contact. Before v4, Create, Update and Upsert accept it, and the contact returned by Get, lookup, duplicate search and the write responses includes it; Search results do not. Deprecated: from v4 on it is neither accepted nor returned, so store gender in a contact custom field instead.

Example:male
typestring

Contact type. One of the options of the location's Contact Type field (lead and customer by default), matched by option value or option name, ignoring case. A value that matches no option does not change the contact's type.

Example:lead
countrystringnullable

Country of the contact, as an ISO 3166-1 alpha-2 code, for example US or GB. The code is not case-sensitive, and the English country name (or UK) is also accepted. Either way, the upper-case code is saved. A value that is not recognised is ignored and the current country is kept. An empty string is rejected with 422. A phone number sent without a country code is read as a number in this country. Send null to remove it. If the contact has no country and the request does not set one, the location's country is saved, or the agency's country if the location has none.

Example:US
assignedTostringnullable

User's Id

Example:y0BeYjuRIlDwsDcOHOJo
additionalEmailsobject[]

⚠️ Always send the primary together with the additionals (email with additionalEmails).

Array of { email }, maximum 10. email stays the contact's primary email. Additional values are extra addresses on the same contact.

If the location has uniqueness check enabled on email and any email you send (primary or additional) already belongs to another contact, the request fails with BadRequest (400) and nothing is saved.

Possible values: <= 10

Example
[
  {
    "email": "[email protected]"
  }
]
additionalPhonesobject[]

⚠️ Always send the primary together with the additionals (phone with additionalPhones).

Array of { phone, phoneLabel? }, maximum 10. phoneLabel is one of Home, Work, Mobile, Landline. phone stays the contact's primary phone. Additional values are extra numbers on the same contact.

If the location has uniqueness check enabled on phone and any phone number you send (primary or additional) already belongs to another contact, the request fails with BadRequest (400) and nothing is saved.

Possible values: <= 10

Example
[
  {
    "phone": "+18832327657",
    "phoneLabel": "Mobile"
  }
]
dndSettingsobject

Per-channel DND settings, independent of the global dnd switch; channel keys are call, email, sms, whatsApp, gmb and fb on this Version, and capitalised keys such as Email are rejected with 422.

Channels you leave out keep their current status. The permanent status is normally set by the platform, for example after an SMS opt-out. Through this API:

  • Create Contact, and Upsert when it creates a contact, reject permanent on any channel with 401.
  • Update Contact, and Upsert when it updates a contact, can set email to permanent and can change a permanent email back to active or inactive.
  • Changing sms or whatsApp to or from permanent returns 401. Changing call, gmb or fb to or from permanent returns 400.
  • Sending permanent for a channel that is already permanent is accepted. The status stays permanent, and the message and code of the channel are replaced with the values you send.
Example
{
  "call": {
    "status": "active",
    "message": "Do not call"
  },
  "email": {
    "status": "inactive"
  }
}

Response

Successful response

succeededbooleanrequired

Whether the update operation succeeded

Example:true
contactobjectrequired

Contact details