FuxSMS API Reference
Send SMS messages and manage your account programmatically. All responses are JSON. All requests require a valid API key.
Overview
The FuxSMS REST API lets you send normal SMS, priority SMS, and bulk SMS to Philippine mobile numbers, as well as query your account balance and usage statistics. It is built on top of the Semaphore v4 gateway.
Base URL
All endpoints are relative to the root of this installation:
https://sms.fuxdevs.online/api/
Authentication
Every request must include your API key. It can be passed in three ways (evaluated in this order of priority):
| Method | How to pass | Example |
|---|---|---|
| HTTP Header (recommended) | Authorization: Bearer <key> |
Authorization: Bearer abc123... |
| POST body field | Form parameter apikey |
apikey=abc123... |
| Query string | URL parameter apikey |
?apikey=abc123... |
Rate Limits
Rate limits are applied per API key, per endpoint, in a 1-hour rolling window.
When a limit is exceeded the API returns HTTP 429.
Each response contains three headers to help you track your usage:
| Header | Description |
|---|---|
| X-RATE-LIMIT-LIMIT | Maximum allowed requests in the window |
| X-RATE-LIMIT-REMAINING | Requests remaining in the current window |
| X-RATE-LIMIT-RESET | Unix timestamp (UTC) when the window resets |
Response Format
All responses are application/json and follow this envelope:
{
"status": "success",
"data": { /* endpoint-specific payload */ }
}
{
"status": "error",
"code": 422,
"message": "Invalid number format. Must be 09XXXXXXXXX (11 digits)."
}
Every response also includes the fixed header:
X-SERVICE: FUX SMS
Error Codes
| HTTP Code | Meaning |
|---|---|
| 200 | Success |
| 401 | Missing or invalid API key |
| 402 | Insufficient credits to send the message |
| 405 | Wrong HTTP method (e.g. GET on a POST-only endpoint) |
| 422 | Validation error — missing or malformed parameter |
| 429 | Rate limit exceeded — wait until the reset timestamp |
| 502 | SMS gateway (Semaphore) returned an error |
Credits & Pricing
Messages are billed in credits. The cost depends on the message type and the number of segments.
| Type | Credits per segment | Use case |
|---|---|---|
| Normal | 2 credits | Standard delivery, queue-based |
| Priority | 3 credits | Faster delivery, prioritised queue |
One segment = up to 160 characters. Messages longer than 160 characters are split into multi-part SMS (153 characters per segment from the second part onward). The API always reports the segment count and credits used in the response body.
Send Normal SMS
Send a single SMS to one Philippine mobile number using the standard queue. Costs 2 credits per segment.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apikey | string | Required | Your FuxSMS API key |
| number | string | Required | Recipient mobile number in 09XXXXXXXXX format |
| message | string | Required | Message text. 160 chars = 1 segment; longer messages are split at 153 chars/segment. |
| sendername | string | Optional | Sender name registered with Semaphore. Defaults to the site-wide sender name. |
Example Request
curl -X POST https://sms.fuxdevs.online/api/message.php \ -H "Authorization: Bearer YOUR_API_KEY" \ -d "number=09171234567" \ -d "message=Hello from FuxSMS!"
Success Response 200
{
"status": "success",
"data": {
"recipient": "09171234567",
"message": "Hello from FuxSMS!",
"type": "normal",
"segments": 1,
"credits_used": 2,
"credits_remaining": 498
}
}
Send Priority SMS
Send a single SMS with priority delivery — processed before normal messages. Costs 3 credits per segment.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apikey | string | Required | Your FuxSMS API key |
| number | string | Required | Recipient mobile number in 09XXXXXXXXX format |
| message | string | Required | Message text |
| sendername | string | Optional | Approved Semaphore sender name. Defaults to site sender. |
Example Request
curl -X POST https://sms.fuxdevs.online/api/priority.php \ -H "Authorization: Bearer YOUR_API_KEY" \ -d "number=09181234567" \ -d "message=Your OTP is 493820"
Success Response 200
{
"status": "success",
"data": {
"recipient": "09181234567",
"message": "Your OTP is 493820",
"type": "priority",
"segments": 1,
"credits_used": 3,
"credits_remaining": 497
}
}
Send Bulk SMS
Send an SMS to 2–1000 recipients in a single API call. Uses the Semaphore bulk endpoint under the hood — one HTTP call regardless of recipient count — to avoid gateway rate limiting. Supports both normal and priority delivery.
/api/message.php or /api/priority.php.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apikey | string | Required | Your FuxSMS API key |
| numbers | string | Required |
Comma-separated recipient numbers. Each must be 09XXXXXXXXX.
Duplicates are removed automatically. Alias: number is also accepted.
|
| message | string | Required | Message text sent identically to all recipients |
| type | string | Optional | normal (default, 2 cr/seg) or priority (3 cr/seg) |
| sendername | string | Optional | Approved Semaphore sender name. Defaults to site sender. |
Example Request
curl -X POST https://sms.fuxdevs.online/api/bulk.php \ -H "Authorization: Bearer YOUR_API_KEY" \ -d "numbers=09171234567,09181234567,09191234567" \ -d "message=School event tomorrow at 8AM" \ -d "type=normal"
Success Response 200
{
"status": "success",
"data": {
"recipients_total": 3,
"sent": 3,
"failed": 0,
"message": "School event tomorrow at 8AM",
"type": "normal",
"segments": 1,
"credits_per_sms": 2,
"credits_used": 6,
"credits_remaining": 494
}
}
Account Info
Returns the authenticated account's profile, current credit balance, and lifetime message statistics.
Accepts both GET and POST.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apikey | string | Required | Your FuxSMS API key (query string, body, or Bearer header) |
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://sms.fuxdevs.online/api/account.php
Success Response 200
{
"status": "success",
"data": {
"username": "jdelacruz",
"name": "Juan Dela Cruz",
"role": "user",
"credits": 500,
"stats": {
"total_sent": 48,
"total_credits_used": 96,
"delivered": 45,
"failed": 3
}
}
}
Number Format
All recipient numbers must be Philippine mobile numbers in the local format:
09XXXXXXXXX ← 11 digits, starts with 09
| Value | Valid? | Reason |
|---|---|---|
| 09171234567 | ✅ Yes | Correct PH mobile format |
| 09991234567 | ✅ Yes | Correct PH mobile format |
| +639171234567 | ❌ No | Use local format, not E.164 |
| 9171234567 | ❌ No | Missing leading 0 |
| 0917123456 | ❌ No | Only 10 digits |
SMS Segments
Standard SMS supports up to 160 characters per message. Messages that exceed this are split into linked multi-part messages, where each part uses 153 characters (7 bytes reserved for the UDH linking header).
| Message length | Segments | Normal credits | Priority credits |
|---|---|---|---|
| 1 – 160 chars | 1 | 2 | 3 |
| 161 – 306 chars | 2 | 4 | 6 |
| 307 – 459 chars | 3 | 6 | 9 |
| N chars (multi-part) | ⌈N ÷ 153⌉ | segments × 2 | segments × 3 |
Response Headers
Every response from the FuxSMS API includes these headers:
| Header | Value / Description |
|---|---|
| Content-Type | application/json; charset=utf-8 |
| X-SERVICE | FUX SMS — identifies the service |
| X-RATE-LIMIT-LIMIT | Hourly request cap for this endpoint |
| X-RATE-LIMIT-REMAINING | Requests remaining in the current window |
| X-RATE-LIMIT-RESET | Unix timestamp (UTC) when the window resets |