> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# Access API reference

A centralized API to manage resource access control through roles and permissions.

A centralized API to manage resource access control through roles and permissions.

#### Want to get started?

[Roles user guide](https://www.sanity.io/docs/user-guides/roles)
Configuring roles and permissions in the manage interface

## Authentication

- All requests must be [authenticated](https://www.sanity.io/docs/content-lake/http-auth).
- See the individual endpoints below for required usage permissions.

## Terms

Throughout this document the terms `{resourceType}` and `{resourceId}` refer to the resource the API request is being applied to.

- `{resourceType}` can be an organization or project.
- `{resourceId}` is the ID of the resource the API request affects.

When a client uses this API, it acts in the context of a specific resource. For example:

- https://api.sanity.io/v2025-07-11/access/**organization/or0Bc1hcJ**/roles
- https://api.sanity.io/v2025-07-11/access/**project/c7ja4siy**/roles

## Key concepts

### Resource

A resource is an entity that can be managed and accessed through the API. Currently, the supported resources are `organization` and `project`.

### Permission

Every resource has a list of permissions. These permissions represent actions that can be performed on the resource. A user or robot must be granted a permission (through a role) in order to perform the action.

The permission typically takes the form of `{company}.{resourceType}.{objectName}.{action}` but this is not always the case due to legacy terms.

There are both pre-defined and custom permissions. Pre-defined permissions are included with the product and are not editable.

### Role

A role is a named collection of permissions that can be applied to a user or robot. Roles are in the scope of a resource and can only receive permissions that are in the same resource scope. For example, a project role can only include document permissions for that project.

A role is specific to a single resource and can only include permissions within that resource's scope. In the future, roles will be able to include permissions for child resources as well. For example, an organization role will be able to include document permissions for specific projects or all projects.

A user cannot be part of a resource without a role. Each user in an organization must have at least one role assigned to them.

There are both pre-defined and custom roles. Pre-defined roles are included with the product and are not editable, but can be removed from a resource if the feature is enabled.

### User

A user is a person that has one or more roles assigned to them.

A user is initially added to a resource via invitation or access request. A user that already has one role can be assigned roles in another project within the same organization or at the organization level without requiring a separate invite.

As an organization owns multiple resources (e.g., projects), any users with roles on these resources are also returned when reading the users of an organization.

If a user has roles in multiple projects, they are considered a single user and can be referenced by their `sanityUserId`. For example, inviting user A to project B and project C in the same organization will result in a single user with two memberships.

### Attribute

**This is a paid feature**
This feature is available on certain Enterprise plans. [Talk to sales](https://www.sanity.io/contact/sales?ref=docs) to learn more.

An attribute is a named piece of identity data associated with a user within an organization, such as `location="torrevieja"` or `department="front_desk"`.

Attributes can come from two sources: **SAML**, where they are automatically captured from assertions during SSO authentication, and **Sanity**, where they are set by administrators through the API or Manage interface.

Attributes can be referenced in GROQ filters within role definitions using the `user::attributes()` function, enabling parameterized access control that adapts dynamically to each user.

## Administrator Rules

### Changing administrators

Only administrators can assign or remove roles with admin permissions. This prevents unauthorized permission elevation.

This rule applies only to the default roles. Custom roles are fully managed by the organization and can be assigned to users without restriction.

### Last administrator

Each resource must have at least one role assigned to at least one user that can read users, read roles, and assign roles to users. This prevents an organization from losing control over their resources.

This is designed as a permission-level check and not a role-level check, so that the default roles can be removed from a resource. Customers with advanced roles management enabled can remove the default roles from a resource.

## Breaking changes from previous versions

See the [details of the existing API for a better understanding of the changes](https://www.sanity.io/docs/content-lake/roles-concepts).

Summary:

- `Access` is now the root path for managing access-based resources. Previously it was organization and project but these are now nested under the access root.
- Internal IDs are no longer exposed for permissions or roles. The `name` property is now used as the unique identifier for permissions and roles.
- `Permissions` now represent `grants`, `resources`, and `permissionResourceSchema`. These are now legacy terms.
- The endpoint `/organization/:organizationId/users` returns users for all resources owned by the organization. Previously, a client would have to make a request for each resource (e.g., project) individually.
- `users` replaces the term `ACL`. Users represents individuals assigned roles within the organization.
- The pre-defined roles can be completely removed from a resource. Previously, default roles could not be removed from a resource. E.g., a project required at least one project administrator, even if there were custom roles that would cover the same use case.



<p>A centralized API to manage resource access control through roles and permissions.</p>
<h3>Overview:</h3> <p>Throughout this document the terms <code>{resourceType}</code> and <code>{resourceId}</code> refer to the resource the API request is being applied to. <ul>
  <li><code>{resourceType}</code> can be an organization or project.</li>
  <li><code>{resourceId}</code> is the ID of the resource the API request affects.</li>
</ul>
<p>When a client uses this API, it acts in the context of a specific resource. For example:</p> <ul>
  <li>https://api.sanity.io/v2025-07-11/access/<b>organization/or0Bc1hcJ</b>/roles</li>
  <li>https://api.sanity.io/v2025-07-11/access/<b>project/c7ja4siy</b>/roles</li>
</ul>
<h3>Key Concepts</h3> <ul> <li>Resource</li> <ul> <li>A resource is an entity that can be managed and accessed through the API. Currently, the supported resources are <code>organization</code> and <code>project</code>.</li> </ul> <li>Permission</li> <ul> <li>Every resource has a list of permissions. These permissions represent actions that can be performed on the resource. A user or robot must be granted a permission (through a role) in order to perform the action.</li> <li>The permission typically takes the form of <code>{company}.{resourceType}.{objectName}.{action}</code> but this is not always the case due to legacy terms.</li> <li>There are both pre-defined and custom permissions. Pre-defined permissions are included with the product and are not editable.</li> </ul> <li>Role</li> <ul> <li>A role is a named collection of permissions that can be applied to a user or robot. Roles are in the scope of a resource and can only receive permissions that are in the same resource scope. For example, a project role can only include document permissions for that project.</li> <li>A role is specific to a single resource and can only include permissions within that resource's scope. In the future, roles will be able to include permissions for child resources as well. For example, an organization role will be able to include document permissions for specific projects or all projects.</li> <li>A user cannot be part of a resource without a role. Each user in an organization must have at least one role assigned to them.</li> <li>There are both pre-defined and custom roles. Pre-defined roles are included with the product and are not editable, but can be removed from a resource if the feature is enabled.</li> </ul> <li>User</li> <ul> <li>A user is a person that has one or more roles assigned to them.</li> <li>A user is initially added to a resource via invitation or access request. A user that already has one role can be assigned roles in another project within the same organization or at the organization level without requiring a separate invite.</li> <li>As an organization owns multiple resources (e.g., projects), any users with roles on these resources are also returned when reading the users of an organization.</li> <li>If a user has roles in multiple projects, they are considered a single user and can be referenced by their sanityUserId. For example, inviting user A to project B and project C in the same organization will result in a single user with two memberships.</li> </ul> </ul>
<h3>Administrator Rules</h3> <ul> <li>Changing Administrators</li> <ul> <li>Only administrators can assign or remove roles with admin permissions. This prevents unauthorized permission elevation.</li> <li>This rule applies only to the default roles. Custom roles are fully managed by the organization and can be assigned to users without restriction.</li> </ul> <li>Last Administrator</li> <ul> <li>Each resource must have at least one role assigned to at least one user that can read users, read roles, and assign roles to users. This prevents an organization from losing control over their resources.</li> <li>This is designed as a permission-level check and not a role-level check, so that the default roles can be removed from a resource. Customers with advanced roles management enabled can remove the default roles from a resource.</li> </ul> </ul>
<h3>Breaking Changes from previous versions</h3> <p>See the <a href="https://www.sanity.io/docs/roles-reference">details of the existing API for a better understanding of the changes</a>.</p> <p>Summary:</p> <ul>
  <li><code>Access</code> is now the root path for managing access-based resources. Previously it was organization and project but these are now nested under the access root.</li>
  <li>Internal IDs are no longer exposed for permissions or roles. The <code>name</code> property is now used as the unique identifier for permissions and roles.</li>
  <li><code>Permissions</code> now represent <code>grants</code>, <code>resources</code>, and <code>permissionResourceSchema</code>. These are now legacy terms.</li>
  <li>The endpoint <code>/organization/:organizationId/users</code> returns users for all resources owned by the organization. Previously, a client would have to make a request for each resource (e.g., project) individually.</li>
  <li><code>users</code> replaces the term <code>ACL</code>. Users represents individuals assigned roles within the organization.</li>
  <li>The pre-defined roles can be completely removed from a resource. Previously, default roles could not be removed from a resource. E.g., a project required at least one project administrator, even if there were custom roles that would cover the same use case.</li>
</ul>


## Authentication

**bearerAuth**: HTTP bearer authentication

**robotTokenAuth**: HTTP bearer authentication

The robot token being revoked or rotated.

All endpoints require: `bearerAuth`

**Base URL:** `https://api.sanity.io`

Production External API

## Users

Manage users who have been assigned organization roles.

### List all users of a resource and their assigned roles.

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/users`

Retrieve a list of all users of a resource along with their assigned roles. When the resourceType is `organization`, this endpoint will return users of projects owned by the organization. Requires permission
  - `sanity.{resourceType}.members.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| nextCursor | string | No | The cursor for pagination. Use the nextCursor from the previous response to get the next page. |
| limit | integer | No | The number of items to return per page. Default: `100`. |
| includeImpliedRoles | boolean | No | Whether to include implied roles in the response. Default: `false`. |
| sortBy | string | No | Field by which to sort result. Currently supports field 'displayName' |
| orderBy | string | No | In which order to list results |
| email | string | No | Filter results based on `email` match |
| displayName | string | No | Filter results based on `displayName` match |

#### Responses

**200** - A paginated list of resource users and their assigned roles

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | User[] | Yes |  |
| data[].sanityUserId | string | Yes |  |
| data[].profile | object | Yes |  |
| data[].profile.id | string | Yes |  |
| data[].profile.displayName | string | Yes |  |
| data[].profile.email | string | Yes |  |
| data[].profile.familyName | string |  |  |
| data[].profile.givenName | string |  |  |
| data[].profile.middleName | string \| null |  |  |
| data[].profile.imageUrl | string (uri) |  |  |
| data[].profile.provider | string | Yes |  |
| data[].profile.tosAcceptedAt | string (date-time) |  |  |
| data[].profile.createdAt | string (date-time) | Yes |  |
| data[].profile.updatedAt | string (date-time) |  |  |
| data[].profile.isCurrentUser | boolean |  |  |
| data[].profile.providerId | string |  |  |
| data[].memberships | Membership[] | Yes |  |
| data[].memberships[].addedAt | string (date-time) |  |  |
| data[].memberships[].resourceType | string | Yes |  |
| data[].memberships[].resourceId | string | Yes |  |
| data[].memberships[].roleNames | string[] | Yes |  |
| data[].memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| data[].memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |
| totalCount | integer | Yes | Total number of users available |

**400** - Bad request

**401** - Unauthorized

**404** - Resource not found

### Apply organization default role to all users.

`PUT https://api.sanity.io/v2025-07-11/access/organization/{resourceId}/users/roles/default`

Add default role to all resource users. Limited to Organization. Requires permission
  - `sanity.organization.members.update`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Responses

**201** - Roles assigned to the resource users

**400** - Invalid input

**404** - Resource not found

### Get user and roles.

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/users/{sanityUserId}`

Get the users for a single user of a resource. Requires permission - `sanity.{resourceType}.members.read`

#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| sanityUserId | string | Yes | The User ID |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| includeImpliedRoles | boolean | No | Whether to include implied roles in the response. Default: `false`. |

#### Responses

**200** - Get resource user and their roles.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| sanityUserId | string | Yes |  |
| profile | object | Yes |  |
| profile.id | string | Yes |  |
| profile.displayName | string | Yes |  |
| profile.email | string | Yes |  |
| profile.familyName | string |  |  |
| profile.givenName | string |  |  |
| profile.middleName | string \| null |  |  |
| profile.imageUrl | string (uri) |  |  |
| profile.provider | string | Yes |  |
| profile.tosAcceptedAt | string (date-time) |  |  |
| profile.createdAt | string (date-time) | Yes |  |
| profile.updatedAt | string (date-time) |  |  |
| profile.isCurrentUser | boolean |  |  |
| profile.providerId | string |  |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

**400** - Bad request

**404** - Resource not found

### Remove a user from a resource.

`DELETE https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/users/{sanityUserId}`

This removes all roles. If the resourceType is `organization`, this will also remove the user from all projects owned by the organization. Requires permission
  - `sanity.{resourceType}.members.delete`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| sanityUserId | string | Yes | The User ID |

#### Responses

**200** - User removed from the resource

**400** - Invalid input

**404** - Resource not found

### Remove own user from a resource.

`DELETE https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/users/me`

This removes the currently authenticated user from the given resource. If the resourceType is `organization`, this will also remove the user from all projects owned by the organization. This is a specific route which does not require resource permissions, since users should be able to remove themselves from resources without requiring an administrator to intervene for them.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Responses

**200** - User removed from the resource

**400** - Invalid input

**404** - Resource not found

### Replace the role set for a user.

`PUT https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/users/{sanityUserId}/roles`

Replace the role set for a user on a resource. The supplied `roleNames` become the user's complete role set: missing roles are added, extra roles are removed. The list must contain at least one role: at least one role must remain assigned at all times. Roles are assigned before extras are revoked so the user never momentarily drops to zero roles.
A single composite `members.role.replace` activity event is emitted per call (no per-role events).
Requires permission
  - `sanity.{resourceType}.members.update`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| sanityUserId | string | Yes | The User ID |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| roleNames | string[] | Yes |  |

#### Responses

**200** - User's role set updated

**400** - Invalid input

**403** - Forbidden (admin required for restricted roles)

**404** - Resource not found

**409** - Role assignments are managed via SAML

### Add a role to a user.

`PUT https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/users/{sanityUserId}/roles/{roleName}`

Add a role to a user. Requires permission
  - `sanity.{resourceType}.members.update`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| sanityUserId | string | Yes | The User ID |
| roleName | string | Yes | The role name. |

#### Responses

**201** - Role assigned to the user

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| sanityUserId | string | Yes |  |
| profile | object | Yes |  |
| profile.id | string | Yes |  |
| profile.displayName | string | Yes |  |
| profile.email | string | Yes |  |
| profile.familyName | string |  |  |
| profile.givenName | string |  |  |
| profile.middleName | string \| null |  |  |
| profile.imageUrl | string (uri) |  |  |
| profile.provider | string | Yes |  |
| profile.tosAcceptedAt | string (date-time) |  |  |
| profile.createdAt | string (date-time) | Yes |  |
| profile.updatedAt | string (date-time) |  |  |
| profile.isCurrentUser | boolean |  |  |
| profile.providerId | string |  |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

**400** - Invalid input

**404** - Resource not found

**409** - Role assignments are managed via SAML

### Remove a role from a user in a resource.

`DELETE https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/users/{sanityUserId}/roles/{roleName}`

You cannot remove the last role from a user. You must have at least one role assigned to a user. Requires permission
  - `sanity.{resourceType}.members.update`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| sanityUserId | string | Yes | The User ID |
| roleName | string | Yes | The role name. |

#### Responses

**200** - Role removed from user

**400** - Invalid input

**404** - Resource not found

**409** - Role assignments are managed via SAML

## Robots

Manage robots and their tokens, including rotation and revocation.

### Get robots with access to this resource

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/robots`

Retrieves a list of robots that have access to the specified resource.

### Access to children resources

By default, this endpoint returns robots that have at least one role on
the specified resource. Use the optional `includeChildren` parameter to
include robots that have a role on children resources as well. This
only applies to `organization` resources.

### Authorization

This endpoint requires an authenticated user session with the following
permissions:
- `sanity.{resourceType}.tokens.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| includeChildren | boolean | No | Whether to include children resources in the response. Only applies to `organization` resources. |
| nextCursor | string | No | The cursor for pagination. Use the nextCursor from the previous response to get the next page. |
| limit | integer | No | The number of items to return per page. Default: `100`. |

#### Responses

**200** - A paginated list of robots

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | Robot[] | Yes |  |
| data[].id | string | Yes | The unique identifier for the robot. |
| data[].tokenId | string |  | The unique identifier for the active token. |
| data[].label | string | Yes | A human-readable label for the robot. |
| data[].createdAt | string (date-time) | Yes | The creation date of the robot. |
| data[].expiresAt | string (date-time) |  | When the active token expires. |
| data[].lastSeenAt | string (date-time) |  | When the robot was last used at the resource this request is scoped to. Updated about once an hour. Omitted if no use has been recorded since its current token was issued. |
| data[].managedBy | object |  | The resource this token was created under. When this is an organization but the token is listed under a project, the token was created via the organization and should be managed there. Omitted for legacy tokens whose origin can't be determined. |
| data[].managedBy.resourceType | string | Yes |  |
| data[].managedBy.resourceId | string | Yes |  |
| data[].memberships | Membership[] | Yes |  |
| data[].memberships[].addedAt | string (date-time) |  |  |
| data[].memberships[].resourceType | string | Yes |  |
| data[].memberships[].resourceId | string | Yes |  |
| data[].memberships[].roleNames | string[] | Yes |  |
| data[].memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| data[].memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |

**400** - Bad request.

**401** - Session is not authenticated.

**404** - Resource not found.

### Create robot and associated token

`POST https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/robots`

Creates a robot with the specified role grants and returns its secret
token.

Only the specified resource and its children resources can be specified
in the role grants. The robot will not have access to other resources.

### Secret token

The secret token is returned only once and cannot be retrieved again.
If it is compromised, the token holder can replace it through the
self-service rotate endpoint. If it is lost, create a replacement robot
and delete this one.

### Email notifications

For project robots, an email notification is sent to all project administrators
by default when a robot is created. This can be disabled by setting
`sendNotification=false`, but only for projects created within the last 5 minutes.

### Authorization

This endpoint requires an authenticated user session with the following
permissions:
- `sanity.{resourceType}.tokens.create`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| sendNotification | boolean | No | Whether to send email notification to administrators when creating project robots. Only applies to project resource types. Can be set to false for projects created within the last 5 minutes. Default: `true`. |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| label | string | Yes | A human-readable label for the robot. |
| expiresAt | string (date-time) |  | When the token should expire. |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

#### Responses

**201** - Robot created.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| token | string | Yes | The secret token for the robot. This value is returned only when the token is created or rotated and cannot be retrieved again. |
| id | string | Yes | The unique identifier for the robot. |
| tokenId | string |  | The unique identifier for the active token. |
| label | string | Yes | A human-readable label for the robot. |
| createdAt | string (date-time) | Yes | The creation date of the robot. |
| expiresAt | string (date-time) |  | When the active token expires. |
| lastSeenAt | string (date-time) |  | When the robot was last used at the resource this request is scoped to. Updated about once an hour. Omitted if no use has been recorded since its current token was issued. |
| managedBy | object |  | The resource this token was created under. When this is an organization but the token is listed under a project, the token was created via the organization and should be managed there. Omitted for legacy tokens whose origin can't be determined. |
| managedBy.resourceType | string | Yes |  |
| managedBy.resourceId | string | Yes |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

**400** - Bad request.

**401** - Session is not authenticated.

**404** - Resource not found.

### Get robot metadata

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/robots/{robotId}`

Retrieves a robot using its unique identifier.

It's not possible to retrieve a robot token.

### Authorization

This endpoint requires an authenticated user session with the following
permissions:
- `sanity.{resourceType}.tokens.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| robotId | string | Yes | The robot's unique identifier. |

#### Responses

**200** - Robot found.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes | The unique identifier for the robot. |
| tokenId | string |  | The unique identifier for the active token. |
| label | string | Yes | A human-readable label for the robot. |
| createdAt | string (date-time) | Yes | The creation date of the robot. |
| expiresAt | string (date-time) |  | When the active token expires. |
| lastSeenAt | string (date-time) |  | When the robot was last used at the resource this request is scoped to. Updated about once an hour. Omitted if no use has been recorded since its current token was issued. |
| managedBy | object |  | The resource this token was created under. When this is an organization but the token is listed under a project, the token was created via the organization and should be managed there. Omitted for legacy tokens whose origin can't be determined. |
| managedBy.resourceType | string | Yes |  |
| managedBy.resourceId | string | Yes |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

**400** - Bad request.

**401** - Session is not authenticated.

**404** - Resource or robot not found.

### Update robot token

`PUT https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/robots/{robotId}`

Updates the expiry date for a robot token.

### Authorization

This endpoint requires an authenticated user session with the following
permissions:
- `sanity.{resourceType}.tokens.create`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| robotId | string | Yes | The robot's unique identifier. |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| expiresAt | string (date-time) | Yes | When the robot token should expire. |

#### Responses

**200** - Robot token expiry updated.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes | The unique identifier for the robot. |
| tokenId | string |  | The unique identifier for the active token. |
| label | string | Yes | A human-readable label for the robot. |
| createdAt | string (date-time) | Yes | The creation date of the robot. |
| expiresAt | string (date-time) |  | When the active token expires. |
| lastSeenAt | string (date-time) |  | When the robot was last used at the resource this request is scoped to. Updated about once an hour. Omitted if no use has been recorded since its current token was issued. |
| managedBy | object |  | The resource this token was created under. When this is an organization but the token is listed under a project, the token was created via the organization and should be managed there. Omitted for legacy tokens whose origin can't be determined. |
| managedBy.resourceType | string | Yes |  |
| managedBy.resourceId | string | Yes |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

**400** - Bad request.

**401** - Session is not authenticated.

**404** - Resource, robot, or token not found.

### Revoke robot token and delete robot

`DELETE https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/robots/{robotId}`

Permanently revokes the robot's active token and deletes the robot.
After this operation succeeds, the token can no longer authenticate.

### Authorization

This endpoint requires an authenticated session with the following
permissions:
- `sanity.{resourceType}.tokens.delete`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| robotId | string | Yes | The robot's unique identifier. |

#### Responses

**204** - Robot token revoked and robot deleted.

**400** - Bad request.

**401** - Session is not authenticated.

**403** - Session is missing required permissions or has the wrong type.

**404** - Resource or robot not found.

### Revoke current robot token

`DELETE https://api.sanity.io/v2025-07-11/access/robots/me`

Revokes the robot token supplied in the `Authorization` header and
deletes its associated robot. No resource or robot identifier is
required.

For a robot token the operation is idempotent: once the first
call has deleted the robot, cleared its roles and invalidated its
sessions, a subsequent call is still `204`.

This endpoint is rate limited. See the `429` response for details.


#### Responses

**204** - Robot token revoked, or the robot was already revoked.

**400** - Bad request.

**401** - No token was presented.

**403** - The token does not belong to a robot.

**429** - The request was rejected because a rate limit was exceeded. Retry after the number of seconds given in the `Retry-After` header.

### Rotate current robot token

`POST https://api.sanity.io/v2025-07-11/access/robots/me/rotate`

Replaces the robot token supplied in the `Authorization` header while
preserving the robot, its roles, and the token's expiration. No
resource or robot identifier is required.

There is no overlap period. After this operation succeeds, the previous
token is revoked and clients must use the new token. The new secret is
returned only in this response and cannot be retrieved again.

Rotation replaces exactly the token that authenticated the request.

This endpoint is rate limited. See the `429` response for details.


#### Responses

**200** - Robot token rotated.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| token | string | Yes | The secret token for the robot. This value is returned only when the token is created or rotated and cannot be retrieved again. |
| id | string | Yes | The unique identifier for the robot. |
| tokenId | string |  | The unique identifier for the active token. |
| label | string | Yes | A human-readable label for the robot. |
| createdAt | string (date-time) | Yes | The creation date of the robot. |
| expiresAt | string (date-time) |  | When the active token expires. |
| lastSeenAt | string (date-time) |  | When the robot was last used at the resource this request is scoped to. Updated about once an hour. Omitted if no use has been recorded since its current token was issued. |
| managedBy | object |  | The resource this token was created under. When this is an organization but the token is listed under a project, the token was created via the organization and should be managed there. Omitted for legacy tokens whose origin can't be determined. |
| managedBy.resourceType | string | Yes |  |
| managedBy.resourceId | string | Yes |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

**400** - Bad request.

**401** - The presented token is not valid: it identifies no active robot or no live session, for example because the robot was already revoked or the session was destroyed by a concurrent revoke or rotate. Unlike revocation, rotation is not idempotent — there is no token left to replace, so clients should re-authenticate with their current token.

**403** - The token does not belong to a robot.

**429** - The request was rejected because a rate limit was exceeded. Retry after the number of seconds given in the `Retry-After` header.

**502** - Sanity Functions could not verify or update the managed token.

## Roles

Manage roles assignable to users of an organization or application.

### List roles assignable to a user on this resource.

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/roles`

Requires permission
  - `sanity.{resourceType}.roles.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| includeChildren | boolean | No | Whether to include children resources in the response. Only applies to `organization` resources. |
| nextCursor | string | No | The cursor for pagination. Use the nextCursor from the previous response to get the next page. |
| limit | integer | No | The number of items to return per page. Default: `100`. |
| includeImpliedRoles | boolean | No | Whether to include implied roles in the response. Default: `false`. |

#### Responses

**200** - A paginated list of roles for a resource

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | Role[] | Yes |  |
| data[].name | string | Yes |  |
| data[].title | string | Yes |  |
| data[].description | string |  |  |
| data[].isCustom | boolean |  |  |
| data[].resourceType | string | Yes |  |
| data[].resourceId | string | Yes |  |
| data[].appliesToUsers | boolean | Yes |  |
| data[].appliesToRobots | boolean | Yes |  |
| data[].permissions | object[] | Yes |  |
| data[].permissions[].type | string (enum) |  | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| data[].permissions[].action | object (variants) |  |  |
| data[].permissions[].name | string |  | The name of the permission. |
| data[].permissions[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |

### Create a role

`POST https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/roles`

Requires permission:
  - `sanity.{resourceType}.roles.create`
Requires feature:
  - `advancedRolesManagement`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| title | string | Yes |  |
| name | string | Yes |  |
| description | string |  | Default: `""`. |
| appliesToUsers | boolean | Yes | Default: `true`. |
| appliesToRobots | boolean | Yes | Default: `true`. |
| permissions | object[] | Yes |  |
| permissions[].name | string |  | The name of the permission. |
| permissions[].action | object (variants) |  |  |
| permissions[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

#### Responses

**201** - Role created

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string | Yes |  |
| title | string | Yes |  |
| description | string |  |  |
| isCustom | boolean |  |  |
| resourceType | string | Yes |  |
| resourceId | string | Yes |  |
| appliesToUsers | boolean | Yes |  |
| appliesToRobots | boolean | Yes |  |
| permissions | object[] | Yes |  |
| permissions[].type | string (enum) |  | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| permissions[].action | object (variants) |  |  |
| permissions[].name | string |  | The name of the permission. |
| permissions[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

**400** - Invalid input

**401** - Unauthorized

**404** - Resource not found

### Get a role

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/roles/{roleName}`

Requires permission
  - `sanity.{resourceType}.roles.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| roleName | string | Yes | The role name. |

#### Responses

**200** - Get a role

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string | Yes |  |
| title | string | Yes |  |
| description | string |  |  |
| isCustom | boolean |  |  |
| resourceType | string | Yes |  |
| resourceId | string | Yes |  |
| appliesToUsers | boolean | Yes |  |
| appliesToRobots | boolean | Yes |  |
| permissions | object[] | Yes |  |
| permissions[].type | string (enum) |  | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| permissions[].action | object (variants) |  |  |
| permissions[].name | string |  | The name of the permission. |
| permissions[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

**401** - Unauthorized

**404** - Role not found

### Update a role

`PUT https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/roles/{roleName}`

Requires permission:
  - `sanity.{resourceType}.roles.update`

Requires feature:
  - `advancedRolesManagement`

Replaces existing object values including permissions.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| roleName | string | Yes | The role name. |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| title | string | Yes |  |
| name | string | Yes |  |
| description | string |  | Default: `""`. |
| appliesToUsers | boolean | Yes | Default: `true`. |
| appliesToRobots | boolean | Yes | Default: `true`. |
| permissions | object[] | Yes |  |
| permissions[].name | string |  | The name of the permission. |
| permissions[].action | object (variants) |  |  |
| permissions[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

#### Responses

**200** - Role updated

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string | Yes |  |
| title | string | Yes |  |
| description | string |  |  |
| isCustom | boolean |  |  |
| resourceType | string | Yes |  |
| resourceId | string | Yes |  |
| appliesToUsers | boolean | Yes |  |
| appliesToRobots | boolean | Yes |  |
| permissions | object[] | Yes |  |
| permissions[].type | string (enum) |  | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| permissions[].action | object (variants) |  |  |
| permissions[].name | string |  | The name of the permission. |
| permissions[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

**400** - Invalid input

**401** - Unauthorized

**403** - Forbidden. Only custom roles can be changed.

**404** - Role not found

### Delete a role

`DELETE https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/roles/{roleName}`

Requires permission:
  - `sanity.{resourceType}.roles.delete` for resource scoped roles (e.g. project admin)

Requires feature:
  - `advancedRolesManagement`

Cannot delete a role that is assigned to a user. The role needs to be removed from users first.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| roleName | string | Yes | The role name. |

#### Responses

**200** - Role deleted

**401** - Unauthorized

**404** - Role not found

## Permissions

View permissions available to roles within an organization or application.

### Get Permissions.

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/permissions`

Gets the available permissions within the scope of a resource. These permissions can be applied to roles and are used to determine user/robot access to resources. <br /> <br /> Requires permission: `sanity.{resourceType}.roles.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| nextCursor | string | No | The cursor for pagination. Use the nextCursor from the previous response to get the next page. |
| limit | integer | No | The number of items to return per page. Default: `100`. |

#### Responses

**200** - A paginated list of permission resources for the resource

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | Permission[] | Yes |  |
| data[].type | string (enum) | Yes | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| data[].actions | object (variants) |  | The actions allowed by the permission for this role. |
| data[].name | string | Yes | The name of the permission. This is the unique identifier for the resource. |
| data[].title | string | Yes | The human-readable title of the permission. |
| data[].description | string |  | The description of the permission. |
| data[].resourceType | string | Yes | The resource the permission applies to. |
| data[].resourceId | string | Yes | The resource ID the permission applies to. |
| data[].ownerOrganizationId | string |  | The organization ID the permission applies to. Used for wildcard permissions where the resourceId is `*`. |
| data[].isCustom | boolean |  | Whether the permission is a custom (user-created) permission or a system-provided one. |
| data[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |

**400** - Bad request

**401** - Unauthorized

**404** - Resource not found

### Create a permission.

`POST https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/permissions`

Creates a custom permission on a resource. <br /> <br /> Requires permission: `sanity.{resourceType}.roles.create` <br /> Requires feature: `advancedRolesManagement` <br /> <br /> See Example. It creates a permission to allow a user to read legal documents in project `c7ja4siy` and dataset `production`.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Request body

`application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| type | string (enum) | Yes | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| name | string | Yes | The name of the permission resource. A unique identifier for a permission. |
| title | string | Yes | A human-readable title of the permission resource. This is used for display purposes. |
| description | string | Yes | The description of the permission resource. |
| config | object |  | Some permissions allow for additional configuration when used with document permissions. Accepts a groq filter or a dataset name. |

#### Responses

**201** - Permission resource created successfully

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| type | string (enum) | Yes | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| actions | object (variants) |  | The actions allowed by the permission for this role. |
| name | string | Yes | The name of the permission. This is the unique identifier for the resource. |
| title | string | Yes | The human-readable title of the permission. |
| description | string |  | The description of the permission. |
| resourceType | string | Yes | The resource the permission applies to. |
| resourceId | string | Yes | The resource ID the permission applies to. |
| ownerOrganizationId | string |  | The organization ID the permission applies to. Used for wildcard permissions where the resourceId is `*`. |
| isCustom | boolean |  | Whether the permission is a custom (user-created) permission or a system-provided one. |
| params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

**400** - Bad request

**401** - Unauthorized

### Get a permission

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/permissions/{permissionName}`

Gets a permission for a resource by name. Requires permission
  - `sanity.{resourceType}.roles.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| permissionName | string | Yes | The name of the permission. This is a unique identifier for the permission. |

#### Responses

**200** - The permission resource for the resource

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| type | string (enum) | Yes | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| actions | object (variants) |  | The actions allowed by the permission for this role. |
| name | string | Yes | The name of the permission. This is the unique identifier for the resource. |
| title | string | Yes | The human-readable title of the permission. |
| description | string |  | The description of the permission. |
| resourceType | string | Yes | The resource the permission applies to. |
| resourceId | string | Yes | The resource ID the permission applies to. |
| ownerOrganizationId | string |  | The organization ID the permission applies to. Used for wildcard permissions where the resourceId is `*`. |
| isCustom | boolean |  | Whether the permission is a custom (user-created) permission or a system-provided one. |
| params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

**400** - Bad request

**401** - Unauthorized

**404** - Resource not found

### Update a permission

`PUT https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/permissions/{permissionName}`

Updates a permission for a resource. Requires permission
  - `sanity.{resourceType}.roles.update`
Requires feature:
  - `advancedRolesManagement`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| permissionName | string | Yes | The name of the permission. This is a unique identifier for the permission. |

#### Request body

`application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| type | string (enum) | Yes | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| name | string | Yes | The name of the permission resource. A unique identifier for a permission. |
| title | string | Yes | A human-readable title of the permission resource. This is used for display purposes. |
| description | string | Yes | The description of the permission resource. |
| config | object |  | Some permissions allow for additional configuration when used with document permissions. Accepts a groq filter or a dataset name. |

#### Responses

**200** - Permission resource updated successfully

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| type | string (enum) | Yes | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| actions | object (variants) |  | The actions allowed by the permission for this role. |
| name | string | Yes | The name of the permission. This is the unique identifier for the resource. |
| title | string | Yes | The human-readable title of the permission. |
| description | string |  | The description of the permission. |
| resourceType | string | Yes | The resource the permission applies to. |
| resourceId | string | Yes | The resource ID the permission applies to. |
| ownerOrganizationId | string |  | The organization ID the permission applies to. Used for wildcard permissions where the resourceId is `*`. |
| isCustom | boolean |  | Whether the permission is a custom (user-created) permission or a system-provided one. |
| params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

**400** - Bad request

**401** - Unauthorized

**404** - Resource not found

### Delete a permission

`DELETE https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/permissions/{permissionName}`

Deletes a specific permission for a resource. Can only be used with custom permissions. Requires permission
  - `sanity.{resourceType}.roles.delete`
Requires feature:
  - `advancedRolesManagement`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| permissionName | string | Yes | The name of the permission. This is a unique identifier for the permission. |

#### Responses

**200** - Permission deleted successfully

**400** - Bad request

**401** - Unauthorized

**404** - Resource not found

### Get current user permissions.

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/user-permissions/me`

Gets current user permissions within scope of a resource. These permissions can be applied to roles and are used to determine user/robot access to resources.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| nextCursor | string | No | The cursor for pagination. Use the nextCursor from the previous response to get the next page. |
| limit | integer | No | The number of items to return per page. Default: `100`. |

#### Responses

**200** - A paginated list of permissions for all resources the current user has access to

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | UserPermission[] | Yes |  |
| data[].name | string | Yes | The name of the permission. |
| data[].type | string |  | The type of the permission. |
| data[].action | object (variants) | Yes |  |
| data[].resourceType | string (enum) | Yes | Resources are entities that can be managed and accessed through the Access API. Allowed values: `organization`, `project`, `media-library`, `canvas`, `dashboard`, `view`, `knowledge-base`. |
| data[].resourceId | string | Yes |  |
| data[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |

### Check if current user has specified permissions

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/user-permissions/me/check`

Checks if the current user has the specified permissions for the given resource.
Returns an object mapping each requested permission to a boolean indicating whether the user has that permission.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| permissions | string[] | Yes | An array of permissions to check |

#### Responses

**200** - Map of permissions to whether the user has them

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | object | Yes |  |

**400** - Bad request.

**401** - Session is not authenticated.

## Requests

Request access to resources. View requests to access resources.

### List all requests for given project/organization.

`GET https://api.sanity.io/v2024-07-01/access/{resourceType}/{resourceId}/requests`

Permissions `sanity.{resourceType}.members.read`

#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| includeChildren | boolean | No | Whether to include children resources in the response. Only applies to `organization` resources. |

#### Responses

**200** - A list of resource requests

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| (root) | Request[] |  |  |

**400** - Bad request

**401** - Unauthorized

**404** - Request not found

### Create a new Request

`POST https://api.sanity.io/v2024-07-01/access/{resourceType}/{resourceId}/requests`

Creates a new request for the given project/organization. Requires an authenticated user. For organizations, the resource ID is resolved case-insensitively to its canonical casing.

#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| note | string |  |  |
| requestUrl | string |  | Optional URL to redirect the user to after their request has been accepted. Do not include PII or other confidential information. |
| requestedRole | string |  | Optional role requested by the user. The approver can assign a different role, but this is just a suggestion. If the role does not exist, the request will still be created and no validation on the role will be done. |
| type | string (enum) |  | The type of request. Allowed values: `access`, `role`. |

#### Responses

**201** - Request created successfully

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| status | string | Yes |  |
| resourceId | string | Yes |  |
| resourceType | string | Yes |  |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) |  |  |
| updatedByUserId | string |  |  |
| requestedByUserId | string | Yes |  |
| note | string |  |  |
| requestedByUserProfile | object |  |  |
| requestedByUserProfile.id | string | Yes |  |
| requestedByUserProfile.displayName | string | Yes |  |
| requestedByUserProfile.email | string | Yes |  |
| requestedByUserProfile.familyName | string |  |  |
| requestedByUserProfile.givenName | string |  |  |
| requestedByUserProfile.middleName | string \| null |  |  |
| requestedByUserProfile.imageUrl | string (uri) |  |  |
| requestedByUserProfile.provider | string | Yes |  |
| requestedByUserProfile.tosAcceptedAt | string (date-time) |  |  |
| requestedByUserProfile.createdAt | string (date-time) | Yes |  |
| requestedByUserProfile.updatedAt | string (date-time) |  |  |
| requestedByUserProfile.isCurrentUser | boolean |  |  |
| requestedByUserProfile.providerId | string |  |  |
| type | string (enum) |  | The type of request. Allowed values: `access`, `role`. |
| requestedRole | string |  |  |

**400** - Bad request

**401** - Unauthorized

**403** - The organization enforces SAML and the session was not
authenticated against that organization's identity provider. The
response body carries `code: saml_enforcement_required`.


**404** - Request not found

**409** - Conflict

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| message | string |  |  |

### Get access request state

`GET https://api.sanity.io/v2024-07-01/access/{resourceType}/{resourceId}/requests/state`

Requires an authenticated user session. Organization IDs are resolved
case-insensitively to their canonical casing.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| returnQuery | string | No | The caller's own query string, URL-encoded as a single value. It is carried through to the login page so the user returns to the request page after authenticating. |

#### Responses

**200** - State resolved.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| state | string (enum) | Yes | Tells a client what to show before the user requests access. This is guidance, not permission. Creating the request and approving it run the final checks, so do not assume a request will succeed.  The user can act on these results: - `eligible`: the client may offer the option to request access. - `saml-required`: normally, none of the user's linked SSO identities   matches an enabled provider for the organization. Send the user to   `redirectUrl` when present. If provider lookup failed, this state   can appear without a URL and does not confirm an identity match.  These results explain why the client should not offer a new request: - `resource-not-available`: the project or organization is not   available. - `requests-disabled`: the organization does not allow access   requests. - `already-member`: the user already has a directly assigned role on   this resource. An organization role implied by a project role does   not count as direct organization membership here. - `pending`: the user already has a pending request. `requestId`   identifies it. - `recently-declined`: the user's request was declined within the   last two weeks. - `saml-roles-managed`: the user has no directly assigned project   role, and a linked SSO provider is set to assign mapped project   roles on login. When `redirectUrl` is present, clients may offer   it to help the user sign in again through that provider. Signing   in does not guarantee a mapped role or access. - `temporarily-unavailable`: the service cannot currently advise a   request action. Allowed values: `eligible`, `saml-required`, `resource-not-available`, `requests-disabled`, `already-member`, `pending`, `recently-declined`, `saml-roles-managed`, `temporarily-unavailable`. |
| redirectUrl | string |  | Present for `saml-required` when a login URL can be resolved, or for `saml-roles-managed` when the matched mapped provider supplies its login URL. Clients may offer it as a way to sign in; it may open a confirmation page before the identity provider. A supplied `returnQuery` can be carried through login, but a return to the previous page is not guaranteed. Signing in does not guarantee a mapped role or access. |
| providerName | string |  | Present for `saml-roles-managed` when the provider has a name. |
| requestId | string |  | Present for `pending` and identifies the existing request. |

**400** - Bad request.

**401** - Session is not authenticated.

**404** - Resource not found.

### Accept request

`PUT https://api.sanity.io/v2024-07-01/access/{resourceType}/{resourceId}/requests/{requestId}/accept`

Permissions `sanity.{resourceType}.members.invite`

#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| requestId | string | Yes | The ID of the request. |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| roleNames | string[] |  |  |

#### Responses

**200** - Request accepted successfully

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| status | string | Yes |  |
| resourceId | string | Yes |  |
| resourceType | string | Yes |  |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) |  |  |
| updatedByUserId | string |  |  |
| requestedByUserId | string | Yes |  |
| note | string |  |  |
| requestedByUserProfile | object |  |  |
| requestedByUserProfile.id | string | Yes |  |
| requestedByUserProfile.displayName | string | Yes |  |
| requestedByUserProfile.email | string | Yes |  |
| requestedByUserProfile.familyName | string |  |  |
| requestedByUserProfile.givenName | string |  |  |
| requestedByUserProfile.middleName | string \| null |  |  |
| requestedByUserProfile.imageUrl | string (uri) |  |  |
| requestedByUserProfile.provider | string | Yes |  |
| requestedByUserProfile.tosAcceptedAt | string (date-time) |  |  |
| requestedByUserProfile.createdAt | string (date-time) | Yes |  |
| requestedByUserProfile.updatedAt | string (date-time) |  |  |
| requestedByUserProfile.isCurrentUser | boolean |  |  |
| requestedByUserProfile.providerId | string |  |  |
| type | string (enum) |  | The type of request. Allowed values: `access`, `role`. |
| requestedRole | string |  |  |

**400** - Bad request

**401** - Unauthorized

**404** - Request not found

### Decline request

`PUT https://api.sanity.io/v2024-07-01/access/{resourceType}/{resourceId}/requests/{requestId}/decline`

Permissions `sanity.{resourceType}.members.invite`

#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| requestId | string | Yes | The ID of the request. |

#### Responses

**200** - Request declined successfully

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| status | string | Yes |  |
| resourceId | string | Yes |  |
| resourceType | string | Yes |  |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) |  |  |
| updatedByUserId | string |  |  |
| requestedByUserId | string | Yes |  |
| note | string |  |  |
| requestedByUserProfile | object |  |  |
| requestedByUserProfile.id | string | Yes |  |
| requestedByUserProfile.displayName | string | Yes |  |
| requestedByUserProfile.email | string | Yes |  |
| requestedByUserProfile.familyName | string |  |  |
| requestedByUserProfile.givenName | string |  |  |
| requestedByUserProfile.middleName | string \| null |  |  |
| requestedByUserProfile.imageUrl | string (uri) |  |  |
| requestedByUserProfile.provider | string | Yes |  |
| requestedByUserProfile.tosAcceptedAt | string (date-time) |  |  |
| requestedByUserProfile.createdAt | string (date-time) | Yes |  |
| requestedByUserProfile.updatedAt | string (date-time) |  |  |
| requestedByUserProfile.isCurrentUser | boolean |  |  |
| requestedByUserProfile.providerId | string |  |  |
| type | string (enum) |  | The type of request. Allowed values: `access`, `role`. |
| requestedRole | string |  |  |

**400** - Bad request

**401** - Unauthorized

**404** - Request not found

### List all request for current user

`GET https://api.sanity.io/v2024-07-01/access/requests/me`

Requires an authenticated user.

#### Responses

**200** - A list of user Requests

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| (root) | Request[] |  |  |

**400** - Bad request

**401** - Unauthorized

**404** - Request not found

## Invites

Manage and accept invites.

### Get current user's invites filtered by status/resource

`GET https://api.sanity.io/v2025-07-11/access/invites/me`

Retrieves a list of invites for the current user, using the email.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| status | InviteStatus[] | No | Filter invites by status. |
| nextCursor | string | No | The cursor for pagination. Use the nextCursor from the previous response to get the next page. |
| limit | integer | No | The number of items to return per page. Default: `100`. |

#### Responses

**200** - A paginated list of invites

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | Invite[] | Yes |  |
| data[].id | string | Yes |  |
| data[].status | string (enum) | Yes | Allowed values: `pending`, `accepted`, `revoked`. |
| data[].resourceType | string (enum) | Yes | Resources are entities that can be managed and accessed through the Access API. Allowed values: `organization`, `project`, `media-library`, `canvas`, `dashboard`, `view`, `knowledge-base`. |
| data[].resourceId | string | Yes |  |
| data[].role | string | Yes |  |
| data[].email | string |  | The email address of the invitee. Only present if the invite is still pending. |
| data[].inviterType | string (enum) | Yes | Allowed values: `user`, `service`. |
| data[].inviterId | string |  | The ID of the user or service that created the invite. Only present if the invite was created by a user. |
| data[].inviteeId | string |  | The ID of the user that accepted the invite. Only present if the invite has been accepted. |
| data[].createdAt | string (date-time) | Yes |  |
| data[].updatedAt | string (date-time) | Yes |  |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |

**401** - Session is not authenticated.

**403** - Session is missing required permissions or has the wrong type.

**404** - Resource not found.

### Get invites

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/invites`

Retrieves a list of invites for the specified resource.

Only pending invites are retrieved by default. Use the optional `status`
parameter to change the filter behavior. You can select multiple
statuses by repeating the parameter.

### Children invites

By default, only invites for the specified resource are returned. Use the
optional `includeChildren` parameter to include invites for children
resources as well. This only applies to `organization` resources.

### Authorization

This endpoint requires an authenticated user session with the following
permissions:
- `sanity.{resourceType}.members.read`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| status | InviteStatus[] | No | Filter invites by status. |
| includeChildren | boolean | No | Whether to include children resources in the response. Only applies to `organization` resources. |
| nextCursor | string | No | The cursor for pagination. Use the nextCursor from the previous response to get the next page. |
| limit | integer | No | The number of items to return per page. Default: `100`. |

#### Responses

**200** - A paginated list of invites

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | Invite[] | Yes |  |
| data[].id | string | Yes |  |
| data[].status | string (enum) | Yes | Allowed values: `pending`, `accepted`, `revoked`. |
| data[].resourceType | string (enum) | Yes | Resources are entities that can be managed and accessed through the Access API. Allowed values: `organization`, `project`, `media-library`, `canvas`, `dashboard`, `view`, `knowledge-base`. |
| data[].resourceId | string | Yes |  |
| data[].role | string | Yes |  |
| data[].email | string |  | The email address of the invitee. Only present if the invite is still pending. |
| data[].inviterType | string (enum) | Yes | Allowed values: `user`, `service`. |
| data[].inviterId | string |  | The ID of the user or service that created the invite. Only present if the invite was created by a user. |
| data[].inviteeId | string |  | The ID of the user that accepted the invite. Only present if the invite has been accepted. |
| data[].createdAt | string (date-time) | Yes |  |
| data[].updatedAt | string (date-time) | Yes |  |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |

**401** - Session is not authenticated.

**403** - Session is missing required permissions or has the wrong type.

**404** - Resource not found.

### Create invite

`POST https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/invites`

Creates an invite for the specified resource.

The invitee will receive an email with a link to accept the invite.

Each invitee can only receive one invite per resource and role.
Attempting to create an invite using a non-existent role, or a role that
cannot be granted to users will result in a Bad Request error.

### Unavailable resources

If the underlying resource is unavailable then a Bad Request error will
be returned. A common example of an unavailable resource is a project
that is blocked or archived.

### Authorization

This endpoint requires an authenticated user session with the following
permissions:
- `sanity.{resourceType}.members.invite`

Additionally, only administrators can invite other administrators.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |

#### Request body

`application/json` (required)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| email | string | Yes |  |
| role | string | Yes |  |
| callbackUrl | string (uri) |  | Where to send the invitee after they accept, such as `https://www.sanity.io/@oAbc/context`. Must be on the Sanity website (`https://www.sanity.io` or `https://sanity.io`). |

#### Responses

**201** - Invite created.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| status | string (enum) | Yes | Allowed values: `pending`, `accepted`, `revoked`. |
| resourceType | string (enum) | Yes | Resources are entities that can be managed and accessed through the Access API. Allowed values: `organization`, `project`, `media-library`, `canvas`, `dashboard`, `view`, `knowledge-base`. |
| resourceId | string | Yes |  |
| role | string | Yes |  |
| email | string |  | The email address of the invitee. Only present if the invite is still pending. |
| inviterType | string (enum) | Yes | Allowed values: `user`, `service`. |
| inviterId | string |  | The ID of the user or service that created the invite. Only present if the invite was created by a user. |
| inviteeId | string |  | The ID of the user that accepted the invite. Only present if the invite has been accepted. |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) | Yes |  |

**400** - Bad request.

**401** - Session is not authenticated.

**403** - Session is missing required permissions or has the wrong type.

**404** - Resource not found.

### Revoke invite

`DELETE https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/invites/{inviteId}`

Revokes an invite.

Attempting to revoke an invite that has already been accepted or revoked
will result in a Bad Request error.

### Authorization

This endpoint requires an authenticated user session with the following
permissions:
- `sanity.{resourceType}.members.invite`


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| inviteId | string | Yes | The invite's unique identifier. |

#### Responses

**204** - Invite revoked.

**400** - Bad request.

**401** - Session is not authenticated.

**403** - Session is missing required permissions or has the wrong type.

**404** - Resource or invite not found.

### Get invite

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/invites/token/{inviteToken}`

Retrieves an invite using its token.

### Authorization

This endpoint does not require authentication.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| inviteToken | string | Yes | The public token for the invite. This token is shared with the invitee. |

#### Responses

**200** - Invite found.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| status | string (enum) | Yes | Allowed values: `pending`, `accepted`, `revoked`. |
| resourceType | string (enum) | Yes | Resources are entities that can be managed and accessed through the Access API. Allowed values: `organization`, `project`, `media-library`, `canvas`, `dashboard`, `view`, `knowledge-base`. |
| resourceId | string | Yes |  |
| role | string | Yes |  |
| email | string |  | The email address of the invitee. Only present if the invite is still pending. |
| inviterType | string (enum) | Yes | Allowed values: `user`, `service`. |
| inviterId | string |  | The ID of the user or service that created the invite. Only present if the invite was created by a user. |
| inviteeId | string |  | The ID of the user that accepted the invite. Only present if the invite has been accepted. |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) | Yes |  |

**404** - Resource or invite not found.

### Accept invite

`POST https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/invites/token/{inviteToken}/accept`

Accepts an invite using its token.

Attempting to accept an invite that is already accepted or revoked will
result in a Bad Request error.

Once the invite has been accepted, the user will have access to the
resource with the role assigned as part of the invitation.

> **Access is propagated internally and may take a up to a few minutes to
> be fully available across all systems.**

### Unavailable resources

If the underlying resource is unavailable then a Bad Request error will
be returned. A common example of an unavailable resource is a project
that is blocked or archived.

### Member quota

Some resources have a limit on the number of members. If accepting an
invite would go over this limit, then a Payment Required error is
returned.

### Authorization

This endpoint requires an authenticated user session.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| inviteToken | string | Yes | The public token for the invite. This token is shared with the invitee. |

#### Responses

**204** - Invite accepted.

**400** - Bad request.

**401** - Session is not authenticated.

**402** - Resource reached its allowed number of members.

**403** - Session is missing required permissions or has the wrong type.

**404** - Resource or invite not found.

### Check invite eligibility

`GET https://api.sanity.io/v2025-07-11/access/{resourceType}/{resourceId}/invites/token/{inviteToken}/eligibility`

Preflight check for the invite-acceptance page: reports whether the
current session passes the invite entry gate, without mutating anything.

When the invited organization enforces SAML and the session was not
authenticated against that organization's identity provider, the
response is `eligible: false` with `reason: saml-enforced` and a
`redirectUrl` pointing at the organization's login page. Clients should
redirect there instead of offering the accept action.

This is a preflight for the SAML entry gate only. `eligible: true` does
not guarantee the accept will succeed: the accept path may still reject
the session for other reasons (e.g. email-ownership validation).

### Authorization

This endpoint requires an authenticated user session.


#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| resourceType | string (enum) | Yes | The resource type to scope the access requests to. |
| resourceId | string | Yes | The resource ID to scope the access request to. Must be a valid ID for the resource type. |
| inviteToken | string | Yes | The public token for the invite. This token is shared with the invitee. |

#### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| returnQuery | string | No | The caller's own query string, URL-encoded as a single value. It is carried through to the login page so the user returns to the invite after authenticating. |

#### Responses

**200** - Eligibility resolved.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| eligible | boolean | Yes | Whether the current session passes the invite entry gate. `true` means the accept action may be offered. Note this reflects the SAML entry gate only: an eligible session can still be rejected at accept time for other reasons (e.g. email-ownership validation). |
| reason | string (enum) |  | Present only when `eligible` is `false`, explaining why. - `resource-not-available`: the invited project/organization is not   available. - `saml-enforced`: the invited organization enforces SAML and the   session was not authenticated against that organization's identity   provider. Allowed values: `resource-not-available`, `saml-enforced`. |
| redirectUrl | string |  | When not eligible with reason `saml-enforced`, the URL to send the user to so they can log in through the organization's identity provider. May be absent if the login URL could not be resolved. |

**400** - Bad request.

**401** - Session is not authenticated.

**403** - Session is missing required permissions or has the wrong type.

**404** - Resource not found, or no invite matches the token for this resource.

## Schema Reference

### PermissionType

The resource for the permission.

##### Example

```json
"sanity.document.filter.mode"
```

### PermissionAction

### PermissionActions

The actions allowed by the permission for this role.

##### Example

```json
[
  "mode"
]
```

### sanity.document.filter

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `create`, `read`, `update`, `manage`, `history`, `editHistory`. |
| title | string |  |  |
| description | string |  |  |

### sanity.document.filter.name

### sanity.document.filter.mode

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `mode`. |
| title | string |  |  |
| description | string |  |  |

### sanity.document.filter.mode.name

### sanity.organization.members

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `invite`, `read`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.members.name

### sanity.organization.sessions

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.sessions.name

### sanity.project.tokens

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.tokens.name

### sanity.project.datasets

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.datasets.name

### sanity.project.usage

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.usage.name

### sanity.organization.legal

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.legal.name

### sanity.organization.sso

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `saml`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.sso.name

### sanity.project.graphql

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `manage`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.graphql.name

### sanity.project

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`, `delete`, `createSession`, `deployStudio`, `deploySchema`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.name

### sanity.project.cors

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.cors.name

### sanity.project.webhooks

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `delete`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.webhooks.name

### sanity.project.roles

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `create`, `read`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.roles.name

### sanity.organization.tokens

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.tokens.name

### sanity.organization

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`, `delete`, `billing`, `manage`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.name

### sanity.project.members

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `invite`, `read`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.members.name

### sanity.organization.notification-settings

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.notification-settings.name

### sanity.project.notification-settings

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.notification-settings.name

### sanity.organization.projects

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `attach`, `detach`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.projects.name

### sanity.organization.roles

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `create`, `read`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.roles.name

### sanity.project.tags

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.tags.name

### sanity.view

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`. |
| title | string |  |  |
| description | string |  |  |

### sanity.view.name

### sanity.sdk.applications

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `deploy`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.sdk.applications.name

### sanity.organization.user-attributes

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.user-attributes.name

### sanity.organization.views

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.organization.views.name

### sanity.media-library

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.name

### sanity.media-library.aspects

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.aspects.name

### sanity.media-library.asset-instances

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.asset-instances.name

### sanity.media-library.asset-management

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.asset-management.name

### sanity.media-library.assets

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `publish`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.assets.name

### sanity.media-library.members

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `invite`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.members.name

### sanity.media-library.signed-url

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `manage`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.signed-url.name

### sanity.media-library.hierarchy

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.hierarchy.name

### sanity.media-library.roles

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `create`, `read`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.roles.name

### sanity.media-library.document.filter

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`, `manage`, `publish`, `history`. |
| title | string |  |  |
| description | string |  |  |

### sanity.media-library.document.filter.name

### sanity.canvas

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`. |
| title | string |  |  |
| description | string |  |  |

### sanity.canvas.name

### sanity.canvas.comment

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.canvas.comment.name

### sanity.canvas.document

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.canvas.document.name

### sanity.canvas.support

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.canvas.support.name

### sanity.knowledge-base

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `create`, `read`, `update`, `manage`. |
| title | string |  |  |
| description | string |  |  |

### sanity.knowledge-base.name

### sanity.knowledge-base.entries

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.knowledge-base.entries.name

### sanity.knowledge-base.issues

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.knowledge-base.issues.name

### sanity.knowledge-base.instructions

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.knowledge-base.instructions.name

### sanity.dashboard.configuration.me

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.dashboard.configuration.me.name

### sanity.dashboard.configuration.organization

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.dashboard.configuration.organization.name

### sanity.dashboard.favorites

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.dashboard.favorites.name

### sanity.dashboard.history

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.dashboard.history.name

### sanity.dashboard.intents

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.dashboard.intents.name

### sanity.dashboard.state

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `read`, `create`, `update`. |
| title | string |  |  |
| description | string |  |  |

### sanity.dashboard.state.name

### sanity.context.mcp

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `create`, `read`, `update`, `delete`. |
| title | string |  |  |
| description | string |  |  |

### sanity.context.mcp.name

### sanity.blueprints

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `deploy`, `read`. |
| title | string |  |  |
| description | string |  |  |

### sanity.blueprints.name

### sanity.project.blueprints

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string (enum) |  | Allowed values: `deploy`, `read`. |
| title | string |  |  |
| description | string |  |  |

### sanity.project.blueprints.name

### Permission

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| type | string (enum) | Yes | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| actions | object (variants) |  | The actions allowed by the permission for this role. |
| name | string | Yes | The name of the permission. This is the unique identifier for the resource. |
| title | string | Yes | The human-readable title of the permission. |
| description | string |  | The description of the permission. |
| resourceType | string | Yes | The resource the permission applies to. |
| resourceId | string | Yes | The resource ID the permission applies to. |
| ownerOrganizationId | string |  | The organization ID the permission applies to. Used for wildcard permissions where the resourceId is `*`. |
| isCustom | boolean |  | Whether the permission is a custom (user-created) permission or a system-provided one. |
| params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

### Role

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string | Yes |  |
| title | string | Yes |  |
| description | string |  |  |
| isCustom | boolean |  |  |
| resourceType | string | Yes |  |
| resourceId | string | Yes |  |
| appliesToUsers | boolean | Yes |  |
| appliesToRobots | boolean | Yes |  |
| permissions | object[] | Yes |  |
| permissions[].type | string (enum) |  | The resource for the permission. Allowed values: `sanity.blueprints`, `sanity.canvas`, `sanity.canvas.comment`, `sanity.canvas.document`, `sanity.canvas.support`, `sanity.context.mcp`, `sanity.dashboard.configuration.me`, `sanity.dashboard.configuration.organization`, `sanity.dashboard.favorites`, `sanity.dashboard.history`, `sanity.dashboard.intents`, `sanity.dashboard.state`, `sanity.document.filter`, `sanity.document.filter.mode`, `sanity.knowledge-base`, `sanity.knowledge-base.entries`, `sanity.knowledge-base.issues`, `sanity.knowledge-base.instructions`, `sanity.media-library`, `sanity.media-library.aspects`, `sanity.media-library.asset-instances`, `sanity.media-library.asset-management`, `sanity.media-library.assets`, `sanity.media-library.members`, `sanity.media-library.signed-url`, `sanity.media-library.hierarchy`, `sanity.media-library.roles`, `sanity.media-library.document.filter`, `sanity.organization`, `sanity.organization.legal`, `sanity.organization.members`, `sanity.organization.notification-settings`, `sanity.organization.sessions`, `sanity.organization.projects`, `sanity.organization.roles`, `sanity.organization.sso`, `sanity.organization.tokens`, `sanity.organization.user-attributes`, `sanity.organization.views`, `sanity.project`, `sanity.project.blueprints`, `sanity.project.cors`, `sanity.project.datasets`, `sanity.project.graphql`, `sanity.project.members`, `sanity.project.notification-settings`, `sanity.project.roles`, `sanity.project.tags`, `sanity.project.tokens`, `sanity.project.usage`, `sanity.project.webhooks`, `sanity.sdk.applications`, `sanity.view`. |
| permissions[].action | object (variants) |  |  |
| permissions[].name | string |  | The name of the permission. |
| permissions[].params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

### Membership

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| addedAt | string (date-time) |  |  |
| resourceType | string | Yes |  |
| resourceId | string | Yes |  |
| roleNames | string[] | Yes |  |
| lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

### Memberships

### User

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| sanityUserId | string | Yes |  |
| profile | object | Yes |  |
| profile.id | string | Yes |  |
| profile.displayName | string | Yes |  |
| profile.email | string | Yes |  |
| profile.familyName | string |  |  |
| profile.givenName | string |  |  |
| profile.middleName | string \| null |  |  |
| profile.imageUrl | string (uri) |  |  |
| profile.provider | string | Yes |  |
| profile.tosAcceptedAt | string (date-time) |  |  |
| profile.createdAt | string (date-time) | Yes |  |
| profile.updatedAt | string (date-time) |  |  |
| profile.isCurrentUser | boolean |  |  |
| profile.providerId | string |  |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

### Request

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| status | string | Yes |  |
| resourceId | string | Yes |  |
| resourceType | string | Yes |  |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) |  |  |
| updatedByUserId | string |  |  |
| requestedByUserId | string | Yes |  |
| note | string |  |  |
| requestedByUserProfile | object |  |  |
| requestedByUserProfile.id | string | Yes |  |
| requestedByUserProfile.displayName | string | Yes |  |
| requestedByUserProfile.email | string | Yes |  |
| requestedByUserProfile.familyName | string |  |  |
| requestedByUserProfile.givenName | string |  |  |
| requestedByUserProfile.middleName | string \| null |  |  |
| requestedByUserProfile.imageUrl | string (uri) |  |  |
| requestedByUserProfile.provider | string | Yes |  |
| requestedByUserProfile.tosAcceptedAt | string (date-time) |  |  |
| requestedByUserProfile.createdAt | string (date-time) | Yes |  |
| requestedByUserProfile.updatedAt | string (date-time) |  |  |
| requestedByUserProfile.isCurrentUser | boolean |  |  |
| requestedByUserProfile.providerId | string |  |  |
| type | string (enum) |  | The type of request. Allowed values: `access`, `role`. |
| requestedRole | string |  |  |

### ResourceType

Resources are entities that can be managed and accessed through the
Access API.


##### Example

```json
"project"
```

### Robot

A robot is a service account that can be used to authenticate with the API.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes | The unique identifier for the robot. |
| tokenId | string |  | The unique identifier for the active token. |
| label | string | Yes | A human-readable label for the robot. |
| createdAt | string (date-time) | Yes | The creation date of the robot. |
| expiresAt | string (date-time) |  | When the active token expires. |
| lastSeenAt | string (date-time) |  | When the robot was last used at the resource this request is scoped to. Updated about once an hour. Omitted if no use has been recorded since its current token was issued. |
| managedBy | object |  | The resource this token was created under. When this is an organization but the token is listed under a project, the token was created via the organization and should be managed there. Omitted for legacy tokens whose origin can't be determined. |
| managedBy.resourceType | string | Yes |  |
| managedBy.resourceId | string | Yes |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

### RobotWithToken

A robot is a service account that can be used to authenticate with the API.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| token | string | Yes | The secret token for the robot. This value is returned only when the token is created or rotated and cannot be retrieved again. |
| id | string | Yes | The unique identifier for the robot. |
| tokenId | string |  | The unique identifier for the active token. |
| label | string | Yes | A human-readable label for the robot. |
| createdAt | string (date-time) | Yes | The creation date of the robot. |
| expiresAt | string (date-time) |  | When the active token expires. |
| lastSeenAt | string (date-time) |  | When the robot was last used at the resource this request is scoped to. Updated about once an hour. Omitted if no use has been recorded since its current token was issued. |
| managedBy | object |  | The resource this token was created under. When this is an organization but the token is listed under a project, the token was created via the organization and should be managed there. Omitted for legacy tokens whose origin can't be determined. |
| managedBy.resourceType | string | Yes |  |
| managedBy.resourceId | string | Yes |  |
| memberships | Membership[] | Yes |  |
| memberships[].addedAt | string (date-time) |  |  |
| memberships[].resourceType | string | Yes |  |
| memberships[].resourceId | string | Yes |  |
| memberships[].roleNames | string[] | Yes |  |
| memberships[].lastSeenAt | string \| null (date-time) |  | For project memberships, the latest recorded authenticated request to that project, including clients other than Studio. Updated by an hourly import when it succeeds, so it may lag if imports are delayed. Null or omitted means no activity was recorded, not that the project was unused. Not set for organization memberships. |
| memberships[].resourceUserId | string \| null |  | An alternative ID for the user in the resource. Only present for project memberships. That is, a user can be assigned to multiple projects, and each project will have a different resourceUserId to reference the same user. |

### Invite

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| status | string (enum) | Yes | Allowed values: `pending`, `accepted`, `revoked`. |
| resourceType | string (enum) | Yes | Resources are entities that can be managed and accessed through the Access API. Allowed values: `organization`, `project`, `media-library`, `canvas`, `dashboard`, `view`, `knowledge-base`. |
| resourceId | string | Yes |  |
| role | string | Yes |  |
| email | string |  | The email address of the invitee. Only present if the invite is still pending. |
| inviterType | string (enum) | Yes | Allowed values: `user`, `service`. |
| inviterId | string |  | The ID of the user or service that created the invite. Only present if the invite was created by a user. |
| inviteeId | string |  | The ID of the user that accepted the invite. Only present if the invite has been accepted. |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) | Yes |  |

### InviteEligibility

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| eligible | boolean | Yes | Whether the current session passes the invite entry gate. `true` means the accept action may be offered. Note this reflects the SAML entry gate only: an eligible session can still be rejected at accept time for other reasons (e.g. email-ownership validation). |
| reason | string (enum) |  | Present only when `eligible` is `false`, explaining why. - `resource-not-available`: the invited project/organization is not   available. - `saml-enforced`: the invited organization enforces SAML and the   session was not authenticated against that organization's identity   provider. Allowed values: `resource-not-available`, `saml-enforced`. |
| redirectUrl | string |  | When not eligible with reason `saml-enforced`, the URL to send the user to so they can log in through the organization's identity provider. May be absent if the login URL could not be resolved. |

### AccessRequestState

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| state | string (enum) | Yes | Tells a client what to show before the user requests access. This is guidance, not permission. Creating the request and approving it run the final checks, so do not assume a request will succeed.  The user can act on these results: - `eligible`: the client may offer the option to request access. - `saml-required`: normally, none of the user's linked SSO identities   matches an enabled provider for the organization. Send the user to   `redirectUrl` when present. If provider lookup failed, this state   can appear without a URL and does not confirm an identity match.  These results explain why the client should not offer a new request: - `resource-not-available`: the project or organization is not   available. - `requests-disabled`: the organization does not allow access   requests. - `already-member`: the user already has a directly assigned role on   this resource. An organization role implied by a project role does   not count as direct organization membership here. - `pending`: the user already has a pending request. `requestId`   identifies it. - `recently-declined`: the user's request was declined within the   last two weeks. - `saml-roles-managed`: the user has no directly assigned project   role, and a linked SSO provider is set to assign mapped project   roles on login. When `redirectUrl` is present, clients may offer   it to help the user sign in again through that provider. Signing   in does not guarantee a mapped role or access. - `temporarily-unavailable`: the service cannot currently advise a   request action. Allowed values: `eligible`, `saml-required`, `resource-not-available`, `requests-disabled`, `already-member`, `pending`, `recently-declined`, `saml-roles-managed`, `temporarily-unavailable`. |
| redirectUrl | string |  | Present for `saml-required` when a login URL can be resolved, or for `saml-roles-managed` when the matched mapped provider supplies its login URL. Clients may offer it as a way to sign in; it may open a confirmation page before the identity provider. A supplied `returnQuery` can be carried through login, but a return to the previous page is not guaranteed. Signing in does not guarantee a mapped role or access. |
| providerName | string |  | Present for `saml-roles-managed` when the provider has a name. |
| requestId | string |  | Present for `pending` and identifies the existing request. |

### InviteStatus

### InviterType

### UserProfile

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| id | string | Yes |  |
| displayName | string | Yes |  |
| email | string | Yes |  |
| familyName | string |  |  |
| givenName | string |  |  |
| middleName | string \| null |  |  |
| imageUrl | string (uri) |  |  |
| provider | string | Yes |  |
| tosAcceptedAt | string (date-time) |  |  |
| createdAt | string (date-time) | Yes |  |
| updatedAt | string (date-time) |  |  |
| isCurrentUser | boolean |  |  |
| providerId | string |  |  |

### RequestType

The type of request.

##### Example

```json
"access"
```

### PaginatedResponse

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| data | object[] | Yes |  |
| nextCursor | string \| null | Yes | Cursor to get the next page of results, `null` if there are no more results. |

### UserPermission

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| name | string | Yes | The name of the permission. |
| type | string |  | The type of the permission. |
| action | object (variants) | Yes |  |
| resourceType | string (enum) | Yes | Resources are entities that can be managed and accessed through the Access API. Allowed values: `organization`, `project`, `media-library`, `canvas`, `dashboard`, `view`, `knowledge-base`. |
| resourceId | string | Yes |  |
| params | object |  | The parameters for the permission. This is a key-value map of the permission's configuration. |

## Related changelog entries

Entries are listed newest first; each link points to the full entry as markdown. Follow one when you need to know what changed, when, or why — for example, to summarize recent updates, explain behavior that differs from older documentation, or check whether a fix has shipped.

- [Access API v2025-07-11: Robot tokens accept an IP allowlist](https://www.sanity.io/docs/changelog/access-api-2026-11-27-ip-allowlists-change.md) — November 27, 2026
- [Manage v2026-11-27: Restrict robot tokens to IP addresses](https://www.sanity.io/docs/changelog/manage-2026-11-27-ip-allowlists-change.md) — November 27, 2026
- [Manage v2026-06-12: Set API token expiration in Manage](https://www.sanity.io/docs/changelog/0875c394-7b6b-4c77-9e17-c2c96b967d8b.md) — June 12, 2026