ANTS API SPECIFICATION
English v1.0.0
English v1.0.0
  • INTRODUCTION
  • ACCOUNT
  • SMS
    • Send Message
    • Callback Delivery Report
    • Message Logs
    • Preview Message
    • Sender List
    • Status and Error codes
  • OTP (One Time Password)
  • SMS 2 WAY Interactive
Powered by GitBook
On this page

Was this helpful?

  1. SMS

Preview Message

Avoid unpleasant surprises and check how different message configurations will affect your message text, number of characters and message parts.

PreviousMessage LogsNextSender List

Last updated 4 years ago

Was this helpful?

You can check the amount of credits before actual sending SMS; this API function allows you easily calculate the total credits spending, also adjusting the message text to be aligned with cost.

Sequence Diagram

You can start creating HTTP request as this following:

Header

Description

HTTP Request (URL)

HTTP Headers

Content-Type: application/json

Authorization: (Basic Auth) Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

HTTP Methods

POST

Parameter

Type

Description

message

String

tText of the message that would be used to send.

The request will look like

{
"message": "Let's see how many characters will remain unused in this message."
}

Response

Parameter

Type

Description

originalMessage

String

Original message that would like to preview

credit

Number

SMS credit usage.

character

String

How many characters are left ‘unspent’ in the message and if the message fits in one or more messages.

The JSON response will look like:

{
"originalMessage": "Let's see how many characters will remain unused in this message.",
"credit":  "1.00",
"character": 65
}

You must input at least 1 parameter. In this case; there is only "message"

❗
https://api-service.ants.co.th/sms/preview
Sequence Diagram (API Preview)