Skip to main content

POST /sms/lines/{line}/scheduled

Schedule a message

Scopesms:send
Role permissionPhone numbers — line must be one of theirs
CostTHIS SPENDS MONEY — later.

Why this needs sms:send, not sms:write: scheduling still charges the account — just later. sms:write is the permission for things that don't cost money (drafts, templates, block lists); sms:send is the one that authorizes spending. If scheduling only needed sms:write, a credential that isn't allowed to send a message now could still queue one to send — and bill the account — later. That is a back door around the spending permission, so scheduling requires the same sms:send consent a live send does.

The price is fixed at the moment you schedule. A later rate-card change does not re-price a message you already committed to.

The STOP list is checked at dispatch, not now: a recipient can opt out between scheduling and sending, and clearing them now would let the message reach someone who has since said stop.

Path parameters​

NameTypeRequiredExampleDescription
linestringyes12125550188One of your account's numbers. Digits.

Request body​

FieldTypeRequiredDescription
tostring[]yesThe numbers to send to. At least one — two or more makes it a group MMS.
messagestringnoRequired unless media is set.
subjectstringnoAn optional title shown above the message, like an email's subject line. Only picture/group messages (MMS) carry it; a plain SMS ignores it.
mediastring[]noHosted URLs, not inline file content — a scheduled MMS references files that already exist rather than carrying megabytes that must be stored until the send time.
sendAtstring (RFC 3339)yesWhen to send it, RFC 3339. Must be in the future — a past time is almost always a timezone bug in the caller, so it is rejected rather than sent immediately.
{
"to": [
"13475550123"
],
"message": "Reminder: your appointment is tomorrow at 2pm.",
"sendAt": "2026-08-20T14:30:00Z"
}

Responses​

201​

Queued.

FieldTypeDescription
idintegerThe scheduled message's id — pass it to cancel this one before it sends.
linestringThe number it will be sent from (one of your account's numbers).
recipientsstring[]The numbers it will be sent to.
subjectstringThe MMS subject line, if one was set.
textstringThe message body.
mediastring[]Attachment URLs to send with it, if any — attachments make it an MMS.
sendAtstring (RFC 3339)When it is scheduled to go out, RFC 3339 UTC.
pricenumberWhat it will cost, fixed at the moment it was scheduled. A later rate-card change does not re-price a message you already committed to; the charge lands when it goes out.
currencyUSDThe currency of price — always USD.

Errors​

StatusMeaning
400invalid_request — a missing or malformed field, an unknown enum value, or an unknown field in the body. Nothing was charged.
401unauthenticated — no credential, or one that is invalid, revoked or expired. The WWW-Authenticate header names the scope the endpoint wanted.
403Two different failures share this status; the type field tells them apart — insufficient_scope (the credential lacks the scope) or permission_denied (the scope is fine, but the user's role lacks the permission).
422A destination is not on the account's rate card, so it cannot be priced. Nothing was queued.
500internal_error — something failed on our side. Nothing was charged and no message went out, guaranteed — which is what makes a retry safe.

See Errors for the full catalog and what to do about each.

Example​

curl -X POST 'https://api.account.telebroad.com/api/public/v1/sms/lines/12125550188/scheduled' \
-H "Authorization: Bearer $TB_KEY" \
-H 'Content-Type: application/json' \
-d '{"to":["13475550123"],"message":"Reminder: your appointment is tomorrow at 2pm.","sendAt":"2026-08-20T14:30:00Z"}'

Try it in the playground →