Send SMS Engage survey
POST https://sms.8x8.com/api/v1/subaccounts/:subAccountId/surveys/:surveyId/messages
About SMS Engage
- SMS Engage combines the reach of SMS and the power of interactive web surveys
- Using the API endpoint lets you send SMS containing special links to surveys for any use case:
- Satisfaction feedback (NPS, CSAT, CES..)
- Interactive marketing landing page
- E-commerce confirmations (Order, Delivery, Payment)
- and much more: reach out to learn more!
- SMS Engage surveys are linked to your 8x8 account: each individual survey response can be tracked back to the original SMS or SMS campaigns: get individual response logs and aggregated analytics in your 8x8 Customer Portal
- You can also retrieve the SMS Engage response programmatically using the dedicated webhook
About the API endpoint / method
- Sending a POST request on this endpoint allows to send SMS Engage individually (1 message per request).
- It is ideal when you want to integrate surveys as part of your customer experience and trigger an SMS Engage following an event occurring in your application (eg: NPS survey sent after customer support interaction)
URL
The 8x8 SMS subaccountid to use is defined in the URL where you send your POST request as shown below:
https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/surveys/{surveyId}/messages
You must replace
{subAccountId}in the URL above with the subaccountid that you want to use.
Before you start
- You must have your account activated to use SMS Engage and at least one SMS Engage form created for you by 8x8. SMS Engage forms are created based on your use-cases. Once they are created, 8x8 will provide you a surveyid and url.
- Please note that the variable url is your default SMS Engage link which 8x8 has set up for you (e.g. http://smstoweb.net?sid=1234). The url is shortened once the message has been sent.
- The shortened url is always 21 characters in length.
- If you want to get the data via Webhooks, simply provide us a specific url where we will post the data.
- For more information please contact your account manager or customer support team.
Request
Path Parameters
Possible values: >= 3 characters and <= 50 characters, Value must match regular expression ^[A-Za-z0-9\-._&]{3,50}$
You must replace {subAccountId} with the subaccountid that you want to use. By default this is generated once you signed up with a new account at https://connect.8x8.com.
The surveyId will be provided to you by 8x8. This Id is a unique name of your SMS-to-Form which 8x8 creates based on the use-cases you defined.
Body
MSISDN (destination mobile phone number). We accept both international and national formats (for national you have to specify country in the dedicated field).
Possible values: Value must match regular expression ^\+{0,1}[1-9]{1}[0-9]{6,14}$
Optional country code of Destination number(ISO 3166-1 alpha-2), if you know it. It will help to convert number from national to international format
Possible values: >= 2 characters and <= 2 characters
Template of message to user. It should have the variable {{url:}} which is the default link set for you by 8x8
templateVariables object
variables or pre-defined fields used inside the templateBody
Source number (SenderId) - "From:" field for the SMS
Possible values: <= 16 characters
Client managed id for the message: your own unique reference
Possible values: <= 350 characters
Encoding for the text of the message
Possible values: [AUTO, GSM7, UCS2]
AUTO
Date and time when a schedule delivery of the message must happen
Date and time after which a message cannot be sent
Webhook URL where delivery status for the SMS will be posted (Overwrites your default account callback URL).
OK
Schema
Unique message id (guid) generated by 8x8 SMS platform upon message submission
Mobile phone number (MSISDN) to which the SMS was sent
Possible values: Value must match regular expression ^\+?\d{7,15}$
status objectrequired
Code for the SMS delivery status.
Possible values: [QUEUED, REJECTED]
Explanation for code.
Detected message encoding. Useful when sending initial request with encoding=AUTO
Possible values: [AUTO, GSM7, UCS2]
Your custom identifier for the message
{
"umid":"bda3d56d-1424-e711-813c-06ed3428fe67",
"clientMessageId":"1234",
"destination":"6500000000",
"encoding":"GSM7",
"status":{
"code":"QUEUED",
"description":"SMS is accepted and queued for processing"
}
}
{
"umid":"bda3d56d-1424-e711-813c-06ed3428fe67",
"clientMessageId":"1234",
"destination":"6500000000",
"encoding":"GSM7",
"status":{
"code":"QUEUED",
"description":"SMS is accepted and queued for processing"
}
}
Bad request error response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1002,
"message":"Invalid MSISDN format (not E.164 international number)",
"errorId":"b4478860-b76c-e811-814e-022a35cc1c71",
"timestamp":"2018-08-04T09:25:40.9235752+00:00"
}
Request was not authenticated response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1200,
"message":"Request was not authenticated properly",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-08-02T09:42:38.8988997+00:00"
}
Internal server error
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":2000,
"message":"Internal server error",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-07-02T09:42:38.8988997+00:00"
}
Source: https://developer.8x8.com/connect/reference/survey-send · 8x8 CPaaS Developer Docs. Synced for support deflection.
0 Comments