Skip to main content
POST
sms.send

Authorizations

Authorization
string
header
required

A Lath API key: lath_live_sk… or lath_test_sk… on a server, lath_live_pk… or lath_test_pk… in a browser.

Headers

Idempotency-Key
string

Replays the stored response for the same key and input; refuses different input.

Body

application/json
to
string
required

One recipient, E.164, e.g. +14155550100

Pattern: ^\+[1-9]\d{6,14}$
template
string

An SMS template name; provide variables with it. Use instead of body, not with it.

Required string length: 1 - 120
locale
string

Send the template's variant for this language, falling back to the broader language and then the default. Omit to use the recipient's own locale if one is recorded.

Maximum string length: 20
body
string

Inline send: the message; may reference {{variables}}

Required string length: 1 - 1600
variables
object
sendAfter
string<date-time>

Hold the message until this moment; omit to send now. Until it is sent it can be stopped with sms.message.cancel.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
topic
string

A consent topic for marketing; omit for transactional, which only a suppression stops

Required string length: 1 - 64
metadata
object

Up to 20 key/values echoed on every webhook about this message

Response

{ activityId, result }. activityId is empty for reads.

activityId
string
required

The activity this call created, or empty for a read.

result
object
required
Last modified on September 13, 2026