VocalDocscontracts 1.65.0

Create a Contact

POST /v1/contacts

PropertyValue
Operationcreate_contact
GroupContacts
Scopecontacts:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited contacts.contact.create (mutation)
Released in1.61.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Creates a Contact at revision 1 (1.61.0) and writes contact.created; the answer carries no profile. An external id or an app_user identity another Contact holds is 409 contact_match_conflict, one detail per candidate naming its contact_id; an app_user identity is capability_not_available (app_user_identity_not_available); every other issue is a detail of validation_failed (ContactIssueCode).

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 POST "$VOCAL_API/v1/contacts" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: ContactCreateRequest.

FieldTypeRequiredDescription
attributesContactAttributesno
display_namestringno
external_idsarray of ExternalIdInputno
identitiesarray of ContactIdentityInputno
languageLanguageTagnoRecorded with the source declared.
timezoneIanaZonenoRecorded with the source declared.

Responses

StatusContent typeShapeError codes
201application/jsonContact
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
409application/jsonErrorEnvelopeidempotency_in_progress, idempotency_key_reused, contact_match_conflict
422application/jsonErrorEnvelopevalidation_failed, capability_not_available
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 201 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