Follow

Overview

The Rest API supports the ability to manage SMS Messages and Subscribers, as well as send Messages.  The Rest API URI for SMS resource is in the format:

https://[siteurl]/rest/sms

Commands

API Commands for SMS management include:

Name

HTTP Method

Endpoint

Description

Create Message POST /rest/create_message Create message content to send via SMS
Get Messages GET /rest/sms Get body of each SMS message for an Account.
Add Phone to Sender Code POST

/rest/sms/addPhoneToSenderCode/{phone}/{sender_code}?groupName=[group_name]

Subscribe an existing SMS subscriber to an SMS Sender Code
Add SMS Subscriber to Sender Code POST /rest/sms/addSubscriberToSenderCode/{email}/{phone}/{sender_code}/{country}/?groupName=[groupname]&first=[first_name]&customerKey=[customer_key] Subscribe an existing SMS and Email subscriber to an SMS Sender Code
Send Message to Phone POST /rest/sms/sendMessageToPhone//{messageText}/{phone}/{senderCode} Send an SMS Message to a specified Phone number without  predefined message content.
Send Message to Sender Code POST /rest/sms/
sendMessageToSenderCode
/{messageName}/{senderCode}/{name}?description=[description]&groupName=[group_name]
Send an SMS Message to all Subscribers assigned to a Sender Code or Group
Stop Sending to Subscriber POST /rest/sms/stopSubscriberSend/{phone}/{senderCode} Unsubscribe an existing SMS subscriber from an SMS Sender Code

 

SMS Message Property Data Fields

The following data fields may be set and viewed for SMS Messages.  You will notice that there are properties which are available within the UI that are not available in the API.  These must be edited within the UI only.   

Field Name

Methods

Description

Type

Example

ID

GET

Unique ID of the Message

Integer

"id": [messageId]

Realm ID

GET

ID of Account

Integer

"realmId": [realmId]

Total Message Parts

GET

 Number of separate message parts.

Integer

"totalParts": [number of parts]

Name

POST,  GET

Unique Name of the Message.

String 

"name": "[messageName]"

Text

POST, GET

Content of the message

String

"messageText": "[messageText]" 

Created Date

GET 

Date the Message was created. 

Date 

"createdDate": "Mar 22, 2018 4:05:11 PM"

Updated Date

GET 

Last date that changes were made and saved to the Message.

Date 

"updatedDate": "Mar 23, 2018 12:45:04 PM"

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk