Skip to content

SMS API

Send SMS messages and manage inbound keywords. Pay-as-you-go pricing.

Endpoints

MethodPathDescription
POST/v1/sms/sendSend SMS
GET/v1/sms/messagesList messages
GET/v1/sms/messages/{message_id}Get message
POST/v1/sms/messages/{message_id}/cancelCancel scheduled message
GET/v1/sms/sender-profilesList sender profiles
POST/v1/sms/sender-profilesCreate sender profile
DELETE/v1/sms/sender-profiles/{profile_id}Delete sender profile
GET/v1/sms/statusGet service status
GET/v1/sms/usageGet SMS usage for billing
GET/v1/sms/statsGet SMS statistics

POST /v1/sms/send

Send SMS

Send SMS message(s) to one or more recipients.

Recipients: Specify at least one of:

  • to: List of phone numbers (E.164 format, e.g., +4799999999)
  • to_contacts: List of contact UUIDs from your contact directory
  • to_groups: List of contact group UUIDs

Message Length:

  • GSM-7 (standard): 160 chars = 1 SMS, then 153 chars per part
  • Unicode (emoji, etc.): 70 chars = 1 SMS, then 67 chars per part
  • Max 1600 chars (10 parts)

Scheduling:

  • Use scheduled_at for future delivery (ISO 8601 format, max 30 days ahead)
  • By default, scheduled_at is interpreted as UTC
  • Use timezone parameter to specify local time (IANA format, e.g., "Europe/Oslo")
  • Scheduled messages can be cancelled using POST /messages/{id}/cancel

Delivery Reports: Provide callback_url (HTTPS) to receive status webhooks.

Request Body:

FieldTypeDescription
toarrayList of recipient phone numbers (E.164 format)
to_contactsarrayList of contact UUIDs to send to
to_groupsarrayList of contact group UUIDs to send to
messagestringRequired. Message content
sender_profile_idstringSender profile ID (uses default if not specified)
allow_replybooleanAllow recipient to reply
customer_refstringYour reference ID for correlation
callback_urlstringWebhook URL for delivery status (HTTPS required)
scheduled_atstringSchedule for future delivery (ISO 8601). Max 30 days ahead. Use timezone param for local time.
timezonestringIANA timezone for scheduled_at (e.g., Europe/Oslo, Europe/Stockholm). If omitted, scheduled_at is treated as UTC.

Example:

json
{
  "to": [
    "+4799999999"
  ],
  "message": "Reminder: Your appointment is tomorrow at 10:00",
  "scheduled_at": "2025-12-17T09:00:00",
  "timezone": "Europe/Oslo",
  "customer_ref": "reminder-12345"
}

Response:

FieldTypeDescription
sms_message_idstringUnique message ID
toarrayRecipient numbers
statusstringMessage status Values: QUEUED, SCHEDULED, SENDING, SENT, DELIVERED, FAILED
scheduled_atstring
units_estimateintegerEstimated SMS units
customer_refstring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/sms/send \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

GET /v1/sms/messages

List messages

List sent and received SMS messages with optional filters.

Response:

FieldTypeDescription
messagesarray
totalinteger
pageinteger
page_sizeinteger
has_moreboolean

Example:

bash
curl https://api.wayscloud.services/v1/sms/messages \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/sms/messages/

Get message

Get details for a specific SMS message.

Response:

FieldTypeDescription
idstring
directionstringValues: OUTBOUND, INBOUND
message_typestringValues: PLAIN, REPLY, VERIFY
from_numberstring
to_numberstring
bodystring
statusstringValues: QUEUED, SCHEDULED, SENDING, SENT, DELIVERED, FAILED, CANCELLED, RECEIVED
units_countinteger
customer_refstring
created_atstring
scheduled_atstring
sent_atstring
delivered_atstring
related_message_idstring
error_messagestring

Example:

bash
curl https://api.wayscloud.services/v1/sms/messages/{message_id} \
  -H "X-API-Key: YOUR_API_KEY"

