Skip to content

Send an SMS notification directly without templates

POST
/sms

Request body for POST /sms (send SMS without a template).

object
type
required

The notification type to send.

string
to
required

The phone number of the recipient.

string
message
required

The message of the SMS notification.

string
schedule

The ISO 8601 datetime to schedule the SMS notification.

string
from

Override the sender phone number. Must be a verified number in your Telnyx account.

string
autoReply
object
message
required

Auto-reply message to send when user texts in.

string

Successful response

Any of:

Success response for POST /sms.

object
trackingId
required
string
messages
required
Array<string>

Bad Request - validation errors, invalid input

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
provider

Provider that caused the error (e.g. telnyx, ses).

string
providerCode

Provider-specific error code.

string

Unauthorized

Payment Required - usage limits exceeded

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
provider

Provider that caused the error (e.g. telnyx, ses).

string
providerCode

Provider-specific error code.

string

Internal Server Error

Bad Gateway - provider error

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
provider

Provider that caused the error (e.g. telnyx, ses).

string
providerCode

Provider-specific error code.

string