VocalDocscontracts 1.65.0

Update a Contact

PATCH /v1/contacts/{contact_id}

PropertyValue
Operationupdate_contact
GroupContacts
Scopecontacts:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited contacts.contact.update (mutation)
Released in1.61.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Changes an active Contact at the revision If-Match names (1.61.0), checked as a create is; the answer carries no profile. A merged or deleted Contact is 409 contact_not_active.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the contacts:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X PATCH "$VOCAL_API/v1/contacts/ctc_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"' \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
contact_idpathContactIdyesThe id of a Contact: ctc_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Request body

Content type application/json, required: ContactUpdateRequest.

FieldTypeRequiredDescription
attributesContactAttributesnoReplaces every attribute.
display_namestring or nullno
external_idsarray of ExternalIdInputnoReplaces every external id.
identitiesarray of ContactIdentityInputnoReplaces every identity.
languageLanguageTag or nullno
timezoneIanaZone or nullno

Responses

StatusContent typeShapeError codes
200application/jsonContact
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopecontact_not_active, contact_match_conflict
412application/jsonErrorEnveloperevision_mismatch
422application/jsonErrorEnvelopevalidation_failed, capability_not_available
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is Contact.

FieldTypeRequiredDescription
consentContactConsentSummaryyes
created_atTimestampyes
delete_afterTimestamp or nullyesWhen a deleted Contact is purged; null otherwise.
environmentEnvironmentyes
idContactIdyes
last_activity_atTimestamp or nullyesThe last Call, message or API write, from which contact_inactivity_days counts.
merged_into_idContactId or nullyesThe survivor of a merged one.
object"contact"yes
profileContactProfile or nullyesThe content; null unless the read names include=profile.
revisionintegeryes
sourceContactSourceyes
statusContactStatusyes
updated_atTimestampyes