S M S

Sends an SMS message to one or more devices.

POST
/m2m/v1/sms

The messages are queued on the ThingSpace Platform and sent as soon as possible, but they may be delayed due to traffic and routing considerations.

Authorization

thingspace_oauth VZ-M2M-Token
AuthorizationBearer <token>

This is the ThingSpace token, from Credentials and Tokens is used

In: header

VZ-M2M-Token<token>

M2M Session Token (How to generate an M2M session token?)

In: header

Request Body

application/json

Request to send SMS.

Request to send SMS.

accountName*string

The name of a billing account.

smsMessage*string

The contents of the SMS message. The SMS message is limited to 160 characters in 7-bit format, or 140 characters in 8-bit format.

customFields?array<>

The names and values of custom fields, if you want to only include devices that have matching custom fields.

dataEncoding?string

The SMS message encoding, which can be 7-bit (default), 8-bit-ASCII, 8-bit-UTF-8, 8-bit-DATA.

deviceIds?array<>

The devices that you want to send the message to, specified by device identifier.

groupName?string

The name of a device group, if you want to send the SMS message to all devices in the device group.

servicePlan?string

The name of a service plan, if you want to only include devices that have that service plan.

timeToLive?string

A period of time the message remains valid or an end date for the message. This value would be less than the 5 day default.

Response Body

application/json

application/json

curl -X POST "https://example.com/m2m/v1/sms" \  -H "Content-Type: application/json" \  -d '{    "accountName": "0000123456-00001",    "customFields": [      {        "key": "CustomField1",        "value": "value of the field"      }    ],    "dataEncoding": "optional 7 or 8-bit encoding",    "deviceIds": [      {        "id": "20-digit ICCID",        "kind": "iccid"      }    ],    "smsMessage": "the body or text of the message itself",    "timeToLive": "a000000010000000R"  }'
{  "requestId": "595f5c44-c31c-4552-8670-020a1545a84d"}