Send an AI agent's SMS template
send_agent_template_messageSend one of an AI agent's published SMS templates, filled with the variables and slots you give, from a number in the agent's own project, with no call behind it. The same send, policy and charge as POST /v1/agents/{agent_id}/messages; a template, agent or project it cannot find is one not-found. Returned body, metadata, error and idempotency_key require sms:read, including on replays.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | The recipient, E.164. to_phone_number is accepted as its alias. | |
| bulk | No | ||
| slots | No | Values for the template's model slots, each within its max_length. | |
| country | No | ||
| purpose | No | The message's purpose, authorized as on POST /v1/messages. | |
| agent_id | Yes | ||
| language | No | The language to send in. Text is chosen from the call or request language, then its base language (et-EE -> et), then the agent's primary language, then, as a last resort, the template's texts in language-code order. | |
| metadata | No | ||
| number_id | No | ||
| variables | No | Values for the agent's declared variables the template references. A referenced required variable must be present; protected variables are refused (there is no confirmation to lean on). | |
| categories | No | ||
| project_id | No | Optional. The agent's own project; any other answers 404 exactly as a foreign agent does. | |
| template_id | Yes | ||
| relationship | No | ||
| message_class | No | ||
| from_number_id | No | ||
| recipient_type | No | ||
| user_requested | No | ||
| idempotency_key | No | ||
| organization_id | No | Optional. Defaults to the authenticated workspace; when supplied it must be that workspace's id. | |
| to_phone_number | No | ||
| user_authorization | No | ||
| from_phone_number_id | No |