TuCloudAPI addadminuser
Appearance
TuCloudAPI function to manage tucloud (PBX) services. Available to: SuperRoot, Operator.
Description
Create a portal admin user. login is the PK (conflict on duplicate). password is required and stored as md5(plaintext) for login compatibility. active/priv_admin are 0/1. tucloudpbx_id must belong to the effective root (bad_pbx otherwise). SuperRoot must pass root (the tenant); for an Operator the root is forced to its own. Requires a non-readonly operator/superroot ukey.
Call
GET https://tucloudapi.7kas.com:9087/tucloud?func=addadminuser&ukey=YOUR_KEY
Requires the ukey parameter.
Parameters
| Parameter | Type | Required | Default | Meaning |
|---|---|---|---|---|
login |
string | Yes | — | Admin login (PK, email-style, max 255). |
password |
string | Yes | — | Plaintext password (stored as unsalted MD5). |
tucloudpbx_id |
integer | Yes | — | Managed PBX id (must belong to the effective root). |
email |
string | Yes | — | Email (required, max 64, valid format). |
root |
integer | No | — | SuperRoot only: the tenant root for the new admin (required). |
name |
string | No | — | Display name. |
active |
integer | No | 1 |
1 = active, 0 = disabled. |
priv_admin |
integer | No | 0 |
1 = super-admin flag. |
role |
string | No | — | Free-text role label. |
phone |
string | No | — | Phone. |
Example
https://tucloudapi.7kas.com:9087/tucloud?func=addadminuser&ukey=KEY&login=a@x.com&password=secret&tucloudpbx_id=158&root=5
Response
{ok, user:{...}} or {ok:false,code:conflict|invalid_param}.
Back to TuCloudAPI