Skip to main content
POST
/
api
/
public
/
messages
Send an SMS
curl --request POST \
  --url https://astrasend-mocha.vercel.app/api/public/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "+15551234567",
  "body": "Your code is 4821."
}
'
{
  "ok": true
}

Authorizations

Authorization
string
header
required

Your API key (as_live_…), created under Settings → API keys.

Body

application/json
to
string
required
Example:

"+15551234567"

body
string
required
from
string

An owned number — E.164 or a number id. Omit for the default.

Response

Success

ok
boolean
Example:

true