Skip to main content

What it is

The SMS API sends a text message to one phone number. Use it for notifications, alerts, transactional updates, and other text-based communication.

Before you begin

  • Store your YCloud API key in YCLOUD_API_KEY.
  • Format the recipient number in E.164 format.
  • Register an approved senderId when the destination requires one.
  • Provide an approved signature for messages sent to mainland China.

How it works

Send the message with POST /sms. A successful response means YCloud accepted the request. It does not guarantee final delivery. YCloud updates the message from accepted to a later status such as sent, delivered, undelivered, or failed. Receive these changes through the sms.message.updated Webhook or retrieve SMS records with GET /sms.

Request

POST /sms

Request fields

Example request

Response

A successful response returns the created SMS object. Store its id to correlate delivery updates and retrieve the message later.

Example response

Response fields

Delivery status

Subscribe to sms.message.updated for outbound status changes. Subscribe to sms.inbound.received if your account receives SMS replies. Use GET /sms to reconcile records by creation time or message ID.

Limits and troubleshooting

  • Sender ID availability and content rules vary by destination.
  • Long messages may use multiple SMS segments and cost more.
  • Do not retry an accepted request without an idempotency strategy. A repeated request can send a duplicate message.
  • Use the returned id and externalId when investigating a delivery issue.