Request Delivery Status Information with Client Reference

  1. Home
  2. Documenti
  3. Developers
  4. Example
  5. Request Delivery Status Information with Client Reference

Request Delivery Status Information with Client Reference

Request

POST /outbound/sms HTTP/1.1
Host: api.engy.solutions
Accept: application/json
Content-Type: application/json
Content-Length: 158
X-Api-Key: YOUR-API-KEY

{
    "from": "Buddy Holly",
    "to": 491712345678,
    "receiveDeliveryStatus": true,
    "refId": "My-Reference-Id-1234",
    "text": "Hi Bro, whats up?"
}

Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 83

{
    "statusCode": 0,
    "messageIds": ["854873a6-74ad-435a-ab1a-670e6207fd5b"]
}

Callback

Given a callback template defined in your account, like this:

https://myapi.example.com/dlr?msgId={MessageId}&state={MessageState}&to={To}&from={From}&received={ReceivedDateTime}&ref={ClientReference}

The following GET URL will be called if new delivery states are available:

GET /dlr?msgId=854873a6-74ad-435a-ab1a-670e6207fd5b&state=DELIVERED&to=Buddy%20Holly&from=4&received=2018-03-10T17%3A23%3A15Z&ref=My-Reference-Id-1234
Host: myapi.example.com

Hai trovato utile questo articolo? No

Come possiamo aiutarti?