📡 SMS Broadcast API

Welcome to the SMS Broadcast API documentation. This API allows you to send single or multiple SMS messages programmatically through simple HTTP POST requests.

All requests require an API token for authentication.

🔐 Authentication

All requests to the API must include a valid token in the request body. This token is used to authenticate your application and identify your account.

Your API token should be kept confidential and never shared publicly.

How to get your API Token

Please contact ScribbleCubes support or refer to your account dashboard to obtain your unique API token.

📌 Endpoints

The API provides two main endpoints for sending SMS messages:

Single SMS Sending

Use this endpoint to send a single SMS message to a specific recipient.

Endpoint URL

POST https://smsgateway.service.scribblecubes.ph/api/broadcast/sms

Request Body

The request body should be a JSON object with the following parameters:

Parameter Type Description Required
token String Your unique API authentication token. Yes
recipient String The mobile number of the recipient (e.g., "639171234567"). Ensure it's in international format without '+' prefix. Yes
message String The content of the SMS message to be sent. Yes
{
    "token": "",
    "recipient": "693213456789",
    "message": "Hello from ScribbleCubes SMS API!"
}

Example Usage: Single SMS

Using cURL
curl -X POST "https://smsgateway.service.scribblecubes.ph/api/broadcast/sms" \
    -H "Content-Type: application/json" \
    -d '{
        "token": "your_api_token_here",
        "recipient": "693123456879",
        "message": "Hello, this is a test message from cURL."
    }'
Using Axios (JavaScript)
axios.post("https://smsgateway.service.scribblecubes.ph/api/broadcast/sms", {
    token: "your_api_token_here",
    recipient: "693312456789",
    message: "Hello, this is a test message from Axios."
}).then(response => {
    console.log("Success:", response.data);
}).catch(error => {
    console.error("Error:", error.response ? error.response.data : error.message);
});

Bulk SMS Sending

Use this endpoint to send multiple SMS messages in a single request. Each message in the bulk payload can have a different recipient and message content.

Endpoint URL

POST https://smsgateway.service.scribblecubes.ph/api/broadcast/bulk-sms

Request Body

The request body should be a JSON object containing your token and an array of message objects:

Parameter Type Description Required
token String Your unique API authentication token. Yes
bulkPayload Array of Objects An array where each object contains recipient and message for an individual SMS. Yes
bulkPayload[i].recipient String The mobile number for the specific message. Yes
bulkPayload[i].message String The message content for the specific recipient. Yes
{
    "token": "1234568974-asdfasdfa-asdfasdfqer-twert",
    "bulkPayload": [
        {
            "recipient": "693231564789",
            "message": "The Capybarra is loose!"
        },
        {
            "recipient": "639456123789",
            "message": "Reminder: Meeting at 3 PM today."
        },
        {
            "recipient": "6398794561123",
            "message": "Your order #12345 has been shipped."
        }
    ]
}

Example Usage: Bulk SMS

Using cURL
curl -X POST "https://smsgateway.service.scribblecubes.ph/api/broadcast/bulk-sms" \
    -H "Content-Type: application/json" \
    -d '{
        "token": "your_api_token_here",
        "bulkPayload": [
            {
                "recipient": "693231654897",
                "message": "Another bulk message!"
            },
            {
                "recipient": "639645123456",
                "message": "Another bulk message."
            }
        ]
    }'
Using Axios (JavaScript)
axios.post("https://smsgateway.service.scribblecubes.ph/api/broadcast/bulk-sms", {
    token: "your_api_token_here",
    bulkPayload: [
        {
            "recipient": "69312345678",
            "message": "Another bulk message!"
        },
        {
            "recipient": "69312345674",
            "message": "Another bulk message."
        }
    ]
}).then(response => {
    console.log("Bulk Send Success:", response.data);
}).catch(error => {
    console.error("Bulk Send Error:", error.response ? error.response.data : error.message);
});

✅ API Responses

The API will return JSON responses indicating the status of your request.

Successful Response (HTTP 200 OK)

For successful single or bulk message submissions:

{
    "success": true,
    "message": "SMS message(s) submitted successfully.",
    "data": {
        "submissionId": "unique-submission-id-12345",
        "totalMessages": 1, // or count for bulk
        "status": "pending"
    }
}

Error Responses (Various HTTP Status Codes)

In case of an error, the API will return a non-200 HTTP status code and a JSON object detailing the error.

Common Error Codes:

{
    "success": false,
    "message": "Invalid API token provided.",
    "errorCode": "AUTH_001"
}
{
    "success": false,
    "message": "Missing 'recipient' field in request.",
    "errorCode": "REQ_001"
}

â„šī¸ Important Notes