• Cheat sheets
  • Documentation
  • API reference
  • Product updates
  • Sign in
Kontent.ai Learn
  • Try Kontent.ai
  • Plan
  • Set up
  • Model
  • Develop
  • Create
Management API v2
API Reference
    • About Management API
    • Postman collection
    • SDKs
    • Authentication
    • API keys
    • API limitations
    • Guidelines on handling changes
      • Introduction
      • Role object
        Schema
      • List roles
        GET
      • Retrieve a role
        GET

Roles

Roles define the permissions that you can assign to users in your project and its environments. Use roles to limit what your users can do.
The endpoints for retrieving roles require the Manage custom roles permission.

Role object

id
required · string · uuid
The role's ID.
name
required · string
The role's display name.
codename
string
The role's codename. The codename property is only applicable for the Project manager role.
JSON
{
  "id": "7dedb656-aef7-40ae-8158-98bbf3542f4a",
  "name": "Project manager",
  "codename": "project-manager"
}

List roles

Retrieve a list of all roles in the specified environment.
The endpoints for retrieving roles require the Manage custom roles permission.
GET
https://manage.kontent.ai/v2/projects/{environment_id}/roles

Request

Path parameters

environment_id
required · string
Identifies your environment.

Request samples

C#
cURL
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net
using Kontent.Ai.Management;

var client = new ManagementClient(new ManagementOptions
{
    ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY",
    EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID"
});

var response = await client.ListProjectRolesAsync();

Response

Status (200)
All roles in the environment.
roles[]
required · array
All roles within an environment.
Hide child attributes
id
required · string · uuid
The role's ID.
name
required · string
The role's display name.
codename
string
The role's codename. The codename property is only applicable for the Project manager role.

Example responses

200
{
  "roles": [
    {
      "id": "7dedb656-aef7-40ae-8158-98bbf3542f4a",
      "name": "Project manager",
      "codename": "project-manager"
    },
    {
      "id": "ee483b59-5a24-4010-b277-ae224c34bc71",
      "name": "Custom role"
    }
  ]
}

Retrieve a role

Retrieve information about a role.
The endpoints for retrieving roles require the Manage custom roles permission.
GET
https://manage.kontent.ai/v2/projects/{environment_id}/roles/{role_identifier}

Request

Path parameters

environment_id
required · string
Identifies your environment.
role_identifier
required · string
Identifies the role by its internal ID (e.g., 7dedb656-aef7-40ae-8158-98bbf3542f4a), or codename (e.g., codename/project-manager).

Request samples

C#
cURL
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net
using Kontent.Ai.Management;

var client = new ManagementClient(new ManagementOptions
{
    ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY",
    EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID"
});

var identifier = Reference.ById(Guid.Parse("a23d3727-3b16-4d94-9eb0-85225d29cfef"));
//var identifier = Reference.ByCodename("project-manager");

var response = await client.GetProjectRoleAsync(identifier);

Response

Status (200)
A single role object.
id
required · string · uuid
The role's ID.
name
required · string
The role's display name.
codename
string
The role's codename. The codename property is only applicable for the Project manager role.

Example responses

200
404
{
  "id": "7dedb656-aef7-40ae-8158-98bbf3542f4a",
  "name": "Project manager",
  "codename": "project-manager"
}
Copyright © 2025 Kontent.ai. All rights reserved.
  • Web
  • Privacy policy
  • Cookies policy
  • Consent settings
  • Security
  • GDPR