Skip to main content

USSD API

USSD endpoints exposed by the Devotel CPaaS API Base path: /api/v1/ussd Endpoint count: 4

Get the configured USSD menu

GET /api/v1/ussd/menu
Returns the authenticated tenant’s USSD menu definition under data.menu, or null when none has been configured yet.

USSD aggregator session callback

POST /api/v1/ussd/callback/{tenantId}
Public webhook the USSD aggregator (e.g. Africa’s Talking) POSTs to on every step of a session. Accepts JSON or form-encoded bodies with sessionId, phoneNumber, serviceCode, and the accumulated text. Responds with a text/plain body beginning CON (continue) or END (terminate). The :tenantId path segment scopes the call to the reseller tenant that owns the menu.
string
required
Platform tenant id that owns the USSD menu.

Simulate a USSD session step

POST /api/v1/ussd/simulate
Runs the USSD engine against an text input string (the aggregator’s accumulated *-joined keypresses) and returns the resulting screen, exactly as the live callback would. Pass an inline menu to preview an unsaved definition; otherwise the tenant’s configured menu is used. Useful for building and testing menus before pointing the aggregator at the callback.
string
Accumulated input string, *-joined (empty for the initial dial).
object
A USSD menu definition: a tree of nodes (screens) navigated from root.

Create or replace the USSD menu

PUT /api/v1/ussd/menu
Validates and persists the tenant’s USSD menu definition. The menu tree is checked for unique node ids and that root plus every option next resolves to an existing node. Replaces any previously configured menu.