> For the complete documentation index, see [llms.txt](https://developers.make.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.make.com/api-documentation/api-reference/users/roles.md).

# Roles

The following endpoint retrieves the mapping of a `userRoleId` parameter and user role name.

## User role definitions

> Gets list of all existing user role names and IDs. Optionally filter by \`category\`, a specific \`roleId\`, or pass \`organizationId\`/\`teamId\` to include custom roles for that organization. Set the user roles in an organization with the \`POST /users/{userId}/user-organization-roles/{organizationId}\` API call. Use the \`POST /users/{userId}/user-team-roles/{teamId}\` API call to set user roles in a team.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Users / Roles","description":"The following endpoint retrieves the mapping of a `userRoleId` parameter and user role name."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["user:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/users/roles":{"get":{"tags":["Users / Roles"],"summary":"User role definitions","description":"Gets list of all existing user role names and IDs. Optionally filter by `category`, a specific `roleId`, or pass `organizationId`/`teamId` to include custom roles for that organization. Set the user roles in an organization with the `POST /users/{userId}/user-organization-roles/{organizationId}` API call. Use the `POST /users/{userId}/user-team-roles/{teamId}` API call to set user roles in a team.","parameters":[{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","identifier","subsidiary","category","permissions","description","managementType"]}},"description":"Specifies columns that are returned in the response. Use the `cols[]` parameter for every column that you want to return in the response. For example `GET /endpoint?cols[]=key1&cols[]=key2` to get both `key1` and `key2` columns in the response.\n\n[Check the \"Filtering\" section for a full example.](/api-documentation/pagination-sorting-filtering/filtering)\n"},{"name":"category","in":"query","schema":{"type":"string","enum":["organization","team"]},"description":"Set this parameter to `organization` or `team` to get user roles in an organization or in a team."},{"name":"organizationId","in":"query","schema":{"type":"integer"},"description":"Include custom roles belonging to this organization. Can be combined with `teamId`; if both are provided and the team does not belong to the organization, the request returns `400`. If the organization does not have the `customRoles` license, or the caller lacks permission to view that organization's users, custom roles are silently excluded from the response while the system roles are still returned."},{"name":"teamId","in":"query","schema":{"type":"integer"},"description":"Include custom roles belonging to the organization that owns this team. Can be combined with `organizationId`; if both are provided and the team does not belong to the organization, the request returns `400`. If the organization does not have the `customRoles` license, or the caller lacks permission to view that organization's users, custom roles are silently excluded from the response while the system roles are still returned."},{"name":"roleId","in":"query","schema":{"type":"integer"},"description":"Filter the response to a single role by its ID."},{"name":"excludeRole[]","in":"query","schema":{"type":"array","items":{"type":"integer"}},"description":"Exclude roles with these IDs from the response."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"usersRoles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"identifier":{"type":"string"},"subsidiary":{"type":"boolean"},"category":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"managementType":{"type":"string","enum":["system_locked","admin_managed","custom_managed"],"description":"Indicates how the role is managed."},"description":{"type":"string","nullable":true}}}}}}}}},"400":{"description":"Bad request. Returned when `organizationId` and `teamId` are both provided and the team does not belong to the specified organization."}}}}}}
```

## Get role detail

> Returns the detail of a single role by its ID. For custom-managed roles, requires the \`customRoles\` license and \`ORGANIZATION\_USERS\_VIEW\` permission on the role's organization.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Users / Roles","description":"The following endpoint retrieves the mapping of a `userRoleId` parameter and user role name."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["user:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/users/roles/{roleId}":{"get":{"tags":["Users / Roles"],"summary":"Get role detail","description":"Returns the detail of a single role by its ID. For custom-managed roles, requires the `customRoles` license and `ORGANIZATION_USERS_VIEW` permission on the role's organization.","parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the role."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"usersRole":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"identifier":{"type":"string"},"category":{"type":"string","enum":["organization","team"]},"subsidiary":{"type":"boolean"},"managementType":{"type":"string","enum":["system_locked","admin_managed","custom_managed"]},"description":{"type":"string","nullable":true},"organizationId":{"type":"integer","nullable":true},"permissions":{"type":"array","items":{"type":"string"}}}}}}}}},"400":{"description":"Not available on self-hosted (private) deployments."},"403":{"description":"Insufficient rights or the organization does not have the `customRoles` license."},"404":{"description":"Role not found."}}}}}}
```

## User role permission definitions

> Gets a list of all available permissions that can be assigned to user roles. Use the \`roleCategory\` parameter to filter permissions by team or organization roles.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Users / Roles","description":"The following endpoint retrieves the mapping of a `userRoleId` parameter and user role name."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["user:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/users/roles/permissions":{"get":{"tags":["Users / Roles"],"summary":"User role permission definitions","description":"Gets a list of all available permissions that can be assigned to user roles. Use the `roleCategory` parameter to filter permissions by team or organization roles.","parameters":[{"name":"roleCategory","in":"query","required":false,"schema":{"type":"string","enum":["team","organization"]},"description":"Filter permissions by role category. Use `team` for team role permissions or `organization` for organization role permissions."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"usersRolesPermissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of the permission."},"name":{"type":"string","description":"Name of the permission."},"note":{"type":"string","description":"Additional note about the permission."},"category":{"type":"string","description":"Functional category the permission belongs to."},"roleCategory":{"type":"string","enum":["team","organization"],"description":"Whether this permission applies to team roles or organization roles."},"label":{"type":"string","description":"A key to the dictionary on imt-web-zone for the permission label."},"customRolesHidden":{"type":"boolean","description":"If true, the permission is hidden from custom role configuration and cannot be assigned to a custom role."}}}}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.make.com/api-documentation/api-reference/users/roles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
