Pular para o conteúdo

POST /v1/contacts

POST
/v1/contacts
curl --request POST \
--url https://seu-endereco-da-api/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "phoneNumber": "example", "email": "example", "provider": "whatsapp_gateway", "attributes": {}, "originId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "adReferral": { "sourceId": "example", "sourceType": "example", "sourceApp": "facebook", "sourceUrl": "example", "headline": "example", "fbclid": "example", "utmSource": "example", "utmMedium": "example", "utmCampaign": "example", "utmContent": "example", "utmTerm": "example", "receivedAt": "example" } }'

Permissão que a Chave de acesso precisa: Criar contato (contacts:create).

Media typeapplication/json
object
name
required
string
>= 1 characters
phoneNumber
string
nullable
email
string
nullable <= 254 characters
provider
string
Allowed values: whatsapp_gateway whatsapp_waba instagram messenger
attributes
object
key
additional properties
any
originId
string format: uuid
nullable
adReferral
object
sourceId
required
string
>= 1 characters <= 120 characters
sourceType
string
<= 60 characters
sourceApp
string
Allowed values: facebook instagram
sourceUrl
string
<= 2048 characters
headline
string
<= 255 characters
fbclid
string
<= 500 characters
utmSource
string
<= 255 characters
utmMedium
string
<= 255 characters
utmCampaign
string
<= 255 characters
utmContent
string
<= 255 characters
utmTerm
string
<= 255 characters
receivedAt
string
Media typeapplication/json
object
id
required
string
aiFilledFields

Present on the detail: the fields the AI filled, each with what it did and whether it can be undone.

Array<object>
object
fieldsUpdatedAt

Present on the detail: field key to the ISO instant it last changed, read from the value history; a field the caller cannot see is left out.

object
canEdit
required

The caller may edit this contact: one of their conversations or deals, a contact they created with no conversation, or contacts:update_all

boolean
name
required
string
phoneNumber
required
string
email
required

Masked to the domain for readers without contacts:read_phone

string
nullable
provider
required
string
attributes
required
object
key
additional properties
any
hiddenAttributes
required

Keys of protected fields the contact has filled in; the value only comes from the reveal route

Array<string>
optedOut
required

True when the contact must not receive campaigns, sequences or automations

boolean
optedOutAt
required
string format: date-time
nullable
anonymizedAt
required

Quando os dados pessoais deste contato foram apagados a pedido; o historico segue existindo

string format: date-time
nullable
blocked
required

Set while the contact is blocked; inbound is stored silently and nothing is sent

object
at
required
string format: date-time
reason
required
string
Allowed values: spam engano sem_interesse duplicado outro
by
required
object
id
required
string
name
required
string
nullable
origin
required
object
id
required
string
name
required
string
color
required
string
nullable
defaultDepartment
required
object
id
required
string
name
required
string
defaultDepartmentHidden
required

True when the contact has a default department the reader may not see; defaultDepartment is then null, and the screen must not offer to replace it as if it were empty

boolean
company
required
object
id
required
string
name
required
string
jobTitle
required

Cargo da pessoa na empresa

string
nullable
tags
required
Array<object>
object
id
required
string
name
required
string
color
required
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
profilePicUrl
required

Presigned url for the contact’s whatsapp profile photo

string
nullable
mergedIntoContactId
required

Id of the contact this one was merged into

string
nullable

Example

{
"blocked": {
"reason": "spam"
}
}

Phone number already in use