Crear un contacto

Sirve para dar de alta un contacto nuevo (teléfono o WhatsApp ID, nombre, email) cuando sabés que no existe. Si no estás seguro, usá la operación de crear o actualizar.

POST
/contacts

Permiso requerido: conversations:write

Autorización

http
headerAuthorizationBearer <clave>

Cuerpo del pedido

application/json
  1. body
phone?string
whatsapp_id?string
name?string|null
email?|
Formatoemail
image?string|null
deviceId?integer|null

Cuerpo de la respuesta

OK

application/json
  1. response
id*integer
name*string
email*string
phone*string
whatsapp_id*string
whatsapp_username?string|null
has_phone*boolean
country_code*string
status*integer
image*string
notes*string|nullObsoleto
custom_fields?array<>
created_at*|
Formatodate-time
active_conversation*integer
favorite*integer
unread_messages*integer
manually_unread?boolean
last_message?
device_id*integer|null
adviser_id*integer|null
paused_at*string|null
mac_date*string|null
is_mac_inactive?boolean

true si el contacto es inactivo por el límite de contactos activos en el momento de la consulta: tu cuenta está en bloqueo (state = enforcing en GET /mac/status) y el contacto todavía no es un contacto activo del ciclo actual. Viene en GET /contacts, GET /contacts/{contact} y GET /conversations.

ai_assistant_name*string|null
stage_since?string
is_stagnant?boolean
lead_score?
name_mismatch?array<unknown>|null
curl -X POST "https://example.com/contacts" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": 0,  "name": "string",  "email": "string",  "phone": "string",  "whatsapp_id": "string",  "whatsapp_username": "string",  "has_phone": true,  "country_code": "string",  "status": 0,  "image": "string",  "notes": "string",  "custom_fields": [    {      "id": 0,      "name": "string",      "description": "string",      "type": "string",      "value": "string",      "created_at": "string",      "updated_at": "string",      "contact_count": "string"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "active_conversation": 0,  "favorite": 0,  "unread_messages": 0,  "manually_unread": true,  "last_message": {    "text": "string",    "file": "string",    "date": "string",    "type": "string",    "own": "string",    "deleted_at": "string",    "deleted_scope": "string"  },  "device_id": 0,  "adviser_id": 0,  "paused_at": "string",  "mac_date": "string",  "is_mac_inactive": true,  "ai_assistant_name": "string",  "stage_since": "string",  "is_stagnant": true,  "lead_score": {    "score": 0,    "signals_count": 0,    "category": "string",    "confidence": "string",    "disqualified": true,    "disqualified_at": "string",    "updated_at": "string"  },  "name_mismatch": [    null  ]}