Text Messages
Before You Start
You need to meet all the prerequisites listed in the Before You Start section of the documentation.
Constraints:
- A text message can be a max of 4096 characters long.
Step 1: Make POST Request
Payload
{
"messages": [
{
"sender": "918010XXXXXX",
"to": "919999XXXXXX",
"messageId": "xxxxx",
"transactionId": "",
"type": "text",
"callbackDlrUrl": "http://xxx.com",
"channel": "wa",
"text": {
"content": "Welcome to Sinch!"
}
}
]
}
Step 2: Check Your Response
The response example shows a sample response from the API request: Possible elements in responses includes,
- Success Response
Payload
{
"success": true,
"responseId": "1606887827245734233232332"
}
- An unsuccessful response contains an error message. See Error and Status Codes for more information.
Note : Calback URL is a optional paramter . Please use when you want to change the default URL(configured through smartta). It will only chnage the domain name othere paratemters will be same as configurated in smartta.