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 (up to 25, only to the workspace's own verified phone, set up in the console): 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]".
Hail does not verify consent.
Returns the SMS ID, status, sender, destination, segment count and retry key, or an error.
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 | Free-form JSON object stored on the message record. | |
| llm_model | No | Model ID of the calling agent. Optional. Recorded for analytics only. | |
| message_type | No | ``informational`` for transactional or service messages, or ``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 | Attestation that the recipient lawfully agreed to be contacted, as the user confirmed it. Hail does not check it; only ``true`` is accepted. | |
| consent_obtained_at | No | When consent was obtained, as an ISO 8601 timestamp, if known. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||