Sms

About Sms

SMS api endpoint allows sending a text message.

Schema

sms document

KeyDescriptionTypeDefaultRequiredSupport Level
bodytext messagestring(1..700)true
fromcaller-id-number, taken from user if absentstring()false
tocallee-id-number`array(string())string()`true

Sending a text message

PUT /v2/accounts/{ACCOUNT_ID}/sms

curl -v -X PUT \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    -d '{"data": {"from": "+15551112222", "to": "+15552221111", "body": "wave if you received this"}}' \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/sms
{
    "request_id": "{REQUEST_ID}",
    "tokens": {
        "consumed": 1,
        "remaining": 100
    },
    "auth_token": "{AUTH_TOKEN}",
    "data": {
        "message_id": "{REQUEST_ID}",
        "from": "+15551112222",
        "to": "+15552221111",
        "body": "waive if you received this",
        "custom_vars": {
            "account_id": "{ACCOUNT_ID}",
            "reseller_id": "{RESELLER_ID}",
            "authorizing_type": "account",
            "authorizing_id": "{ACCOUNT_ID}"
        },
        "route_type": "offnet"
    },
    "status": "success"
}