patch https://examplebaseURL.com/v1/api/apps//outbound-sms-event-sub
Response Format
Parameter | Type | Description |
---|---|---|
enabled | boolean | It must be true or false. True indicates the subscription is successful, while false indicates it is unsuccessful. |
url | String | The webhook URL. In access to this URL, you can receive the notification of the outbound SMS message when sent from Cinnox. For details, please refer to the Notification of the New Outbound SMS Message. |
updatedAt | String | The updated date and time of this subscription. The value must be in RFC3339 format, e.g. 2022-11-07T00:00:00.000Z. |
Notification of Outbound SMS Message
You can receive the notification of the new outbound SMS message by accessing the webhook URL after subscribing to the event of the Outbound SMS message.
Notification Details | Type | Description |
---|---|---|
Type | String | In this case, the result must be "tdr" (Transaction Detail Record). |
AppID | String | Your AppID is using this open API endpoint. |
ServiceID | String | Your CINNOX service ID. |
TransactionID | String | The SMS ID of this outbound SMS message. |
RecipientNumber | Number | The SMS number of the recipient. The format is "Country code + phone number". Example: 85298765432. |
RecipientCountry | String | The location of the SMS recipient. The result is shown in the following format: (Country represented by Two-letter country code based on ISO 3166-2) Example: VE =Venezuela. |
ResponseCode | String | It must be either blank when the status is either "Submitted" or "Delivered" or 400 when the status is either "Undelivered" or "Rejected". |
Status | String | It shows the status of the outbound SMS message. It can be one of the following statuses: - Submitted: The SMS has been submitted to the Carrier. - Delivered: The Carrier has successfully delivered the SMS to the recipient. - Undelivered: The Carrier did not successfully deliver the SMS to the recipient. - Rejected: The Carrier has rejected the SMS. |
Exception | String | It shows whether or not it is an error SMS message. If it is blank, the SMS message has no error, while it shows either "sms send failed" or "sms deliver failed" if it is an error message. |
Webhook URL Requirement:
The webhook URL needs to be verified. After that, you will get a POST request with an Action and are required to set the response in JSON Response Format as shown below:
Note that the JsonResponse result is JSON encoding of the Action Endpoint Response.
Action Endpoint Request {
+ Challenge string json: "challenge"
+ }Action Endpoint Response {
+ Challenge string json: "challenge"
+ }Json Response {
+ Code int json: "code"
+ Result json.RawMessage json: "result"
+ }