All Collections
CRMs Connection and Integration
Webhooks
API Documentation: Aloware SMS API Integration
API Documentation: Aloware SMS API Integration

Aloware's SMS API sends SMS/MMS using api_token, sender/receiver details, message. Includes examples, optional 'force_random' field.

Laarni D avatar
Written by Laarni D
Updated over a week ago

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.


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.com/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:

  1. Sending SMS with a Phone Number

    {
    "api_token": "740A6C4E",
    "from": "+18552562001",
    "to": "+18181234567",
    "message": "Hello, an SMS from Aloware."
    }

  2. 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."
    }

  3. 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.com/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.com/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].

Did this answer your question?