Unity Resource Management API
Public unity/v2 API for organizations, projects, environments, apps, and membership. Service accounts can call resource-scoped reads and environment create and delete. User access tokens work on every operation, and are required for the routes, the organization list, and all organization, project, and app mutations.
/users/meDownload OpenAPI specification:
List members of an organization
Returns a paginated list of members of the organization, each with their user type and add-on roles.
Authorizations
Use any one of the following options.
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
or
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Query parameters for "List members of an organization"
Sort field (default name). userType orders members by the strength of their user type: in ascending order, members without a user type come first, then project_guest, guest, user, manager and owner. Members with the same user type are ordered by name in the same direction. Groups, which only the project member list includes, come before the users in ascending order and after them in descending order, ordered by name among themselves.
enum:
"name", "userType"Code samples for "List members of an organization":
Request example
curl -X GET \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/unity/v2/organizations/{organizationId}/members"
Response example
{ "total": 42, "limit": 10, "offset": 0, "results": [ { "id": "3574024685494", "name": "Jane Doe", "email": "jane@studio.com", "avatar": "https://cdn.unity.com/avatars/3574024685494.png", "isGroup": false, "userType": { "name": "user", "source": "organization_group" }, "roles": [ { "id": "84dfeb39-1d8b-406c-8069-01677a182bf0", "name": "App Editor", "entityType": "organization" } ] } ]}
Get a member of an organization
Returns the given member of the organization, with their user type and add-on roles.
Authorizations
Use any one of the following options.
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
or
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Code samples for "Get a member of an organization":
Request example
curl -X GET \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/unity/v2/organizations/{organizationId}/members/{memberId}"
Response example
{ "id": "3574024685494", "name": "Jane Doe", "email": "jane@studio.com", "avatar": "https://cdn.unity.com/avatars/3574024685494.png", "isGroup": false, "userType": { "name": "user", "source": "organization_group" }, "roles": [ { "id": "84dfeb39-1d8b-406c-8069-01677a182bf0", "name": "App Editor", "entityType": "organization" } ]}
Update a member of an organization
Changes the member's user type, their baseline role in the organization. The user type is the only field that can be changed. A caller can't change their own user type (code 44058), give a user type stronger than their own (code 44013), or set the user type the member already has (code 44060). Only an owner can make a member an owner or change an owner's user type (code 44059). A demotion removes the member's add-on roles on the organization, and a demotion to guest also removes those on everything in it and takes the member out of the organization's groups, with the project roles those groups give. Every user must own at least one organization, so an owner who owns no other organization can't be given another user type (code 44040). A project guest has no organization role to change (code 44061).
Authorizations
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "Update a member of an organization":
Request example
curl -X PATCH \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "userType": { "name": "manager" }}' \ "https://services.api.unity.com/unity/v2/organizations/{organizationId}/members/{memberId}"
Response example
{ "id": "3574024685494", "name": "Jane Doe", "email": "jane@studio.com", "avatar": "https://cdn.unity.com/avatars/3574024685494.png", "isGroup": false, "userType": { "name": "user", "source": "organization_group" }, "roles": [ { "id": "84dfeb39-1d8b-406c-8069-01677a182bf0", "name": "App Editor", "entityType": "organization" } ]}
Remove a member from an organization
Removes the member from the organization: their user type, their add-on roles on the organization and everything in it, and their place in the organization's groups, with the project roles those groups give. A member who also holds a role directly on one of the organization's projects keeps that role, and stays in the organization as a project guest. A caller who can remove members can also remove themselves. The caller's user type must be at least as strong as the member's (code 44062). Every user must own at least one organization, so an owner who owns no other organization can't be removed (code 44040). A project guest has no organization role to remove (code 44061); remove them from the organization's projects instead.
Authorizations
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "Remove a member from an organization":
Request example
curl -X DELETE \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/unity/v2/organizations/{organizationId}/members/{memberId}"
Response example
{ "type": "https://services.docs.unity.com/docs/errors/#55", "title": "Bad Request", "status": 400, "detail": "Validation failed for 1 field", "code": 55, "requestId": "e4c494ed-a22f-4c19-a30d-ce1ddea96d01", "details": [ { "field": "name", "message": "must be 1-255 characters of letters, digits, hyphens or underscores" } ]}
List members of a project
Returns a paginated list of members of the project, each with their user type and add-on roles. Members are the users with a role on the project, the organization's members who have access to the project through their organization user type, and the groups assigned to the project. A user whose only organization user type is guest or project_guest is listed only when they hold a role on the project. In a restricted project, an organization member without a role on the project is listed only when they are a manager or owner, or hold one of the organization roles that apply to restricted projects. search matches a user's name or email, or a group's name. With sort=userType, groups come before users in ascending order and after them in descending order.
Authorizations
Use any one of the following options.
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
or
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Query parameters for "List members of a project"
Sort field (default name). userType orders members by the strength of their user type: in ascending order, members without a user type come first, then project_guest, guest, user, manager and owner. Members with the same user type are ordered by name in the same direction. Groups, which only the project member list includes, come before the users in ascending order and after them in descending order, ordered by name among themselves.
enum:
"name", "userType"Code samples for "List members of a project":
Request example
curl -X GET \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/unity/v2/projects/{projectId}/members"
Response example
{ "total": 42, "limit": 10, "offset": 0, "results": [ { "id": "3574024685494", "name": "Jane Doe", "email": "jane@studio.com", "avatar": "https://cdn.unity.com/avatars/3574024685494.png", "isGroup": false, "userType": { "name": "user", "source": "organization_group" }, "roles": [ { "id": "84dfeb39-1d8b-406c-8069-01677a182bf0", "name": "App Editor", "entityType": "organization" } ] } ]}
Get a member of a project
Returns the given member of the project, with their user type and add-on roles. The member is a user, including one who has access to the project through their organization user type; a group's ID names no member here.
Authorizations
Use any one of the following options.
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
or
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Code samples for "Get a member of a project":
Request example
curl -X GET \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/unity/v2/projects/{projectId}/members/{memberId}"
Response example
{ "id": "3574024685494", "name": "Jane Doe", "email": "jane@studio.com", "avatar": "https://cdn.unity.com/avatars/3574024685494.png", "isGroup": false, "userType": { "name": "user", "source": "organization_group" }, "roles": [ { "id": "84dfeb39-1d8b-406c-8069-01677a182bf0", "name": "App Editor", "entityType": "organization" } ]}
Update a member of a project
Changes the member's user type on the project, their direct baseline role on it, which is the only field that can be changed. It never adds a member, and it doesn't change the member's user type in the organization, which a read still returns when it is stronger. A caller can't change their own user type (code 44058). Only an owner, of the project or of its organization, can make a member an owner or change the user type of a member who is an owner (code 44059). The new user type can't be the one the member's direct role already has (code 44060), stronger than the caller's own user type, or weaker than the member's user type in the organization (code 44013). A demotion removes the add-on roles given to the member directly on the project; those they get through a group stay. A member without a direct role on the project, such as one whose access comes only from the organization or through a group, has no user type of their own on it to change (code 44061).
Authorizations
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "Update a member of a project":
Request example
curl -X PATCH \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "userType": { "name": "manager" }}' \ "https://services.api.unity.com/unity/v2/projects/{projectId}/members/{memberId}"
Response example
{ "id": "3574024685494", "name": "Jane Doe", "email": "jane@studio.com", "avatar": "https://cdn.unity.com/avatars/3574024685494.png", "isGroup": false, "userType": { "name": "user", "source": "organization_group" }, "roles": [ { "id": "84dfeb39-1d8b-406c-8069-01677a182bf0", "name": "App Editor", "entityType": "organization" } ]}
Remove a member from a project
Removes the member's direct role on the project, and the add-on roles given to them directly on the project and everything in it; add-on roles they get through a group stay. It does not affect their organization membership: a member who also has access to the project through their organization user type or through a group stays a member. A user who had access to the organization only through their project roles, and has none left in it, is no longer listed among the organization's members. The caller's user type must be at least as strong as the member's (code 44062). A member without a direct role on the project, such as one whose access comes only from the organization or through a group, has no user type of their own on it to remove (code 44061).
Authorizations
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "Remove a member from a project":
Request example
curl -X DELETE \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/unity/v2/projects/{projectId}/members/{memberId}"
Response example
{ "type": "https://services.docs.unity.com/docs/errors/#55", "title": "Bad Request", "status": 400, "detail": "Validation failed for 1 field", "code": 55, "requestId": "e4c494ed-a22f-4c19-a30d-ce1ddea96d01", "details": [ { "field": "name", "message": "must be 1-255 characters of letters, digits, hyphens or underscores" } ]}