Access
HTTP Basic Authentication basic
Endpoints
https://[dialoghealth-server]/dialoghealth-simplepay-api/
Silent opt-in and message delivery
submit
POST /submit/{console-code}
Parameters
Path Parameter
{console-code} | A unique set of letters and numbers automatically assigned to each console upon creating | X | XXXXXX1234 |
Query Parameters
To | Receiver’s MSISDN | X | 16153232123 |
From | Sender’s MSISDN | X | 18052849243 |
Body | Message to be sent | X | Text |
StatusCallback | Callback URL | - |
Return Type
SubmitResponseBody
Content Type
application/json
Responses
200 | - | SubmitResponseBody |
400 | - | SubmitResponseBody |
Samples
Sample curl command to send request
1$ curl -u {username}:{password} -X POST https://[dialoghealth-server]/dialoghealth-simplepay-api/submit/XXXXXX1234 \ 2 --data-urlencode "Body=Message text" \ 3 --data-urlencode "From=18052849243" \ 4 --data-urlencode "To=14153755156"
Sample response body
1{ 2 "sid": "2721Z-0622U-14171-480RH", 3 "date_created": "2021-06-22@14:17:48.095+0000", 4 "date_updated": "2021-06-22@14:17:48.095+0000", 5 "date_sent": "2021-06-22@14:17:48.095+0000", 6 "accunt_sid": "WEBMAG6745", 7 "to": "14153755156", 8 "from": "18052849243", 9 "messaging_service_sid": null, 10 "body": "Message text", 11 "status": "queued", 12 "num_segments": "1", 13 "num_media": "0", 14 "direction": "outbound-api", 15 "api_version": "15.1", 16 "price": null, 17 "price_unit": "USD", 18 "error_code": null, 19 "error_message": null, 20 "uri": "/dialoghealth-simplepay-api/messages/XXXXXX1234/2721Z-0622U-14171-480RH" 21}
Silent opt-out
optout
DELETE /dialoghealth-simplepay-api/optout/{console-code}/{MSISDN}
Parameters
Path Parameter
{console-code} | A unique set of letters and numbers automatically assigned to each console upon creating | X | XXXXXX1234 |
{MSISDN} | Phone number to be opted-out from receiving the message | X | 18052849243 |
Return Type
OptoutResponseBody
Content Type
application/json
Responses
200 | - | OptoutResponseBody |
Samples
Sample curl command to send request
1$ curl -u {username}:{password} -X DELETE https://[dialoghealth-server]/dialoghealth-simplepay-api/optout/WEBMAG6745/18052849243
Sample response body
1{ 2 "msisdn": "Recipient not found" 3}
Get message details
messages
GET /dialoghealth-simplepay-api/messages/{console-code}/{MessageID}
Parameters
Path Parameter
{console-code} | A unique set of letters and numbers automatically assigned to each console upon creating | X | XXXXXX1234 |
{MessageID} | Id of the existing message | X | 2721Z-0622U-14171-480RH |
Return Type
MessageResponseBody
Content Type
application/json
Responses
200 | - | MessageResponseBody |
Samples
Sample curl command to send request
1$ curl -u {username}:{password} -X DELETE https://[dialoghealth-server]/dialoghealth-simplepay-api/messages/WEBMAG6745/2721Z-0622U-14171-480RH
Sample response body
1{ 2 "extMessageReference": "2721Z-0622U-14171-480RH", 3 "body": "Message text", 4 "to": "14153755156", 5 "status": "UNKNOWN" 6}
Models
SubmitResponseBody
error_message | String | Message in case of bad request | Msisdn is invalid: 1455156 |
date_updated | String | When the message was updated | 2021-06-22@14:17:48.095+0000 |
date_sent | String | When the message was sent | 2021-06-22@14:17:48.095+0000 |
date_created | String | When the message was created | 2021-06-22@14:17:48.095+0000 |
body | String | Text of the message | Text |
api_version | String | Version of the API | 15.1 |
num_segments | String | Number of the message segments | 1 |
uri | String | URI of the message details (see messages) | /dialoghealth-simplepay-api/messages/WEBMAG6745/2721Z-0622U-14171-480RH |
sid | String | Unique ID of the message | 721Z-0622U-14171-480RH |
num_media | String | Number of media attached | 0 |
price_unit | String | Currency string | USD |
messaging_service_sid | String | Unique ID of the messaging service | null |
accunt_sid | String | Console code used | SIDJUL8079 |
price | String | Price | null |
from | String | MSISDN of the sender | 18052849243 |
error_code | String | Error code | null |
to | String | MSISDN of the recipient | 18052849243 |
status | String | Status of the message | queued |
direction | String | Directions | outbound-api |
OptoutResponseBody
msisdn | String | MSISDN opted-out from receiving the message | 14153755156 |
MessageResponseBody
to | String | MSISDN of the recipient | 18052849243 |
body | String | Text of the message | Text |
extMessageReference | String | Id of the message | 2721Z-0622U-14171-480RH |
status | String | Status of the message | queued |