Contacts
Contacts are the people who interact with your agents. The API calls them clients (/v1/clients). Store their profiles, custom fields and tags to organize them.
Example
curl https://api.platic.ai/v1/clients \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "phoneNumber": "5215512345678", "name": "Ana" }' await platic.clients.create({ phoneNumber: "5215512345678", name: "Ana" }); What you need to know
- Every error under
/v1/clientsuses the standard format, with adetails.code. See Errors. GETandPATCH /v1/clients/{id}accept the contact's ID, phone number or email.- A blocked contact stops receiving automatic replies.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/clients | List all contacts |
POST | /v1/clients/search | Search contacts by text and filters |
POST | /v1/clients/tags | Add or remove tags on many contacts |
GET | /v1/clients/{id} | Get a contact by ID, phone number or email |
POST | /v1/clients | Create a contact |
PATCH | /v1/clients/{id} | Update a contact by ID, phone number or email |
DELETE | /v1/clients/{id} | Delete a contact by ID or phone number |
GET | /v1/clients/{clientId}/conversations | List all the conversations of a contact |
PATCH | /v1/clients/{id}/moderation | Block, unblock or reset strikes |
Contacts can have custom fields defined per workspace. See Custom fields to list, create, update or delete them.
Status and moderation
Each contact has a status (active or blocked) and a moderation object with its history. A blocked contact stops receiving automatic replies: its new conversations are born marked as spam and agents skip them.
Violations of the agent's safety rules add strikes to the contact. Exceeding the agent's limit blocks them automatically. Use Moderate a contact to change their status manually.
Unblocking resets strikes to zero. Resetting strikes alone keeps the contact blocked.
GET and PATCH /v1/clients/{id} accept the contact's ID, phone number or email. That way you find an email contact, which may not have a phone number. /moderation accepts the ID or the phone number.