TuCloudAPI addadminuser
Appearance
TuCloudAPI function to manage tucloud (PBX) services. Available to: SuperRoot, Operator, Client.
Description
Create a portal admin user in THIS PBX. login is the PK (conflict on duplicate — login is globally unique). password is required and stored as md5(plaintext). email is required (max 64, valid format). active/priv_admin are 0/1. tucloudpbx_id and root are set server-side (this PBX + its root) — they are NOT accepted from the client. Requires a non-readonly ukey.
Call
GET https://tucloudapi.7kas.com:9087/tucloud?func=addadminuser&ukey=YOUR_KEY
Requires the ukey parameter.
Parameters
| Parameter | Type | Required | Default | Meaning |
|---|---|---|---|---|
pbx |
string | Yes | — | TuCloud PBX NAME (e.g. tucall). The (ukey, pbx) pair is the tenant boundary; the server verifies the ukey owns this PBX and scopes every admin user to it. |
login |
string | Yes | — | Admin login (PK, email-style, max 255). |
password |
string | Yes | — | Plaintext password (stored as unsalted MD5). |
email |
string | Yes | — | Email (required, max 64, valid format). |
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&pbx=tucall&login=a@x.com&password=secret&email=a@x.com
Response
{ok, user:{...}} or {ok:false,code:conflict|invalid_param}.
Back to TuCloudAPI