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.
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.
Please contact ScribbleCubes support or refer to your account dashboard to obtain your unique API token.
The API provides two main endpoints for sending SMS messages:
Use this endpoint to send a single SMS message to a specific recipient.
POST https://smsgateway.service.scribblecubes.ph/api/broadcast/sms
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!"
}
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."
}'
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);
});
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.
POST https://smsgateway.service.scribblecubes.ph/api/broadcast/bulk-sms
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."
}
]
}
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."
}
]
}'
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);
});
The API will return JSON responses indicating the status of your request.
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"
}
}
In case of an error, the API will return a non-200 HTTP status code and a JSON object detailing the error.
400 Bad Request
: Missing required parameters, invalid recipient format, or malformed JSON.401 Unauthorized
: Invalid or missing API token.403 Forbidden
: API token lacks necessary permissions, or account is suspended.429 Too Many Requests
: Rate limit exceeded.500 Internal Server Error
: An unexpected error occurred on the server.{
"success": false,
"message": "Invalid API token provided.",
"errorCode": "AUTH_001"
}
{
"success": false,
"message": "Missing 'recipient' field in request.",
"errorCode": "REQ_001"
}
429 Too Many Requests
errors, slow down your requests.