ExoVoIPDeveloper guide

Tenants

Management of the companies hosted on the platform. The endpoints on this page are reserved for the platform administrator (global keys with the tenants:* scope), except GET /v1/tenants/current, which is available to every tenant.

Current tenant

With a tenant key, returns your own company's data (name, status, limits, settings). It is the simplest call to check that a key works.

curl -s https://centralino.exovoip.it/api/v1/tenants/current \
  -H "X-API-Key: $EXOPBX_API_KEY"

Creating a tenant

Creation registers the company and its first administrator; the administrator's initial password is returned only once.

curl -s -X POST https://centralino.exovoip.it/api/v1/tenants \
  -H "X-API-Key: $EXOPBX_API_KEY" -H "Content-Type: application/json" \
  -d '{"code":"acme","name":"Acme S.r.l.","maxExt":20,"maxCalls":6,
       "admin":{"email":"admin@acme.example","name":"Mario Rossi"}}'

code is the tenant's short identifier (lowercase letters and digits), also used in the phone system's internal names: choose a stable one.

Limits, suspension and reactivation

  • PUT /v1/tenants/:id/limits: maximum number of extensions and concurrent calls.
  • POST /v1/tenants/:id/suspend: the tenant remains visible but its keys and users switch to read-only.
  • POST /v1/tenants/:id/resume: reactivates the tenant.
  • DELETE /v1/tenants/:id: deactivates the tenant without deleting its data.
curl -s "https://centralino.exovoip.it/api/v1/tenants?status=active&limit=50" -H "X-API-Key: $EXOPBX_API_KEY"
curl -s -X PUT https://centralino.exovoip.it/api/v1/tenants/3/limits -H "X-API-Key: $EXOPBX_API_KEY" \
  -H "Content-Type: application/json" -d '{"maxExt":30,"maxCalls":10}'
curl -s -X POST https://centralino.exovoip.it/api/v1/tenants/3/suspend -H "X-API-Key: $EXOPBX_API_KEY" \
  -H "Content-Type: application/json" -d '{"reason":"manual"}'
curl -s -X POST https://centralino.exovoip.it/api/v1/tenants/3/resume -H "X-API-Key: $EXOPBX_API_KEY"

Acting on behalf of a tenant

A global key operates on a specific tenant with the X-Tenant-Id header (see Authentication). Every such access is recorded in the activity log.

# Chiave globale (piattaforma): azienda indicata con X-Tenant-Id
curl -s https://centralino.exovoip.it/api/v1/extensions \
  -H "X-API-Key: $EXOPBX_API_KEY" \
  -H "X-Tenant-Id: 3"

Endpoints

RequestScopeSDK method
GET /v1/tenantstenants:readtenants.list()
POST /v1/tenantstenants:writetenants.create()
GET /v1/tenants/currentextensions:readtenants.current()
GET /v1/tenants/:idtenants:readtenants.get()
PATCH /v1/tenants/:idtenants:writetenants.update()
DELETE /v1/tenants/:idtenants:writetenants.delete()
PUT /v1/tenants/:id/limitstenants:writetenants.limits()
POST /v1/tenants/:id/suspendtenants:writetenants.suspend()
POST /v1/tenants/:id/resumetenants:writetenants.resume()
POST /v1/tenants/:id/impersonatetenants:impersonatetenants.impersonate()
GET /v1/tenants/:id/voice-nodetenants:readtenants.getVoiceNode() · py: tenants.get_voice_node()
PUT /v1/tenants/:id/voice-nodetenants:writetenants.setVoiceNode() · py: tenants.set_voice_node()