# 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. 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. 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"}},"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.](/pagination-sorting-filtering/filtering.md)\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."}],"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"}},"description":{"type":"string","nullable":true}}}}}}}}}}}}}}
```
