Send Transactional SMS
Queue an SMS directly to a phone number, for example a verification code generated by your CRM.
- The message is sent exactly as given: no merge tags are rendered, no links are rewritten or tracked, and no opt-out footer is added.
- No contact is created or looked up. Contact subscription checks are not performed. Your application is responsible for permission to message the recipient.
- Sending is billed from your workspace's SMS balance, like other SMS. The workspace must be verified and not suspended, have an available sender for the destination, and have enough balance.
- Approval required. Transactional SMS is off for new workspaces. Request access in the dashboard under SMS Marketing → Transactional; our team enables it and sets your hourly limit. Workspaces that already sent Transactional SMS stay enabled.
- Each message counts against your workspace's Transactional SMS hourly limit, counted per UTC clock hour. It is separate from the campaign and Transactional Email hourly limits.
- Logs and full message content are kept for 90 days. Daily statistics are kept permanently, independently of the logs.
- Your CRM or application must generate and check verification codes itself, including expiry, retry limits, and one-time use. This endpoint only sends the supplied message; it does not generate or verify codes. A delivery receipt is not proof that a user entered the correct code.
Use a workspace API key in the Authorization: Bearer YOUR_API_KEY header. Keep the key on your server, not in a lead form or browser. API requests share the workspace's 100-requests-per-second limit.
Endpoint
POST https://api.campaignlark.com/v1/sms/send
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
to | string | required | Destination in E.164 format, such as +14155552671. Must match ^\+[1-9][0-9]{1,14}$ and be in a supported SMS destination. |
message | string | required | Non-whitespace message, at most 1600 Unicode characters. Whitespace and all other supplied content are preserved. |
reference | string | optional | Caller-supplied reference, at most 100 Unicode characters, such as a lead ID. Returned as an empty string if omitted. This is not an idempotency key. |
Sample Request
POST https://api.campaignlark.com/v1/sms/send
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"to": "+14155552671",
"message": "Your verification code is 482691. It expires in 10 minutes.",
"reference": "lead-123"
}
Response
Success — 201 Created
{
"data": {
"id": "69b27e24be03b743d4b9b7b3",
"status": "QUEUED",
"to": "+14155552671",
"parts": 1,
"charge": "0.01250",
"reference": "lead-123",
"created_at": "2026-03-12T08:49:00Z"
}
}
The response confirms queuing, not delivery. Save id (the tracking ID, not a job or contact ID) to retrieve the message. parts is the estimated segment count and charge is a decimal string; values may be reconciled after sending. The example charge is illustrative, not a price quote. created_at is the queuing timestamp. Successful responses contain data and omit error.
Subscribe to transactional_sms.delivered and transactional_sms.failed for final delivery notifications. These are separate from sms.* events.
Errors
Application errors return 400 Bad Request with this shape:
{
"error": {
"message": "Not enough SMS balance. Top up in Billing and try again."
}
}
| Status | Message | Cause |
|---|---|---|
400 | We couldn't read the request. Please send valid JSON with to, message and an optional reference. | The request body could not be parsed. |
400 | Please provide a valid destination number in E.164 format, such as +14155552671. | to is missing or malformed. |
400 | The reference must be 100 characters or less. Shorten it and try again. | reference exceeds 100 Unicode characters. |
400 | Please provide an SMS message between 1 and 1600 characters and try again. | message is empty, whitespace-only, or too long. |
400 | We couldn't load your workspace. Please try again shortly. | The workspace could not be loaded. |
400 | This workspace is suspended. Please contact support for assistance. | The workspace is suspended. |
400 | Transactional SMS isn't enabled for this workspace. Request access on the SMS Marketing → Transactional page in the dashboard. | The workspace hasn't been approved for Transactional SMS. |
429 | You've reached your hourly limit of 100 transactional SMS. Try again after 10:00 UTC or ask support to raise it. | The Transactional SMS hourly limit would be exceeded. Nothing is charged. |
400 | Your workspace must be verified before sending SMS. Submit it for verification in the dashboard and try again. | The workspace is not approved. |
400 | We couldn't check SMS availability. Please try again shortly. | Destination availability could not be loaded. |
400 | SMS is not available for this destination. Please use a number in a supported country. | The destination is unsupported or unavailable. |
400 | No SMS sender is available for this destination. Check your SMS sender settings or contact support. | A sender/provider could not be resolved. |
400 | We couldn't calculate the SMS price. Please try again shortly. | A price could not be quoted. |
400 | We couldn't calculate the SMS charge. Please try again shortly. | The total charge could not be calculated. |
400 | Not enough SMS balance. Top up in Billing and try again. | Insufficient SMS balance. |
400 | We couldn't charge your SMS balance. Please try again shortly. | The debit failed for another reason. |
400 | We couldn't queue your SMS. Your SMS balance has been refunded. Please try again. | Queuing failed, the job was stopped, and the debit was refunded. |
400 | We couldn't queue your SMS. Your balance refund is pending; please contact support before retrying. | Queuing or compensation could not be completed safely. Contact support before retrying. |
401 | Please provide a valid API key in the Authorization header. | No API key supplied. |
401 | The API key you provided is invalid or has been revoked. | Invalid or revoked API key. |
403 | Your IP address is not authorized to use this API key. | The request IP is outside the key's allowlist. |
429 | You have exceeded the rate limit of 100 requests per second. Please try again later. | The workspace API rate limit was exceeded. |
Application errors omit data. Authentication and IP-allowlist failures use {"success": false, "message": "..."} rather than the application error envelope above. Rate-limit errors use the application error envelope.
Do not automatically resend after an uncertain response: each successful request creates a new message, even with the same reference. If the queue-failure refund-pending error is returned, contact support before retrying.