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.

Academic / research use only. This service is intended for capstone, thesis, and research projects. Do not use it for commercial mass-messaging or spam.

Base URL

All endpoints are relative to the root of this installation:

plaintext
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...
Your API key is shown in your dashboard. Keep it private — anyone with your key can consume your credits.

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.

/message
60
requests / hour
/priority
60
requests / hour
/bulk
20
requests / hour
/account
120
requests / hour

Each response contains three headers to help you track your usage:

HeaderDescription
X-RATE-LIMIT-LIMITMaximum allowed requests in the window
X-RATE-LIMIT-REMAININGRequests remaining in the current window
X-RATE-LIMIT-RESETUnix timestamp (UTC) when the window resets

Response Format

All responses are application/json and follow this envelope:

json — success
{
  "status": "success",
  "data": { /* endpoint-specific payload */ }
}
json — error
{
  "status":  "error",
  "code":   422,
  "message": "Invalid number format. Must be 09XXXXXXXXX (11 digits)."
}

Every response also includes the fixed header:

http
X-SERVICE: FUX SMS

Error Codes

HTTP CodeMeaning
200Success
401Missing or invalid API key
402Insufficient credits to send the message
405Wrong HTTP method (e.g. GET on a POST-only endpoint)
422Validation error — missing or malformed parameter
429Rate limit exceeded — wait until the reset timestamp
502SMS gateway (Semaphore) returned an error

Credits & Pricing

Messages are billed in credits. The cost depends on the message type and the number of segments.

TypeCredits per segmentUse 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.

Credits are only deducted for successfully sent messages. Failed deliveries are logged but not charged.

Send Normal SMS

POST /api/message.php

Send a single SMS to one Philippine mobile number using the standard queue. Costs 2 credits per segment.

Request Parameters

ParameterTypeRequiredDescription
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
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

json
{
  "status": "success",
  "data": {
    "recipient":         "09171234567",
    "message":           "Hello from FuxSMS!",
    "type":              "normal",
    "segments":          1,
    "credits_used":      2,
    "credits_remaining": 498
  }
}

Send Priority SMS

POST /api/priority.php

Send a single SMS with priority delivery — processed before normal messages. Costs 3 credits per segment.

Request Parameters

ParameterTypeRequiredDescription
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
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

json
{
  "status": "success",
  "data": {
    "recipient":         "09181234567",
    "message":           "Your OTP is 493820",
    "type":              "priority",
    "segments":          1,
    "credits_used":      3,
    "credits_remaining": 497
  }
}

Send Bulk SMS

POST /api/bulk.php

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.

Minimum 2 recipients. For a single recipient use /api/message.php or /api/priority.php.

Request Parameters

ParameterTypeRequiredDescription
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
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

json
{
  "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

GET /api/account.php

Returns the authenticated account's profile, current credit balance, and lifetime message statistics. Accepts both GET and POST.

Request Parameters

ParameterTypeRequiredDescription
apikey string Required Your FuxSMS API key (query string, body, or Bearer header)

Example Request

curl
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://sms.fuxdevs.online/api/account.php

Success Response 200

json
{
  "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:

format
09XXXXXXXXX   ← 11 digits, starts with 09
ValueValid?Reason
09171234567✅ YesCorrect PH mobile format
09991234567✅ YesCorrect PH mobile format
+639171234567❌ NoUse local format, not E.164
9171234567❌ NoMissing leading 0
0917123456❌ NoOnly 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 lengthSegmentsNormal creditsPriority credits
1 – 160 chars123
161 – 306 chars246
307 – 459 chars369
N chars (multi-part)⌈N ÷ 153⌉segments × 2segments × 3
Prefer shorter messages (≤160 chars) to minimise credit usage. The segment count and total credits are always returned in the API response.

Response Headers

Every response from the FuxSMS API includes these headers:

HeaderValue / Description
Content-Typeapplication/json; charset=utf-8
X-SERVICEFUX SMS — identifies the service
X-RATE-LIMIT-LIMITHourly request cap for this endpoint
X-RATE-LIMIT-REMAININGRequests remaining in the current window
X-RATE-LIMIT-RESETUnix timestamp (UTC) when the window resets