Telco Gateway
USSD Gateway & Interactive Menus
Provision dedicated or shared USSD codes (e.g. *123*111#), manage interactive menu applications, and handle telco session webhooks.
Architecture & Integration Guidelines:
- Protocol: When a subscriber dials your USSD code, CBI Gateway sends an HTTP POST to your configured callback_url.
- Response Format: Return plain text starting with CON (prompt user for input) or END (terminate session).
- Session timeout is configurable per application (default: 60 seconds). Sessions are identified by unique session_id.
POST
/api/v1/ussd/applicationsCreate USSD Application & Webhook
Configure your live server callback endpoint and security authentication tokens for USSD menu interactions.
Request Headers
Header
Value
Authorization
Bearer cbi_live_xxxxxxxxxxxxxxxxxxxxxxxx
Content-Type
application/json
X-Channel
api
Request Body
{
"name": "Mobile Banking USSD",
"short_code": "*123*001#",
"callback_url": "https://api.yourdomain.com/ussd/callback",
"callback_auth_type": "bearer",
"callback_auth_value": "sec_token_991823",
"session_timeout": 60
}Code Execution Playground
Request Snippet (CURL)
curl -X POST "https://backend.cbivas.com/api/v1/ussd/applications" \
-H "Authorization: Bearer cbi_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"name":"Mobile Banking USSD","short_code":"*123*001#","callback_url":"https://api.yourdomain.com/ussd/callback","callback_auth_type":"bearer","callback_auth_value":"sec_token_991823"}'Success Response (200 OK)
{
"id": "app_ussd_891238",
"name": "Mobile Banking USSD",
"short_code": "*123*001#",
"callback_url": "https://api.yourdomain.com/ussd/callback",
"status": "active"
}