API Reference
Complete reference for the USSD Pad backend API endpoints.
Authentication
Platform API endpoints use API key authentication. Pass your key as a Bearer token in the Authorization header:
You can find your API key in the Platform Portal under Settings → API Settings.
Try it with cURL
https://ussd.plugbundle.com/api/platform/profile
Base URL
All endpoints return JSON. Public endpoints (codes, lookup, session) require no authentication.
Public API (App-facing)
/api/codes
List All Registered Codes
Returns all active USSD codes with platform information. Used by the mobile app to build its registry cache.
{
"success": true,
"codes": [
{
"code": "*737#",
"platform_name": "DataZone GH",
"type": "main"
}
]
}
/api/lookup
Look Up a Code
Find which platform owns a specific USSD code. Uses POST to handle # characters which break in URLs.
{ "code": "*737#" }
{
"success": true,
"code": {
"code": "*737#",
"type": "main",
"platform_name": "DataZone GH",
"reseller_name": null,
"is_active": true
}
}
/api/session
Handle USSD Session
The main endpoint called by the mobile app when a user dials a code. Routes to the correct platform's menu flow.
{ "code": "*737#" }
{
"success": true,
"session_id": "uuid-v4",
"platform_name": "DataZone GH",
"message": "Welcome to DataZone GH\nSelect a service:",
"options": [
{ "id": "buy_data", "label": "Buy Data Bundle" },
{ "id": "check_balance", "label": "Check Balance" },
{ "id": "check_order", "label": "Check Order Status" }
],
"is_terminal": false,
"input_type": "none",
"step": "root"
}
Subsequent calls include session_id, input (user selection), and step (current step from previous response).
{
"code": "*737#",
"session_id": "uuid-v4",
"input": "1",
"step": "root"
}
Platform API (Authenticated)
Authenticate with your API key as a Bearer token in the Authorization header. Get your key from the Platform Portal → Settings → API Settings.
/api/platform/profile
Platform Profile
Get your platform's info, stats, API key, and main USSD code.
/api/platform/secret
Get API Key Info
Returns your current API key and when it was created.
/api/platform/secret/cycle
Regenerate API Key
Invalidates your current key and generates a new one. Previous key will stop working immediately.
/api/platform/resellers
Reseller Management
CRUD operations for resellers. POST creates a reseller with auto-generated sub-code. Requires a name and code_suffix.
/api/platform/orders
Order Management
List orders with optional filters by reseller_id and status.
Error Handling
"success": false,
"message": "Description of the error."
}
Common HTTP status codes:
200 success,
401 missing/invalid API key,
404 not found,
422 validation error,
429 rate limit exceeded,
500 server error.