- Category: developer tools
- Auth: API_KEY
- Composio-managed OAuth available? N/A
- Tools: 21
- Triggers: 0
- Slug:
SANITY - Version: 20261101_00
Tools
Add Default Role to Users
Add Default Role to Users
Slug:
SANITY_ADD_DEFAULT_ROLE_TO_USERSApply organization default role to all users. Use when you need to assign the organization’s default role to all existing users in the organization. Requires the resource ID of the organization.Input Parameters
The resource ID to scope the access request to. Must be a valid ID for the resource type.
Output
Create Attribute Definition
Create Attribute Definition
Slug:
SANITY_CREATE_ATTR_DEFINITIONCreate a user attribute definition for a Sanity resource with a unique key and a string, number, or boolean type.Input Parameters
The unique key/name for the attribute definition. This must be unique within the resource.
When true, the attribute accepts an array of values. When false or omitted, it accepts a single value.
The data type of the attribute. Must be one of: ‘string’, ‘number’, ‘boolean’.
The type of resource the attribute definition belongs to. Examples: ‘organizations’, ‘projects’, ‘datasets’.
Output
Create Prompt Post
Create Prompt Post
Delete User Attribute Definition
Delete User Attribute Definition
Slug:
SANITY_DELETE_ATTR_DEFINITIONDelete a user attribute definition. Use when you need to remove a custom attribute definition from an organization or project in Sanity. The attribute definition controls how user attributes are structured and validated for a given resource. Deleting a definition does not delete existing user attribute values, but users will no longer be able to set values for that attribute.Input Parameters
The unique identifier of the resource. For organizations, this is typically like ‘oN7sjLEfL’. For projects, this is the project ID.
The type of resource to scope the user attribute definitions to. Common values: ‘organization’ or ‘project’.
Output
Delete Document
Delete Document
Slug:
SANITY_DELETE_DOCUMENTDelete a document from Sanity by ID or query. This action is irreversible when purge is true — the document cannot be recovered once permanently deleted. Use when you need to remove a specific document by ID or bulk delete documents matching a GROQ query (limited to 10,000 documents per operation). For large deletions, paginate by document ID. Set dry_run to true to test the operation without modifying data.Input Parameters
If true, permanently removes the document from the history. If false or omitted, the document is soft-deleted and can be recovered.
GROQ query string to select documents for deletion. Query-based deletions are limited to 10,000 documents. Either document_id or query must be provided, not both.
Optional parameters for the GROQ query when using query-based deletion. Use $variableName syntax in the query.
If true, simulates the deletion without actually modifying any documents. Useful for testing.
The ID of the specific document to delete. Either document_id or query must be provided, not both.
Output
Delete User Attributes
Delete User Attributes
Get Document by ID
Get Document by ID
Get Invite By Token
Get Invite By Token
Slug:
SANITY_GET_INVITE_BY_TOKENRetrieve an invite by its public token for a specified resource. Returns invite details when found; an HTTP 404 is returned as found=false.Input Parameters
The resource ID to scope the access request to. Must be a valid ID for the resource type.
The resource type to scope the access requests to. Must be one of: organization, project, media-library, canvas, dashboard, view.
Output
Get Organization Role
Get Organization Role
Slug:
SANITY_GET_ORG_ROLERetrieve a specific organization role by its ID. Use this action when you need to fetch details about an organization role including its permissions, title, description, and whether it applies to users or robots. The role must exist for the specified organization.Input Parameters
Output
Get Permission
Get Permission
Slug:
SANITY_GET_PERMISSIONGet a permission for a specific resource. Use when you need to retrieve details about a particular permission including its actions, parameters, and scope. The action retrieves permission information based on the resource type, resource ID, and permission name provided in the path parameters.Input Parameters
The resource ID to scope the access request to. Must be a valid ID for the resource type.
The resource to scope access requests to. Must be one of: ‘organization’ or ‘project’.
Output
Get Project
Get Project
Get Robots
Get Robots
Slug:
SANITY_GET_ROBOTSTool to get robots with access to a resource. Use when you need to retrieve a list of robots (service accounts) that have been granted access to a specific resource along with their assigned roles. This action supports pagination through the next_cursor parameter.Input Parameters
The cursor for pagination. Use the nextCursor from the previous response to get the next page.
The resource ID to scope the access request to. Must be a valid ID for the resource type.
The resource type to scope the access requests to. One of: organization, project, media-library, canvas, dashboard, view.
Whether to include children resources in the response. Only applies to organization resources.
Output
Get Role
Get Role
Slug:
SANITY_GET_ROLERetrieve a specific role for a given resource type and resource ID. Use this action when you need to fetch details about a role including its permissions, title, description, and whether it applies to users or robots. The role must exist for the specified resource.Input Parameters
The resource ID to scope the access request to. Must be a valid ID for the resource type.
The resource type to scope the access requests to. Must be one of: organization, project, media-library, canvas, dashboard, view.
Output
List Resource Users
List Resource Users
Slug:
SANITY_GET_USERSList all users of a resource and their assigned roles. Use when you need to retrieve user information and role assignments for a specific project or organization. Supports pagination via cursor.Input Parameters
Cursor for pagination. Use the nextCursor from the previous response to get the next page of results.
The resource ID to scope the access request to. Must be a valid ID for the resource type (e.g., project ID or organization ID).
The resource to scope access requests to. Use ‘organization’ for organization-level access or ‘project’ for project-level access.
Output
List Datasets
List Datasets
List Organization Roles
List Organization Roles
List User Attributes
List User Attributes
Slug:
SANITY_LIST_USER_ATTRIBUTESTool to retrieve user attributes from a Sanity organization. Use when you need to get the attributes (such as roles, permissions, or custom properties) associated with a specific user in a Sanity organization. Supports pagination via the cursor parameter.Input Parameters
Output
Mutate Documents
Mutate Documents
Slug:
SANITY_MUTATE_DOCUMENTSApply or dry-run one atomic batch of create, replace, conditional-create, patch, and delete mutations in a Sanity dataset. Calls commit unless dry_run is true; a delete with purge permanently removes document history.Input Parameters
Ordered create, create-or-replace, create-if-missing, delete, or patch operations. Non-dry-run batches commit all operations atomically.
When the mutations become query-visible: sync, async, or deferred.
Output
Query All Screening
Query All Screening
Query Documents
Query Documents
Slug:
SANITY_QUERY_DOCUMENTSExecute a GROQ query against a Sanity dataset in the project configured on the connection. Supports optional parameters, perspective control, and CDN use; results can be any JSON value, including arrays, objects, scalars, or null.Input Parameters
The GROQ query string to execute. GROQ is Sanity’s query language for fetching and transforming documents.
Optional parameters for the GROQ query. Use $variableName syntax in the query string, then pass the values here (e.g., query=’*[_type == $type]’ with params={‘type’: ‘post’}).
Whether to use Sanity’s CDN for faster response times. Recommended for read-heavy workloads with data that doesn’t change frequently.
Perspective determines which version of documents to query.
Output
Update Organization ACL
Update Organization ACL
Update User Attributes Values
Update User Attributes Values
Slug:
SANITY_UPDATE_USER_ATTRIBUTES_VALUESUpdate user attribute values for a resource. Use this action to set or update custom attributes for a user within an organization or project. When setting a value for an attribute key that also exists in SAML, the Sanity value will take precedence and shadow the SAML value.Input Parameters
A dictionary of attribute key-value pairs to set for the user. Values can be strings, numbers, booleans, arrays, or nested objects. These will shadow any SAML values for the same keys.
The unique identifier of the resource. For organizations, this is the organization ID.
The type of resource that scopes the user attributes (e.g., ‘organization’ or ‘project’).
Output
Upload Image Asset
Upload Image Asset
Validate Credential
Validate Credential
Slug:
SANITY_VALIDATE_CREDENTIALValidate Sanity API credentials by fetching the authenticated user’s information. Use this action when you need to verify that an API token is valid and has proper authentication. This action returns user information and accessible projects if the token is valid.