Messages
| Tool | REST endpoint | Annotations |
|---|---|---|
send_message | POST /v1/messages | write, non-destructive |
send_template_message | POST /v1/messages/template | write, non-destructive |
send_message
Sends a personalized message inside an existing conversation. The tool resolves the conversation via conversationId and channelId; if there are several conversations for the same phone number, it uses the most recent one that matches the channel. canSendDirectMessage can only be false on WhatsApp, Instagram, and Messenger/Facebook and is calculated from the latest user message.
Arguments
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string | yes | Channel of the agent that will send the message. |
conversationId | string | yes | Customer's phone number or conversation identifier. |
content | string \| object | yes | Plain text, structured content for media/interactive messages, or an instruction for the agent. |
type | "text" \| "image" \| "video" \| "file" \| "audio" \| "interactive" \| "email" \| "instruction" | no | Message type when content is an object. If content is a string, text is used. |
client | object | no | Customer data (name, email, customFields, owners, …) used to create/enrich them. |
campaignId | string | no | Groups the send under a campaign. Default "api". |
delay | number ms | no | Schedule with a delay (3000-86,400,000 ms). |
scheduleTime | ISO 8601 | no | Schedule with an exact date. Mutually exclusive with delay. |
Invocation example
{
"name": "send_message",
"arguments": {
"channelId": "wb-12345",
"conversationId": "+521234567890",
"content": "Hola, te escribo desde Platica API",
"client": {
"name": "Ana López",
"customFields": {
"placas": "ABC123"
}
}
}
} Media example
{
"name": "send_message",
"arguments": {
"channelId": "wb-12345",
"conversationId": "+521234567890",
"type": "image",
"content": {
"image": {
"url": "https://cdn.assets.com/foto.jpg",
"caption": "Aquí está la foto"
}
}
}
} Agent instruction example
An instruction does not reach the customer: it is applied to the agent operating the conversation. Use mode: "wait" to have the agent wait for the next customer message with the instruction recorded as context, or mode: "resume" to resume the agent so it continues the flow.
{
"name": "send_message",
"arguments": {
"channelId": "wb-12345",
"conversationId": "+521234567890",
"type": "instruction",
"content": {
"text": "Continúa con el flujo de venta y ofrece un descuento del 10%.",
"mode": "resume"
}
}
} If canSendDirectMessage is false on WhatsApp, use send_template_message. On Instagram and
Messenger/Facebook, follow the channel policy. It is always true on internal platica chats: use a workspace-{workspaceId}-agent-{agentId} channelId and the chat_* conversationId. They support
text, image, video, file, audio, and wait/resume instructions; interactive, email, and
templates are not supported.
send_template_message
Sends a message based on an approved WhatsApp template to the customer identified by conversationId (international phone number). Creates the conversation and/or the customer if they don't exist. It can be sent immediately, with delay (in ms, minimum 3000), or with scheduleTime (ISO 8601, Mexico time if no zone is included).
Arguments
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string | yes | WhatsApp channel of the agent that will send. |
conversationId | string | yes | Destination phone number in E.164 format. |
template.name | string | yes | Exact template name. |
template.type | "image" \| "video" \| "document" | no | If the template has a media header. |
template.file | string (URL) | no | Public file URL when type is present. |
template.params | string[] | no | Ordered values for the body variables. |
template.buttons[] | object | no | Override of dynamic button parameters (max 3). |
template.components[] | object | no | Additional components (rarely needed). |
client | object | no | Customer data (name, email, …) used to create/enrich them. |
campaignId | string | no | Groups the send under a campaign. Default "api". |
delay | number ms | no | Schedule with a delay (3000-86,400,000 ms). |
scheduleTime | ISO 8601 | no | Schedule with an exact date. Mutually exclusive with delay. |
Invocation example
{
"name": "send_template_message",
"arguments": {
"channelId": "wb-12345",
"conversationId": "+521234567890",
"template": {
"name": "bienvenida_v1",
"params": ["Ana", "10%"]
},
"client": {
"name": "Ana López",
"email": "ana@example.com"
}
}
} Use list_templates or get_template before invoking send_template_message to discover the exact shape of params, buttons, and components. The get_template response includes an api_example field with the payload ready to paste as arguments.