send_message
Send a single template directly to one person over chosen fallback channels without rules. Use for one-off codes, replies, or alerts when the template key is known.
Instructions
Send one template directly to one person over the channels you list, without rules. Use it for an explicit one-off message (a code, a reply, an alert) when you know the template key; otherwise prefer send_event. Needs the messages:write scope.
The message still passes its category's policy (preferences, frequency caps, quiet hours, unsubscribes) and, for agent keys, the agent's per-person budget, importance ceiling and approval policy. Returns the message, with the same fields as get_message. status is queued, suppressed (read status_reason) or pending_approval (held for a person: do not resend). Repeating an idempotency_key returns the original message instead of sending again. Fails with 404 for an unknown template or category, 403 when an agent may not use the category and 422 for a channel the server does not have.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Template variables as a JSON object, read as `data` in the template; at most 16 KB. Defaults to {}. | |
| category | No | Policy category key. `transactional` (default) has no caps, ignores quiet hours and cannot be unsubscribed from; `marketing` is capped and respects quiet hours. Agent keys may use only their allowed categories. | transactional |
| channels | Yes | At least one channel name in fallback order, e.g. `["push", "email"]`; each must be configured on the server. | |
| template | Yes | Key of an existing template, e.g. `order-shipped`. | |
| recipient | Yes | External id of the person: the id your system uses for them. An unknown id gets an empty profile without addresses, so the message is suppressed with `no_reachable_channel`. | |
| importance | No | `low` never interrupts, `normal` is the default, `high` is time-sensitive, `critical` is for security or safety only and breaks through quiet hours and caps only in categories people cannot unsubscribe from (elsewhere it is sent as `high`). An agent's ceiling lowers anything above it. | normal |
| idempotency_key | No | Up to 200 characters derived from the triggering action; repeating it with the same API key returns the original message instead of sending again. Strongly recommended. | |
| expires_in_minutes | No | Drop the message if it is not delivered within this many minutes; set it for codes, arrivals and anything useless later. Omit for no expiry. |