Mailrelay API Reference

Send SMS to one or more recipients

POST https://{account}/api/v1/sms/send

Authentication

Requires an API key sent in the X-AUTH-TOKEN header.

This method can be used to send SMS to one or more recipients.

The response will return an array with the details of each SMS including the ID, which can be used to verify the status later.

Parameters

NameTypeRequiredDescription
to array Yes Array of phone numbers in E.164 format (e.g., +1234567890)
sender_name string Yes Sender name
message string Yes Message

Responses

StatusDescription
201 Success
400 The request is invalid. Check if the field names in the request and the request data is valid.
422 A validation error occurred. Check the response body for more information.
401 The API key wasn't sent or is invalid
429 Too many requests. You have exceeded the rate limit, wait and try again later.
500 An internal error happened. Try again later.

Response fields

NameTypeDescription
id integer Id
subscriber_id integer Subscriber
phone string Phone
created_at string Created at