For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Platform docsVideosCommunitySign up
CapabilitiesGetting startedVoice AI OrchestrationVoxEngine PlatformAPI ReferenceFAQ
CapabilitiesGetting startedVoice AI OrchestrationVoxEngine PlatformAPI ReferenceFAQ
  • Management API
    • Reference
        • POSTCreateKey
        • POSTGetKeys
        • POSTUpdateKey
        • POSTDeleteKey
        • POSTSetKeyRoles
        • POSTGetKeyRoles
        • POSTRemoveKeyRoles
        • POSTAddSubUser
        • POSTGetSubUsers
        • POSTSetSubUserInfo
        • POSTDelSubUser
        • POSTSetSubUserRoles
        • POSTGetSubUserRoles
        • POSTRemoveSubUserRoles
        • POSTGetRoles
        • POSTGetRoleGroups
    • Authorization
    • Errors
  • Web SDK
    • Overview
  • Android SDK
    • Overview
  • Android SDK v3
    • Overview
  • iOS SDK
    • Overview
  • React Native SDK
    • Overview
  • Flutter SDK
    • Overview
LogoLogo
Platform docsVideosCommunitySign up
Management APIReferenceRole System

SetKeyRoles

||View as Markdown|
POST
https://api.voximplant.com/platform_api/SetKeyRoles
POST
/platform_api/SetKeyRoles
$curl -X POST "https://api.voximplant.com/platform_api/SetKeyRoles?key_id=a1b2c3d4e5f678901234567890abcdef&role_id=1&role_id=2&role_id=3&role_name=Admin&role_name=Editor&role_name=Viewer" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
200Example 1
1{
2 "result": 1
3}

Set roles for the specified key.

Example request: Set roles 1, 2, 3 for the key.

Was this page helpful?
Previous

DeleteKey

Next

GetKeyRoles

Built with

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 for ready-to-copy snippets in bash, Python, Node.js and Go that turn your credentials.json into a token.

Query parameters

key_idstringRequired
The key's ID
role_idlist of integersRequired

The role id list separated by semicolons (;)

role_namelist of stringsRequired

The role name list separated by semicolons (;)

Response

Successful response
resultinteger