Developers – API Send Single SMS

Get Started

This REST API will allow sending a single SMS towards a mobile phone destination in any country in the world.

  • REST POST Method: Send single SMS messages using API POST Method. HTTP Basic Authentication and HTTPS encription are used.

POST Requirements

  • Host and End-point: Please ask Kaarai’ Support team for production values.
  • Authentication: Standard HTTP Basic Authentication («user» : «password» encoded using Base64).
  • Encoding: UTF-8 unicode characters.
  • Accepts: «application/json»
  • Required headers: «Content-Type – application/json»
  • Required headers: «Authorization: Basic xxxxxxxxx»
  • Responses: «application/json»

POST Inputs

This information must be provided in JSON format in the Body section:

Parameter

Type

Required

Description

Example

«to»

String

Mandatory

Number of the mobile user that is going to

receive the SMS message. Must include the

Mobile International Country Code (MCC).

«573xxxxxxxxx»

«from»

String

Optional

Number of the Sender ID that is sending the

SMS message. If the User is not allowed to

provide a Sender ID, a default number will be

provided. If the User will need a Dedicated

Short Code, please contact the Sales team.

«8xxxx»

«text»

String

Mandatory

Text to be send as body in the SMS message.

«Your OTP code is xxxx»

POST Example

POST Method request:

POST Curl request:

POST Responses

Response

Description

Extended Information

202

(Accepted)

The SMS message was accepted for

delivery.

Return «Code 2020: Accepted for delivery»

Return «Code 2021: Queued for later delivery»

400

(Bad

Request)

ERROR: Missing input parameters

or invalid values.

Return «Code 4000: Invalid content-type: xxx» in the

case a different content from »application/json»

is being used.

Return «Code 4001: Missing receiver number, rejected»

Return «Code 4002: Missing text message, rejected»

Return «Code 4003: Invalid receiver number, rejected»

403

(Forbidden)

ERROR: The User/Password

combination is invalid.

Return «Code 4030: Authorization failed for user: xxx»

403

(Forbidden)

ERROR: Destination invalid or

blocked.

Return «Code 4031: Not routable. Do not try again»

404

(Not Found)

ERROR: The requested URL in the

POST method invocation is invalid.

Return «Code 4040: Unknown request»

503

(Service

Unavailable)

ERROR: Internal error.

Return «Code 5030: Temporal failure, try again later»

Response Example

Positive Response:

Error Response:

Let us help you !