DH Send SMS API

DH Send SMS API

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

Name

Description

Required

Pattern

{console-code}

A unique set of letters and numbers automatically assigned to each console upon creating

X

XXXXXX1234

Query Parameters

Name

Description

Required

Pattern

To

Receiver’s MSISDN

X

16153232123

From

Sender’s MSISDN

X

18052849243

Body

Message to be sent

X

Text

StatusCallback

Callback URL

-

http://requestb.in/1234abcd

Return Type

SubmitResponseBody

Content Type
  • application/json

Responses

Code

Message

Datatype

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

Name

Description

Required

Pattern

{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

Code

Message

Datatype

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

Name

Description

Required

Pattern

{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

Code

Message

Datatype

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

Field Name

Type

Description

Format

Field Name

Type

Description

Format

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

Field Name

Type

Description

Format

msisdn

String

MSISDN opted-out from receiving the message

14153755156

MessageResponseBody

Field Name

Type

Description

Format

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


Note - The Dialog Health Send SMS API supports up to 20 SMS segments per message. 

    • Related Articles

    • DH Persons-Events-Subscription Status Rest API

      Description API allows importing of person and event data immediately to the Dialog Health platform as well as the ability to manage subscription status. Please note: API use is restricted to 250 requests per hour. Access HTTP Basic Authentication ...
    • DH Trigger SMS API

      Introduction Trigger is a message to one particular person which can be set up for a client and sent on demand as API call. The trigger works only for known patients/employees, who are already registered in Dialog Health database. Triggers can be ...
    • DH Patient and Appointment REST XML API

      Access HTTP Basic Authentication basic Endpoints https://[dialoghealth-server]/dh-integration/rest/ Import Patients' data POST /import/protocall/authbase/{CONSOLE-CODE} Content Type application/xml; charset=utf-8 Parameters Request Body - XML ...
    • DH Message Results Writeback API

      DH Message Results Writeback API Access · HTTP Basic Authentication basic Endpoints https://[dialoghealth-server]/dialoghealth-writeback-api/ ApiController responses GET /api/responses/{consoleCode}/{startTimestamp}/{endTimestamp} Parameters Path ...
    • DH Patient & Visit SOAP API Specifications

      Endpoints http://[dialoghealth-server]/dialoghealth-source-api/soap/DataShare http://[dialoghealth-server]/dh-integration/soap/DataShare Target namespace: https://www.dialoghealth.com/ DataShareSoapBinding getReturnCodeStr POST /GetReturnCodeStr ...