Send a text message
send_smsSend an outbound text message.
Without ``from_``, supported destinations use the workspace's alphanumeric sender ID.
Other destinations use an eligible workspace SMS-capable number.
A missing required number returns 422. SMS does not use the shared voice-call pool.
US long-code texting to US recipients requires ready A2P 10DLC registration and an attached number.
Trial texts (only to the workspace's own verified phone, set up in the console: Overview > Test a text): without from_, Hail uses one when the workspace's own number cannot text that US phone; set from_ to the trial number to use one directly. Each starts with "[Hail trial]".
The message purpose determines the consent checks. Marketing requires a consent source.
Hail does not independently verify the recipient's consent.
The result includes the delivery status and retry key. A failed carrier attempt can
appear as a message record with status ``failed``.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"to": "<to>",
"body": "<body>",
"recipient_consent": "<recipient_consent>"
},
"name": "send_sms"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient phone number in E.164 format, such as ``+14155551234``. | |
| body | Yes | Message text. Long bodies are split into carrier segments. | |
| from_ | No | Sender: an active E.164 workspace number with SMS, from ``list_numbers``. Omitted: picked by destination (see the tool description). | |
| metadata | No | Extra data stored on the message record. | |
| llm_model | No | The calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics. | |
| message_type | No | Purpose of the communication for consent checks. Transactional or service messages are ``informational``; promotional messages are ``marketing``. | informational |
| consent_source | No | Where or how consent was obtained, such as ``signup form``. Required when ``message_type`` is ``marketing``. | |
| idempotency_key | No | Retry key. The ``idempotency_key`` from an earlier response refers to that original request instead of starting a new one. Omitted: a new key is generated and returned. | |
| recipient_consent | Yes | Confirmation from the user that the recipient lawfully agreed to be contacted. Hail requires ``true`` and does not independently verify consent. | |
| consent_obtained_at | No | When consent was obtained, as an ISO 8601 timestamp, if known. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||