Users & Data
Contacts API: sync your customers
Use the Contacts API to create, update, list, and delete contacts so your AI chatbot knows each customer's name, plan, and details. Endpoints and limits.
Contacts are the people your agent talks to. When a verified user chats (see Identity verification), Assistrio matches their userId to a contact's external_id and gives the agent that contact's name, email, phone, and attributes — like plan, company, or account status.
Tip
In the dashboard, Contacts › API (or Sync contacts from your system on an empty Contacts page) opens a ready-to-run cURL request with your agent ID filled in. See Contacts for adding contacts by hand or from a CSV file.
Base URL and auth
https://api.assistrio.com/api/v1/agents/{agentId}/contacts
Authorization: Bearer ak_…Endpoints
| Method | Path | Does |
|---|---|---|
GET | /contacts?page=1&limit=50&q= | List contacts, newest first. limit 1–200 (default 50); q searches name, email, phone, and external_id. Returns { contacts, total, page, limit }. |
POST | /contacts | Create or update up to 5,000 contacts. Returns { added, updated, skipped }. |
GET | /contacts/{externalId} | Get one contact. Returns { contact }. |
PATCH | /contacts/{externalId} | Update name, email, phone, or attributes. Returns { contact }. |
DELETE | /contacts/{externalId} | Delete a contact. Returns { ok: true }. |
Create or update contacts
curl -X POST https://api.assistrio.com/api/v1/agents/YOUR_AGENT_ID/contacts \
-H "Authorization: Bearer $ASSISTRIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contacts": [
{
"external_id": "user_123",
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+14155550100",
"attributes": { "plan": "Pro", "company": "Analytical Engines" }
}
]
}'{
"added": 1,
"updated": 0,
"skipped": []
}- A row with an
external_idupdates the contact with thatexternal_id. A row without one updates the contact with the sameemail. Otherwise a new contact is added. - Each row needs at least a name, email, phone, or
external_id. Rows that can't be saved come back inskippedas{ row, error }(rowcounts from 1) — the rest are still saved. - You can also send a single contact object instead of
{ contacts: [...] }.externalId,user_id, anduserIdwork as names forexternal_id, andcustom_attributesforattributes. - Sending
attributesreplaces the contact's attributes instead of merging them — include every attribute you want to keep. This applies toPATCHtoo. - Attribute values are stored as strings (numbers are converted); empty values are dropped, and
.or$in a key becomes_.
Contact object
{
"id": "…",
"externalId": "user_123",
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+14155550100",
"attributes": { "plan": "Pro", "company": "Analytical Engines" },
"source": "api",
"lastSeenAt": "2026-11-01T10:24:00.000Z",
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-11-01T10:24:00.000Z"
}Limits
| Limit | Value |
|---|---|
| Contacts per request | 5,000 |
| Contacts per agent | 50,000 |
| Attributes per contact | 30 |
| Attribute key / value length | 40 / 500 characters (values are strings) |
external_id / name / email / phone | 128 / 120 / 254 / 40 characters (email must be valid) |
| Rate limit | 300 requests per minute per API key |
Errors
Errors return JSON with an error message, such as { "error": "That API key is wrong or was deleted." }. Statuses: 400 (invalid input or agent ID), 401 (missing or invalid key), 404 (agent not in this workspace, or contact not found), and 429 (rate limited — this one also includes "errorCode": "RATE_LIMITED"; wait a minute and retry).
Was this page helpful?
Need help? Contact support — we reply within one to two business days.
