SMS Outbound API

Single SMS

API Documentation

Senest redigeret:

Introduction

An Outbound SMS represents a single text message sent.

Properties

Name

Type

Mandatory

Example

Description

msisdn

STRING

YES

4512345678

Phone with Country Code (wiki on Country Code) with 1-3 digits reserved for country code without prefixes, such as 00 (wiki on MSISDN).

text

STRING

YES

 

The text message to be sent

externalId

STRING

NO

 

 

callbackUrl

STRING

NO

 

The URL receiving callbacks

callbackVerbosity

STRING

-

“ALL”,
“Delivered”,
“DeliveryFailed”

The type of callbacks.

shortenLink

STRING

NO

 

JSON object configuring the shortened link

Endpoints

POST /SendSms

Send a single text message.

Request

The following can be provided as the request body:

{
  "channel": "1217",
  "senderAlias": "1217",
  "serviceId": "single_sms",
  "msisdn": "4512345678",
  "text": "test-text1 {{abcd}} end",
  "externalId": "ext-id-1",
  "callbackUrl": "http://callback.url.tld",
  "callbackVerbosity": "Delivered",
  "shortenLink": {
    "shortLinkDomain": "kortl.ink",
    "urls": [
      {
        "placeholder": "{{abcd}}",
        "url": "https://onlinefundraising.dk"
      }
    ]
  }
}

 

Response

HTTP

Description

200

OK

400

Bad request

 

POST /SendSms

Send a single text message.

A senderToken must be specified. The token is used to verify that the calling organisation is eligible for sending messages through this endpoint, and contains “channel” and “senderAlias” information.

Contact OnlineFundraising Support if you are in need of a senderToken, and want to set one up.

Request

The following can be provided as the request body:

{
  "msisdn": "4512345678",
  "text": "test-text1 end"
}

 

Response

HTTP

Description

200

OK

400

Bad request