Skip to main content

Subscriber

For the impatient

You may explore this data model via the API Playground, by clicking here

Endpoints

  • /domains/{domain}/subscribers[/{msisdn}] (alias to /tenants/self/domains/{domain}/subscribers)
  • /tenants/{tenant-name}/domains/{domain}/subscribers[/{msisdn}]

The Cloudonix subscriber model represents a subscription for an end user for an addressable phone number in a Cloudonix domain. An end-user with a subscriber account is allowed to make and receive calls through the Cloudonix Platform and access other subscriber oriented services such as messaging.

Properties

PropertyTypeEditableDescription
domainIdNumberNoNumeric identifier of the domain to which this subscriber account belongs.
msisdnStringCreatephone number for the subscriber. Can also be used for login purposes as the username for various APIs that allow subscriber login, such as SIP.
profileObjectCreate, UpdateA set of metadata fields that an application has assigned to this subscriber account.
activeBooleanUpdateWhether this subscriber is active and can make and receive calls.
sip-passwordStringCreate, UpdateIf a subscriber is allowed to login to subscriber oriented services (instead of being provisioned a one time token or an API key), set this field to the subscriber's password. Normally this field would only be set if the subscriber should have access to the SIP classic registration call workflow, instead of the recommended Cloudonix Registration-Free call workflow.

Creating subscribers

New subscribers can be created by sending a POST request to an appropriate subscriber endpoint - set the request body to either a single JSON object describing a subscriber according to the subscriber model, or an array of such JSON objects. The response will include either the fully created subscriber object, or an array of subscriber object responses when sending an array of subscriber models for creation - if any subscriber cannot be created, the request will not fail, instead for each failed subscriber an error object will be provided in the same location in the array, to describe the problem.

Query Parameters

  • password - when set to the value generate, the subscribers endpoint will create SIP passwords for any created subscriber that does not have any SIP password specified.

Listing subscribers

The subscriber catalog endpoint returns all subscribers for the appropriate domain, where the list can be filtered using the following query string parameters:

  • all - by default only active subscribers are listed. By setting the all query parameter (with any value), inactive subscribers will also be listed.
  • by_msisdn - show all subscribers with the specified MSISDN (set the all parameter to see inactive subscribers with the specified MSISDN, otherwise the list will only include the one active subscriber with the specified MSISDN).

A note about duplicate subscribers

A subscriber's MSISDN must be unique in the domain - there shouldn't be two active subscribers with the same MSISDN, as that would make it impossible to correctly address a single subscriber account - as addressing is based on an MSISDN plus domain name.

On the other hand, during the life time of a subscriber, they generate additional data records in the Cloudonix Platform, such as sessions, and it is often undesired to physically delete subscriber accounts when they aren't useful anymore (for example when the end user that used that account is no longer allowed to access the account), but the MSISDN should be re-used. To facilitate such use cases, API.Core allows a subscriber to be deactivated by setting its active field to false, after which its MSISDN can be assigned to another active subscriber. A subscriber can be re-activated, by setting its active field back to true, but only if there are no other active subscribers that use the same MSISDN - doing so would result in "conflict error".