# User organization roles

The following endpoints update and retrieve data about user organization roles of a user in an organization. Check out the [overview of user organization roles and the associated permissions](https://www.make.com/en/help/access-management/organizations#organization-roles).

## List user roles in an organization

> Gets list of all users and their roles in the organization with the specified \`organizationId\`. Get all user role IDs with the API call \`GET /users/roles\`.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Users / User organization roles","description":"The following endpoints update and retrieve data about user organization roles of a user in an organization. Check out the [overview of user organization roles and the associated permissions](https://www.make.com/en/help/access-management/organizations#organization-roles)."}],"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/{userId}/user-organization-roles":{"get":{"tags":["Users / User organization roles"],"summary":"List user roles in an organization","description":"Gets list of all users and their roles in the organization with the specified `organizationId`. Get all user role IDs with the API call `GET /users/roles`.","parameters":[{"name":"userId","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the user."},{"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"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"userOrganizationRoles":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer"},"organizationId":{"type":"integer"},"usersRoleId":{"type":"integer"},"invitation":{"type":"string"}}}}}}}}}}}}}}
```

## Get user organization role details

> Gets information about user role in an organization with the specified \`userId\` and \`organizationId\`. Get all user role IDs with the API call \`GET /users/roles\`.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Users / User organization roles","description":"The following endpoints update and retrieve data about user organization roles of a user in an organization. Check out the [overview of user organization roles and the associated permissions](https://www.make.com/en/help/access-management/organizations#organization-roles)."}],"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/{userId}/user-organization-roles/{organizationId}":{"get":{"tags":["Users / User organization roles"],"summary":"Get user organization role details","description":"Gets information about user role in an organization with the specified `userId` and `organizationId`. Get all user role IDs with the API call `GET /users/roles`.","parameters":[{"name":"userId","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the user"},{"name":"organizationId","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the organization"},{"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"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"userOrganizationRole":{"type":"object","properties":{"userId":{"type":"integer"},"organizationId":{"type":"integer"},"usersRoleId":{"type":"integer"},"invitation":{"type":"string"},"organizationTeamsCount":{"type":"integer"},"joinedTeamsCount":{"type":"integer"}}}}}}}}}}}}}
```

## Update user role

> Updates the specified user role in the organization. Only organization owners and admins can change the user organization roles. Refer to the Make Help center for a breakdown of the user \[role permissions]\(<https://www.make.com/en/help/access-management/organizations#organization-roles).\\>
> \
> Specify the ID of the new role for the user in the request body. Get all available user role IDs and the corresponding user role names with the API call \`GET /users/roles\`.\
> \
> You cannot change the organization "Owner" with this endpoint. Use the API call to \[transfer organization ownership]\(./post--users--userid--user-organization-roles--organizationid--transfer.md) instead.\
> \
> If you send an empty request body, the user with the specified \`userId\` will be removed from the organization.<br>

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Users / User organization roles","description":"The following endpoints update and retrieve data about user organization roles of a user in an organization. Check out the [overview of user organization roles and the associated permissions](https://www.make.com/en/help/access-management/organizations#organization-roles)."}],"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:write"]}],"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/{userId}/user-organization-roles/{organizationId}":{"post":{"tags":["Users / User organization roles"],"summary":"Update user role","description":"Updates the specified user role in the organization. Only organization owners and admins can change the user organization roles. Refer to the Make Help center for a breakdown of the user [role permissions](https://www.make.com/en/help/access-management/organizations#organization-roles).\n\nSpecify the ID of the new role for the user in the request body. Get all available user role IDs and the corresponding user role names with the API call `GET /users/roles`.\n\nYou cannot change the organization \"Owner\" with this endpoint. Use the API call to [transfer organization ownership](./post--users--userid--user-organization-roles--organizationid--transfer.md) instead.\n\nIf you send an empty request body, the user with the specified `userId` will be removed from the organization.\n","parameters":[{"name":"userId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the user."},{"name":"organizationId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the organization."},{"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":"confirmed","in":"query","schema":{"type":"boolean"},"description":"Use this parameter when you are removing a user from an organization. Set this parameter to `true` is you want to delete the user's connections from the organization with the parameter `deleteConnections`."},{"name":"deleteConnections","in":"query","schema":{"type":"boolean"},"description":"Set this parameter to `true` if you are removing a user from an organization to delete also the user's connections. If you set this parameter to `false`, the API call won't delete the user's connections."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"usersRoleId":{"type":"integer","description":"The ID of the user role. Check the `GET /users/roles` API call for the available `usersRoleId` values."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"userOrganizationRole":{"type":"object","properties":{"userId":{"type":"integer"},"organizationId":{"type":"integer"},"usersRoleId":{"type":"integer"},"invitation":{"type":"string"}}}}}}}}}}}}}
```

## Transfer organization ownership

> Transfer organization ownership to the user with the specified \`userId\`. Only organization owner can transfer their ownership to another user.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Users / User organization roles","description":"The following endpoints update and retrieve data about user organization roles of a user in an organization. Check out the [overview of user organization roles and the associated permissions](https://www.make.com/en/help/access-management/organizations#organization-roles)."}],"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:write"]}],"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/{userId}/user-organization-roles/{organizationId}/transfer":{"post":{"tags":["Users / User organization roles"],"summary":"Transfer organization ownership","description":"Transfer organization ownership to the user with the specified `userId`. Only organization owner can transfer their ownership to another user.","parameters":[{"name":"userId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the user."},{"name":"organizationId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the organization."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"userOrganizationRoles":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"integer"},"organizationId":{"type":"integer"},"usersRoleId":{"type":"integer"},"invitation":{"type":"boolean"}}}}}}}}}}}}}}
```
