For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

REST API

TPOSS REST API enables secure, RESTful access to subscriber management, charging accounts, balances, sessions, and event data. It provides support for JSON requests and responses, advanced filtering, and sorting.

Query parameters

Each endpoint requires the ApiKey query parameter, which is described in the API overview document. Some of the endpoints additionally support the following query parameters:

  • Limit
  • Offset
  • Sort
  • Filter
  • Fields

These parameters work the same way as the JSON-RPC 2.0 API parameters.

The session list endpoints support one more query parameter - IncludeAffectedCount. If it is set to true, the response contains the TotalEntriesAffectedByFilter field with the total number of sessions matched by the given filter, regardless of the Limit and Offset values. By default, it is set to false.

Common error scenarios

If a request fails, the response body contains the ErrorCode and ErrorMessage fields. For example:

json

Despite each endpoint may have its own set of possible errors, all the endpoints share common error scenarios:

  • 401 Not authenticated - the request does not contain the ApiKey query parameter, or its value can't be verified
  • 400 Bad request - the request contains an invalid list query, for example, an unknown field in the Filter or Sort parameter.
  • 404 Not found - the object addressed by the request does not exist. The returned error code depends on the object type. For example, the -31401 error code is returned for a subscriber, and the -31601 error code is returned for a CDR.

All the possible errors related to a particular endpoint are described in the API specification below.

TPOSS REST API
TPOSS REST API1