Skip to main content

Scheduling SMS and MMS


Outbound SMS and MMS can be scheduled to be sent in the future with the POST /v2/messages endpoint or the POST /v2/messages/schedule endpoint.

Making a Request

The field send_at must be set as an ISO 8601 formatted datetime string, e.g. “2019-01-23T18:30:00Z”, and cannot be less than 5 minutes or more than 5 days in the future. The actual scheduling time is accurate up till a minute.

curl -L 'https://api.telnyx.com/v2/messages/schedule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"from": "+18445550001",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000",
"to": "+18445550001",
"text": "Hello, World!",
"subject": "From Telnyx!",
"webhook_url": "http://example.com/webhooks",
"webhook_failover_url": "https://backup.example.com/hooks",
"use_profile_webhooks": true,
"type": "SMS",
"send_at": "2019-01-23T18:30:00Z"
}'

Retrieving a scheduled message

The GET /v2/messages/:id endpoint can be used to retrieve a scheduled message.

Canceling a scheduled message

The DELETE /v2/messages/:id endpoint can be used to cancel a scheduled message. Only messages with status=scheduled and send_at more than a minute from now can be cancelled.

Webhooks

Telnyx messaging webhooks are sent for scheduled messaging.

Limits

Telnyx rate limits are applied in the same way to scheduled messages as a regular message.

No more than 1 million messages can be scheduled at given time.