Aloware provides a powerful SMS API that enables you to send SMS and MMS messages directly from your applications or systems. With the Aloware SMS API integration, you can effortlessly engage with your leads and contacts through SMS communication.
This documentation outlines the required fields, examples, and endpoints to successfully utilize the Aloware SMS API. The Aloware API limits how many requests your account can send each minute. The limit is counted across all the IP addresses you send from and is shared by every Aloware API endpoint.
Requests over the limit are rejected with an HTTP 429 error and are not queued, so build retry logic into your integration. Delivery speed also depends on the throughput carriers set for your 10DLC campaign.
Each message sent through the API appears in Aloware as a communication created through the API, with the final message, line and user. The API sends exactly what the request contains, and line visibility settings for users do not apply to API requests. Aloware does not keep a log of every API request and has no tool to view the raw request, so keep your own records to audit your API usage.
Endpoint
POST /api/v1/webhook/sms-gateway/send
Enabling SMS Sending
To send an SMS message, you need the following required fields:
api_token | Your Aloware account API token. |
from or line_id | The sender's phone number or Aloware Line ID. |
to | The recipient's phone number. |
message | The content of the SMS message (limited to 160 characters). |
Example POST URL
https://app.aloware.io/api/v1/webhook/sms-gateway/send
Example POST Body
Here are some examples of JSON payloads to send SMS messages using the Aloware SMS API:
Sending SMS with a Phone Number
{
"api_token": "740A6C4E",
"from": "+18552562001",
"to": "+18181234567",
"message": "Hello, an SMS from Aloware."
}Sending SMS with Line ID
To send an MMS with Line ID, you can use the following example JSON code as a reference when making the API request:
{
"api_token": "740A6C4E",
"line_id": 1234,
"to": "+18181234567",
"message": "Hello, an SMS from Aloware."
}Sending MMS with a Line ID
{
"api_token": "740A6C4E",
"line_id": 1234,
"to": "+18181234567",
"message": "Hello, an MMS from Aloware.",
"image_url": "https://placekitten.com/408/287"
}
Optional Fields
image_url | (for MMS) The URL of the image to include in the MMS message. |
force_random | (optional) This field "force_random" can be set to either 0 or 1. When set to 1, it will ignore the number stickiness feature. Number stickiness ensures that a contact or number remains associated with a specific user or system. By enabling "force_random," the API will assign or distribute the message randomly instead of considering the existing associations or stickiness. |
Example POST Header
Accept: application/json
Content-Type: application/json
Response
HTTP 202 - SMS sent successfully.
{
"message": "Message sent."
}HTTP 400 - Failure with a detailed response.
{
"message": "The given data was invalid.",
"errors": {
"message": [
"The message field is required."
]
}
}cURL Example - Sending SMS with Phone Number
curl -X POST \
https://app.aloware.io/api/v1/webhook/sms-gateway/send \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "740A6C4E",
"from": "+18552562001",
"to": "+18181234567",
"message": "Hello, an SMS from Aloware."
}'
cURL Example - Sending SMS with Line ID
curl -X POST \
https://app.aloware.io/api/v1/webhook/sms-gateway/send \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "740A6C4E",
"line_id": 1234,
"to": "+18181234567",
"message": "Hello, an SMS from Aloware."
}'
If you require additional API functions or need further assistance, please don't hesitate to contact our support team at [email protected].

