SMS API
Outbound SMS and message history. Dual auth: Bearer or dashboard session.
- GET
/smsList SMS messages - POST
/sms/sendSend an SMS - GET
/sms/statsSMS stats - GET
/sms/opt-outsList SMS opt-outs - POST
/sms/opt-outsSuppress a number - GET
/sms/{id}Get a message
GET /sms
List SMS messages
Auth: API key (Authorization: Bearer). Scope: sms:read.
Requires one of the following scopes: sms:read.
Returns outbound and inbound messages together. Each item carries a direction field (outbound | inbound); inbound messages are stored delivered on receipt. Outbound messages suppressed by the opt-out register are stored with status blocked and never reach a carrier.
Session authentication also works for browser (dashboard) contexts; this operation documents the Bearer path.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Max items to return (1-100). Default |
offset | query | integer | Number of items to skip. Default |
status | query | string | Filter by message status. An unrecognised value is ignored rather than rejected. One of: |
source | query | string | Filter by message source. An unrecognised value is ignored rather than rejected. One of: |
date_from | query | string (date) | Start date, |
date_to | query | string (date) | End date, |
phone | query | string | |
direction | query | string | Filter by message direction. Omit to return both — the log is a two-way conversation history, not a send log. An unrecognised value is ignored rather than rejected. One of: |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.messages | array of object | |
data.total | integer | |
data.limit | integer | |
data.offset | integer |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Not permitted. The auth envelope is returned when the API key lacks the required scope (INSUFFICIENT_SCOPE), or the organization is unavailable or suspended (ORG_UNAVAILABLE, ORG_SUSPENDED). The standard envelope with code forbidden is returned when SMS is not included in the organization’s plan or is not available for the organization.
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
503 SMS is switched off platform-wide (SMS_DISABLED). The platform kill switch stays closed until A2P 10DLC brand registration completes; no SMS route responds while it is off, regardless of plan.
POST /sms/send
Send an SMS
Auth: API key (Authorization: Bearer). Scope: sms:write.
Requires one of the following scopes: sms:write.
Sends are checked against the organization’s opt-out register first. A recipient who has replied STOP is refused with 409 Conflict and the message is recorded with status blocked; it is never handed to a carrier. Clearing that suppression is not possible over the API — see POST /sms/opt-outs.
Session authentication also works for browser (dashboard) contexts; this operation documents the Bearer path. A session caller must send a CSRF token (X-CSRF-Token header or csrf_token body field) and be an organization owner or admin.
Request body application/json required
| Field | Type | Description |
|---|---|---|
to | string required | Recipient number in E.164 format, for example pattern |
message | string required | Message text. At most 1600 characters. min length 1 · max length 1600 |
sender_id | string | 1 to 11 letters or digits. pattern |
metadata | object | Free-form object. At most 4096 bytes when encoded as JSON. Accepts any keys |
Responses
201 Message sent
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.to | string | |
data.status | string | Always Always |
data.provider | string | null | Carrier route the message took. A One of: |
data.provider_message_id | string | null | Provider-side message id, whichever provider handled the send. Prefer this over |
data.sns_message_id | string | null | Deprecated — retained for callers written against the SNS-only era. It is deprecated |
data.segments | integer | Number of message segments. The carrier’s count is used when it reports one. |
data.created_at | string (date-time) | Time the response was built. |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Not permitted. The auth envelope is returned when the API key lacks the required scope (INSUFFICIENT_SCOPE), or the organization is unavailable or suspended (ORG_UNAVAILABLE, ORG_SUSPENDED). The standard envelope with code forbidden is returned when SMS is not included in the organization’s plan or is not available for the organization. A session caller with an invalid CSRF token also gets forbidden.
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
409 Recipient has opted out of messages from this organization. The message is recorded with status blocked and not transmitted.
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
503 SMS is switched off platform-wide (SMS_DISABLED). The platform kill switch stays closed until A2P 10DLC brand registration completes; no SMS route responds while it is off, regardless of plan.
GET /sms/stats
SMS stats
Auth: API key (Authorization: Bearer). Scope: sms:read.
Requires one of the following scopes: sms:read.
All counters are direction-scoped: sent/delivered/failed/blocked cover outbound traffic only, and inbound traffic is reported separately as total_received.
Session authentication also works for browser (dashboard) contexts; this operation documents the Bearer path.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
date_from | query | string (date) | Start date, |
date_to | query | string (date) | End date, |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.total_sent | integer | Outbound messages handed to a carrier, regardless of delivery outcome. Excludes |
data.total_delivered | integer | Outbound messages confirmed delivered by the carrier. |
data.total_failed | integer | Outbound messages the carrier rejected or failed to deliver. |
data.total_blocked | integer | Outbound messages the platform refused to transmit because the recipient had opted out. Not a delivery failure. |
data.total_received | integer | Inbound messages received from contacts, including STOP, START and HELP replies. |
data.total_segments | integer | Billable segments. Outbound only — inbound messages are not billed. |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Not permitted. The auth envelope is returned when the API key lacks the required scope (INSUFFICIENT_SCOPE), or the organization is unavailable or suspended (ORG_UNAVAILABLE, ORG_SUSPENDED). The standard envelope with code forbidden is returned when SMS is not included in the organization’s plan or is not available for the organization.
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
503 SMS is switched off platform-wide (SMS_DISABLED). The platform kill switch stays closed until A2P 10DLC brand registration completes; no SMS route responds while it is off, regardless of plan.
GET /sms/opt-outs
List SMS opt-outs
Auth: API key (Authorization: Bearer). Scope: sms:read.
Requires one of the following scopes: sms:read.
The organization’s suppression register. Full phone numbers are stored encrypted and are never returned — entries expose the last four digits only.
Session authentication also works for browser (dashboard) contexts; this operation documents the Bearer path.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | Defaults to One of: |
limit | query | integer | Max items to return (1-100). Default |
offset | query | integer | Number of items to skip. Default |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.opt_outs | array of object | |
data.opt_outs[].id | integer | |
data.opt_outs[].phone_last_four | string | null | Last four digits only. The full number is stored encrypted and is never returned. |
data.opt_outs[].status | string | One of: |
data.opt_outs[].keyword | string | null | Keyword that triggered the record, e.g. |
data.opt_outs[].source | string | How the record was created. One of: |
data.opt_outs[].opted_out_at | string (date-time) | null | |
data.opt_outs[].opted_in_at | string (date-time) | null | |
data.opt_outs[].created_at | string (date-time) | |
data.opt_outs[].updated_at | string (date-time) | null | |
data.total | integer | |
data.limit | integer | |
data.offset | integer |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Not permitted. The auth envelope is returned when the API key lacks the required scope (INSUFFICIENT_SCOPE), or the organization is unavailable or suspended (ORG_UNAVAILABLE, ORG_SUSPENDED). The standard envelope with code forbidden is returned when SMS is not included in the organization’s plan or is not available for the organization.
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
503 SMS is switched off platform-wide (SMS_DISABLED). The platform kill switch stays closed until A2P 10DLC brand registration completes; no SMS route responds while it is off, regardless of plan.
POST /sms/opt-outs
Suppress a number
Auth: API key (Authorization: Bearer). Scope: sms:write.
Requires one of the following scopes: sms:write.
Honours an opt-out that arrived somewhere other than an inbound STOP — a phone call, an email, a web form, an imported list. Idempotent.
There is deliberately no delete or opt-in operation. Clearing a suppression is the one direction that can put the platform back in touch with someone who said STOP, and an API caller cannot evidence the fresh consent that would make that lawful. Re-subscription happens only when the contact texts START from their own handset.
Session authentication also works for browser (dashboard) contexts; this operation documents the Bearer path. A session caller must send a CSRF token (X-CSRF-Token header or csrf_token body field) and be an organization owner or admin.
Request body application/json required
| Field | Type | Description |
|---|---|---|
phone | string required | Recipient number in E.164 form, e.g. Example |
keyword | string | Recorded for audit. Upper-cased and truncated to 32 characters. Default |
Responses
201 Number suppressed. Idempotent — re-suppressing an already-suppressed number succeeds.
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.phone_last_four | string | |
data.status | string | Always |
data.keyword | string | |
data.source | string | One of: |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Not permitted. The auth envelope is returned when the API key lacks the required scope (INSUFFICIENT_SCOPE), or the organization is unavailable or suspended (ORG_UNAVAILABLE, ORG_SUSPENDED). The standard envelope with code forbidden is returned when SMS is not included in the organization’s plan or is not available for the organization. A session caller with an invalid CSRF token also gets forbidden.
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
500 The suppression was not recorded (OPT_OUT_NOT_RECORDED). Treat as a failure and retry — the register does not hold the opt-out.
503 SMS is switched off platform-wide (SMS_DISABLED). The platform kill switch stays closed until A2P 10DLC brand registration completes; no SMS route responds while it is off, regardless of plan.
GET /sms/{id}
Get a message
Auth: API key (Authorization: Bearer). Scope: sms:read.
Requires one of the following scopes: sms:read.
Session authentication also works for browser (dashboard) contexts; this operation documents the Bearer path.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Message id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | Accepts any keys |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Not permitted. The auth envelope is returned when the API key lacks the required scope (INSUFFICIENT_SCOPE), or the organization is unavailable or suspended (ORG_UNAVAILABLE, ORG_SUSPENDED). The standard envelope with code forbidden is returned when SMS is not included in the organization’s plan or is not available for the organization.
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
503 SMS is switched off platform-wide (SMS_DISABLED). The platform kill switch stays closed until A2P 10DLC brand registration completes; no SMS route responds while it is off, regardless of plan.
Ready to build on Vosy?
API access is included with the Business and Enterprise plans. Sign up, choose a plan with API access, and create your own keys from the Vosy API page in your account. Compare plans
Get Started