v1

latestOpenAPI 3.0.22026-07-2432112226.7 KB
Sandbox - SMS Notifications and Promotions

Sandbox - Send SMS V2

SMS OTP version change is by introducing a new API version release.<br>

Version changes usually need to be applied immediately to the latest version, in order to get a better API usage experience than the previous version.<br>

The benefits you get if you use a newer version are as follows.

  • Decreasing processing time in API Request and Response
  • Improve feature in SMS: Blocking Request, Spam Check, Sequential Phone Number, and Blocked Numbers
  • Increase RPS in SMS (before 30rps to 50rps)
  • Better developer environment to support future developments
  • Improve logging and monitoring on our side
  • Improved dependencies and improved service stability<br>

This method helps you to send sms containing desired text to destination number<br>

The following table describes the msisdn option to be used as an input<br>

MsisdnDescriptionResponse
6282123060001Valid Phone number201 "SMS sent successfully"
6282123060002Msisdn invalid400 "Msisdn invalid: msisdn length should between 4-16 characters"
6282123060003Invalid Header401 "Authorization failed"
6282123060004insufficient quota403 "testing quota is insufficent"
6282123060005Blocked Msisdn409 "Msisdn invalid: msisdn has been blocked"
6282123060006Too Many Request429 "Too many request in the allowed time frame"
post/v2/sms/send/sandbox

Headers

app-idstring required
api-keystring required

Request body

msisdnstring required

Destination Phone Number. You need to include international prefix number.

textstring required

SMS Body

premiumboolean

used for Transactional SMS (Text Message from Business to Customer that provides valuable information about their product, service or processes) or OTP with better Network Connections

callback_urlstring

Optional. This URL will be called by the server when the desired event will occur. Callback will work if you use premium route

Example request

{
  "msisdn": "6282123060001",
  "text": "This is text example",
  "premium": true,
  "callback_url": "https://your-url-callback.com"
}

Response

Successful Response

messagestring required

Message

{"stackTrail":"components:schemas:ResponseSendSms:properties:msisdn","oasType":"schema","type":"unknown","description":"destination number with international prefix country code.","example":6282123060001}
session_idstring required

Generated ID which associated with verification request.

segment_countinteger

Shows segmentation SMS where SMS with over 160 characters will be split into more than 1 segment.

Example response

{
  "message": "SMS sent successfully",
  "msisdn": 6282123060001,
  "session_id": "asddede-asdae234-34sfd3-fe234d",
  "segment_count": 2
}