Skip to main content
POST

Authorizations

X-API-Key
string
header
required

Body

application/json

SMS request that needs to be sent.

to
string
required

The recipient's phone number in E.164 format.

Example:

"+16315551111"

text
string
required

The text of this message.

Example:

"Your verification code is 123456."

senderId
string

Sender ID to be used.

Example:

"Brand"

signature
string

This parameter is only required for Chinese mainland SMS messages. You must specify an approved signature such as Brand. It will be added to the beginning of SMS body and wrapped with 【】, e.g. 【Brand】Your verification code is 123456.

Example:

"Brand"

externalId
string

A unique (recommended) string to reference the object. This can be an order number or similar, and can be used to reconcile the object with your internal systems.

callbackUrl
string

Delivery report URL. You can provide a URL, and we will push the updated status report to your server in time. e.g., https://httpbin.org/anything?tag=api. Note: We recommend configuring Webhook Endpoints instead.

Example:

"https://httpbin.org/anything?tag=api-sms"

Response

200 - application/json

The request is successfully accepted.

id
string
required

Unique ID for the object.

Required string length: 6 - 128
to
string
required

The recipient's phone number in E.164 format.

Example:

"+16315551111"

text
string

The text of this message.

Example:

"Your verification code is 123456."

senderId
string

Sender ID to be used.

Example:

"Brand"

regionCode
string
totalSegments
integer<int32>

Number of message segments. See SMS character encoding for more info.

Required range: x >= 1
Example:

1

totalPrice
number<double>

Total price of this message.

Example:

0.0085

currency
string

Price currency. ISO 4217 currency code.

Example:

"USD"

status
enum<string>

Delivery status. One of accepted, sent, delivered, undelivered, or failed.

  • accepted: The messaging request is accepted by our system.
  • failed: The message failed to be sent from our system.
  • sent: The message has been sent from our system.
  • delivered: Our system has received a delivery receipt indicating that message is delivered.
  • undelivered: Our system has received a delivery receipt indicating that message is not delivered.
Available options:
accepted,
failed,
sent,
delivered,
undelivered
Example:

"sent"

errorCode
string

Error code when the message is undeliverable.

createTime
string<date-time>

The time at which this message was created, formatted in RFC 3339. e.g., 2022-03-01T12:00:00.000Z.

Example:

"2022-03-01T12:00:00.000Z"

updateTime
string<date-time>

The time at which the delivery report for this message was updated, formatted in RFC 3339. e.g., 2022-03-01T12:00:00.000Z.

Example:

"2022-03-01T12:00:00.000Z"

externalId
string

A unique (recommended) string to reference the object. This can be an order number or similar, and can be used to reconcile the object with your internal systems.

callbackUrl
string

Delivery report URL. You can provide a URL, and we will push the updated status report to your server in time. e.g., https://httpbin.org/anything?tag=api. Note: We recommend configuring Webhook Endpoints instead.

Example:

"https://httpbin.org/anything?tag=api-sms"

bizType
string

This can be either empty or one of sms, or verify. Defaults to sms.

  • sms: Indicates that the message is sent via the SMS product.
  • verify: Indicates that the message is sent via the Verify product.
Example:

"sms"

verificationId
string

The verification ID. Included only when bizType is verify.

Example:

"VERIFICATION-ID"