AddAdminRole

View as Markdown

Adds a new admin role.

Example request: Add a new admin role with the GetAccountInfo and GetCallHistory permissions.

Authentication

AuthorizationBearer
Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token.

Query parameters

admin_role_namestringRequired
The admin role name. The length must be less than 50
admin_role_activebooleanOptionalDefaults to true
Whether the admin role is enabled. If false the allowed and denied entries have no affect
like_admin_role_idlist of integersOptional

The admin role ID list separated by semicolons (;). Use the ‘all’ value to select all admin roles. The list specifies the roles from which the new role automatically copies all permissions (allowed_entries and denied_entries)

like_admin_role_namelist of stringsOptional

The admin role name that can be used instead of like_admin_role_id. The name specifies a role from which the new role automatically copies all permissions (allowed_entries and denied_entries)

allowed_entrieslist of stringsOptional

The list of allowed access entries separated by semicolons (;) (the API function names)

denied_entrieslist of stringsOptional

The list of denied access entries separated by semicolons (;) (the API function names)

Response

Successful response
resultinteger
Returns 1 if the request has been completed successfully
admin_role_idinteger
The new admin role ID