Register Webhook
register_webhookRegister a webhook so Mobile Text Alerts sends events to a URL you control — for example, to receive replies to messages sent with send_message.
EVENTS
message-reply: an inbound reply was received
delivery-status: a sent message's delivery status changed
message-send: a message was handed off for delivery
number-opt-in: a number opted in to a channel
THE SECRET Ask the human user to provide the secret — do not invent one. Tell them to store it outside this conversation (for example in Replit Secrets): the receiving app needs it to verify requests, and it cannot be retrieved from Mobile Text Alerts afterwards.
THE RECEIVING ENDPOINT MUST
Be reachable over HTTPS and respond with HTTP 200 (401 if the signature is invalid).
Verify the X-Signature header on every request: a lowercase hex HMAC-SHA256 of the RAW request body, keyed with the secret. Compute it over the raw bytes before any JSON parsing (e.g. express.raw() in Express) and compare in constant time. There is no timestamp or nonce, so signatures do not protect against replay.
Payload formats per event: https://developers.mobile-text-alerts.com/tutorials/webhooks
Always call list_webhooks first. Registering the same event and URL again creates a second webhook rather than updating the first, and both will receive every event. If one already exists, reuse it — or, to change the URL or secret, remove it with delete_webhook and register again.
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": {
"event": "<event>",
"url": "<url>",
"secret": "<secret>"
},
"name": "register_webhook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL of the endpoint that will receive events. It must respond with HTTP 200. | |
| event | Yes | Event to subscribe to. Use 'message-reply' to receive replies. | |
| secret | Yes | Shared secret used to sign every webhook request. Must be provided by the human user — do not generate one. The user should store it outside this conversation (e.g. Replit Secrets); it cannot be retrieved from Mobile Text Alerts later. | |
| alertEmail | No | Address for failure alerts. Only used when sendAlertEmail is true; defaults to the account's main email. | |
| retryOnError | No | Retry failed deliveries with exponential backoff (up to 2 retries). | |
| sendAlertEmail | No | Email an alert when deliveries to the URL fail. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Raw Mobile Text Alerts API response envelope. The webhook is nested one level down, under `data.data` — e.g. `data.data.id`. | |
| error | No | ||
| status | Yes | ||
| success | Yes | ||
| statusText | Yes |