POST /v1/sms/messages/{message_id}/cancel

Cancel scheduled message

Cancel a scheduled or queued SMS message before it is sent.

Cancellable statuses:

  • SCHEDULED - Message waiting for scheduled time
  • QUEUED - Message in send queue

Messages that are already SENDING, SENT, DELIVERED, or FAILED cannot be cancelled.

Response:

FieldTypeDescription
messagestring
message_idstring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/sms/messages/{message_id}/cancel \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/sms/sender-profiles

List sender profiles

List your configured sender profiles (sender IDs).

Response:

Example:

bash
curl https://api.wayscloud.services/v1/sms/sender-profiles \
  -H "X-API-Key: YOUR_API_KEY"

POST /v1/sms/sender-profiles

Create sender profile

Create a new sender profile (sender ID).

Sender ID Types:

  • Phone number: Your own number or a dedicated number
  • Alphanumeric: Brand name (max 11 chars, no ÆØÅ, requires brand_confirmation)

Custom alphanumeric sender IDs require admin approval and may have a monthly fee.

Request Body:

FieldTypeDescription
namestringRequired. Profile name
sender_idstringRequired. Sender ID (phone or alphanumeric max 11 chars, no ÆØÅ)
allow_replyboolean
is_defaultboolean
brand_confirmationbooleanRequired for custom sender IDs

Example:

json
{
  "name": "marketing",
  "sender_id": "MyBrand",
  "allow_reply": false,
  "brand_confirmation": true
}

Response:

FieldTypeDescription
idstring
namestring
sender_idstringPhone number or alphanumeric (max 11 chars)
is_defaultboolean
allow_replyboolean
is_custom_senderboolean
approval_statusstringValues: pending, approved, rejected
monthly_pricenumber
created_atstring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/sms/sender-profiles \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

DELETE /v1/sms/sender-profiles/

Delete sender profile

Delete a sender profile. Cannot delete the default profile if it is the only one.

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/sms/sender-profiles/{profile_id} \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/sms/status

Get service status

Get SMS service status including message counts and default sender.

Response:

FieldTypeDescription
activeboolean
has_sender_profilesboolean
has_api_keyboolean
default_senderSenderProfile
messages_todayinteger
messages_this_monthinteger
messages_sent_30dinteger
messages_received_30dinteger

Example:

bash
curl https://api.wayscloud.services/v1/sms/status \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/sms/usage

Get SMS usage for billing

Get SMS usage statistics for a billing period.

Returns message counts, SMS units consumed, and cost breakdown.

Pricing per SMS unit:

  • NOK: 0.99
  • SEK: 0.99
  • DKK: 0.79
  • EUR: 0.10
  • USD: 0.10

Cost is calculated as: units_used × price_per_unit

Response:

FieldTypeDescription
periodstringBilling period (YYYY-MM)
period_startstring
period_endstring
messages_sentintegerTotal outbound messages
messages_receivedintegerTotal inbound messages
messages_failedintegerFailed messages
units_usedintegerSMS units consumed
costnumberTotal cost
currencystringCurrency code
price_per_unitnumberPrice per SMS unit
outbound_costnumberCost for outbound messages
inbound_costnumberCost for inbound messages (usually 0)

Example:

bash
curl https://api.wayscloud.services/v1/sms/usage \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/sms/stats

Get SMS statistics

Get aggregated SMS statistics across multiple time periods.

Returns message counts, units, and delivery rates for:

  • Today
  • This week
  • This month
  • Last 30 days

Also includes a breakdown by message status (QUEUED, SENT, DELIVERED, FAILED, etc).

Response:

FieldTypeDescription
todaySMSStatsPeriod
this_weekSMSStatsPeriod
this_monthSMSStatsPeriod
last_30_daysSMSStatsPeriod
status_breakdownobjectMessage count by status

Example:

bash
curl https://api.wayscloud.services/v1/sms/stats \
  -H "X-API-Key: YOUR_API_KEY"

WAYSCloud AS