Customers

ToolREST endpointAnnotations
list_clientsGET /v1/clientsread-only, idempotent
get_clientGET /v1/clients/{identifier}read-only, idempotent
list_client_conversationsGET /v1/clients/{clientId}/conversationsread-only, idempotent
create_clientPOST /v1/clientswrite (upsert if it already exists)
update_clientPATCH /v1/clients/{phoneNumber}write, partial
delete_clientDELETE /v1/clients/{identifier}destructive
block_clientPATCH /v1/clients/{identifier}/moderationdestructive
unblock_clientPATCH /v1/clients/{identifier}/moderationwrite
reset_client_strikesPATCH /v1/clients/{identifier}/moderationdestructive

All three moderation tools hit the same declarative endpoint: the API exposes only one because the verbs overlap (unblocking already resets strikes), but they are kept as verbs here because the tool name is what tells the agent what it does.

Beyond status, get_client returns the full moderation object. list_clients returns status only.


list_clients

Lists customers in the workspace grouped, with pagination and optional filters.

FieldTypeDefault
limit1-20050
pageTokenstring
offset≥ 0 (max 100000)0
sortBy"name" \| "creationDate"name
sortDirection"asc" \| "desc"asc
searchTermstring
status"active" \| "blocked"
tagsstring[] (max 10)
dateFilterobject

status: "active" includes customers that never had an explicit status.

pageToken is the cursor from the previous response and is preferred over offset; they cannot be combined.


get_client

FieldTypeRequiredDescription
identifierstringyesCustomer ID or phone number (E.164).

Alongside the profile it returns the contact's moderation state (accumulated strikes, last offence, block reason and date). That section only shows up when the contact has history or is blocked.


list_client_conversations

Lists all conversations for a customer across channels and agents, including API chats. Each result includes the full summary without messages: id, conversationId, clientId, agentId, canSendDirectMessage, workspaceId, channelId, contactName, phoneNumber, topic, platform, source, status, operation, messageCount, owners, tags, creationDate, and lastUpdate.

id is the canonical document, conversationId identifies the thread, and clientId identifies the client. canSendDirectMessage can only be false on WhatsApp, Instagram, and Messenger/Facebook, based on the latest user message; it is always true for internal Platica chats.

FieldTypeRequiredDefaultDescription
clientIdstringyesCustomer ID or E.164 phone.
channelIdstringnoFilter by channel.
agentIdstringnoFilter by principal agent.
limit1-200no50Maximum results.
offset≥ 0no0Pagination offset.

create_client

Creates a new customer; if one with the same phone number already exists, it updates it (upsert).

FieldTypeRequired
phoneNumberstring E.164yes
namestringyes
workspacestringif multi-ws
email, firstname, lastname, birthdate, gender, company, country, state, city, address, postalCodestringno
tagsstring[]no
customFieldsRecord<string, unknown>no
ownersstring[]no

Example

{
  "name": "create_client",
  "arguments": {
    "phoneNumber": "+521234567890",
    "name": "Ana López",
    "email": "ana@example.com",
    "tags": ["vip", "nuevo"]
  }
}

update_client

Updates a customer by phone number. Only the fields provided are applied.

Accepts the same fields as create_client (all optional except phoneNumber), plus:

FieldTypeDescription
status"active" \| "blocked"Blocks or unblocks the contact, with the same effects as block_client / unblock_client.

delete_client

FieldTypeRequired
identifierstringyes
workspacestringif multi-ws

Irreversible deletion. The contact's document is kept with its channel identifiers, but their personal data, tags, and custom fields are wiped and they stop showing up in listings. Their private notes and the files attached to them are permanently deleted.


block_client

Blocks a contact: their future conversations start out as spam, agents stop replying to them, and the threads that were already open are marked as spam so the block applies right away.

FieldTypeRequiredDescription
identifierstringyesCustomer ID or phone (E.164).
workspacestringif multi-ws
reasonstring (max 120)noReason recorded on the contact. Defaults to api_request.

Example

{
  "name": "block_client",
  "arguments": {
    "identifier": "+521234567890",
    "reason": "abuse_reported"
  }
}

unblock_client

Unblocks a contact, moves the conversations the block sent to spam back to finished, and zeroes their strikes so one more offence does not block them again. The record of the last offence is kept.

FieldTypeRequired
identifierstringyes
workspacestringif multi-ws

reset_client_strikes

Zeroes the contact's moderation strikes. Does not unblock them — use unblock_client for that, which already resets the strikes along the way. Use this one to forgive a contact who piled up offences but was never blocked.

FieldTypeRequiredDescription
identifierstringyesCustomer ID or phone (E.164).
workspacestringif multi-ws
clearHistorybooleannoAlso wipes the record of the last offence (categories, terms, severity).