api:pbx:variable:set
Table of Contents
API : PBX : Variable Set
Introduction
This request will set the value of a variable.
The variable name can be prefixed with SHARED: if it is a shared variable, or <employee-id>: if it is a personal variable. If not prefix, it is considered global.
Request
| URL | https://api.telecomx.dk/pbx/variable/VARIABLE_NAME | ||
|---|---|---|---|
| Method | POST/GET | ||
| Access level | PERSONAL, VIEWER, OWNER, RESELLER, RESELLER_ADMIN, ADMIN. | ||
| Param | VARIABLE_NAME | String | Name of variable. Max 50 chars of a-z, A-Z, 0-9 _ or -. Prefix with SHARED: for shared variable. Prefix with <employee-id>: for personal variable. |
| Query | value | String | If GET request, this holds the value to set on the variable. |
| customer | Id | If GET request, optional customer id. Defaults to users own customer. | |
| Body | value | String | If POST request, this holds the value to set on the variable. |
| customer | Id | If POST request, optional customer id. Defaults to users own customer. | |
Request GET example
https://api.telecomx.dk/pbx/variable/onduty?value=423&customer=1234567890123457890ABCD
Request POST body example
{ value: '423', customer: '1234567890123457890ABCD' }
Response
| Property | Type | Description |
|---|---|---|
| success | Boolean | True on success |
Example
{ success: true }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | customer | Customer not found |
| 403 | name | User access level requires name to be prefixed with SHARED: or user-id: |
| 422 | name | Invalid variable name |
| 422 | value | Invalid or too long value |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/variable/set.txt · Last modified: 2025/11/08 03:03 by Per Møller