Skip to content

Contacts API

MethodEndpointDescription
GET/contacts/List contacts
POST/contacts/Create contact
GET/contacts/{id}/Get contact details
PUT/contacts/{id}/Update contact
DELETE/contacts/{id}/Delete contact
Terminal window
curl -X POST http://localhost:8000/contacts/ \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"phone": "+1234567890",
"first_name": "John",
"last_name": "Doe",
"tag": "vip-customer"
}'
FieldTypeDescription
phonestringPhone number (E.164 format)
first_namestringFirst name
last_namestringLast name
tagFKLink to TenantTags
sourceenumHow the contact was created
telegram_chat_idstringAuto-populated from Telegram webhooks
telegram_usernamestringAuto-populated from Telegram webhooks
lead_statusstringLead pipeline status
lead_scoreintegerNumerical lead score
do_not_contactbooleanDNC flag
assigned_to_typeenumUSER, BOT, CHATFLOW, UNASSIGNED
assigned_to_userFKAssigned team member
assignment_notestringNotes about the assignment
ticket_statusenumOPEN, CLOSED
SourceDescription
MANUALCreated via API or admin
WHATSAPPAuto-created from inbound WhatsApp message
TELEGRAMAuto-created from inbound Telegram message
SMSAuto-created from inbound SMS
RCSAuto-created from inbound RCS message
VOICEAuto-created from voice call
ParameterDescription
searchSearch by phone, first_name, or last_name
tagFilter by tag
sourceFilter by source
lead_statusFilter by lead status
assigned_to_typeFilter by assignment type
ticket_statusFilter by ticket status
orderingSort by field

Contacts are unified across channels. When a contact messages via WhatsApp and later via Telegram, both identities are linked to the same TenantContact record via phone number matching. The telegram_chat_id is populated automatically when a Telegram user messages your bot.