# Sanity AI integration on Definable

> Sanity is a headless CMS platform that provides structured content storage and APIs for modern applications

## What this connects

Sanity is a headless CMS platform that provides structured content storage and APIs for modern applications

Vendor: https://www.sanity.io

## Tools available

**16** tools available. First 12:

- `SANITY_ADD_DEFAULT_ROLE_TO_USERS` — Add Default Role to Users — Apply 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.
- `SANITY_CREATE_ATTR_DEFINITION` — Create Attribute Definition — Tool to create a new user attribute definition in Sanity. Use when you need to define a custom attribute (like 'customer-tier' or 'subscription-level') that can be attached to resources. The key must be unique within the resource. The attribute can have a type of 'string', 'number', or 'boolean' and can optionally be a list of values or read-only.
- `SANITY_CREATE_PROMPT_POST` — Create Prompt Post — Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt and receive a response without maintaining conversation context.
- `SANITY_DELETE_ATTR_DEFINITION` — Delete User Attribute Definition — Delete 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.
- `SANITY_DELETE_USER_ATTRIBUTES` — Delete User Attributes — Delete custom attributes from a Sanity user within an organization. Use this tool when you need to remove specific custom attributes from a user account. The action deletes the attributes specified in the request and returns the updated attribute list for the user. Example use case: Removing outdated metadata like 'location' or 'year_started' from a user profile.
- `SANITY_GET_INVITE_BY_TOKEN` — Get Invite By Token — Retrieve an invite by its public token. Use this action when you need to fetch details about an invite using the invite token that was shared with the invitee. Returns invite information including status, role, and inviter details.
- `SANITY_GET_ORG_ROLE` — Get Organization Role — Retrieve 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.
- `SANITY_GET_PERMISSION` — Get Permission — Get 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.
- `SANITY_GET_ROBOTS` — Get Robots — Tool 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.
- `SANITY_GET_ROLE` — Get Role — Retrieve 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.
- `SANITY_GET_USERS` — List Resource Users — List 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.
- `SANITY_LIST_ORG_ROLES` — List Organization Roles — List all roles available for an organization. Use this action to retrieve all available roles that can be assigned to users within a specific Sanity organization. The organization_id is required to identify which organization's roles to list.

## Auth

Auth schemes: `API_KEY`.

## How agents use Sanity

Inside a Definable workflow, Sanity is one of the tools the **Distributor specialist** can call. Example coordination patterns:

- **Researcher → Sanity** — the Researcher (GPT-5.5) pulls context from Sanity (records, threads, documents), synthesises findings, and briefs the rest of the team.
- **Writer → Distributor → Sanity** — the Writer (Claude Opus 4.7) drafts copy in brand voice, the Verifier passes it, then the Distributor writes the result into Sanity (create record, post message, draft email).
- **Designer / Engineer → Distributor → Sanity** — the Designer ships an asset or the Engineer ships a code change, the Distributor delivers it via Sanity (attach file, open PR comment, post status).

The Verifier checks every Sanity call. On rate limit, schema drift, or auth refresh it self-heals and retries — the workflow completes without manual intervention.

## Categories

- developer tools — https://definable.ai/apps/category/developer-tools/
- productivity — https://definable.ai/apps/category/productivity/

## Related

- HTML page: https://definable.ai/apps/sanity/
- Same category (developer tools): https://definable.ai/apps/category/developer-tools/
- All integrations: https://definable.ai/apps/
- Workflow (multi-agent loop): https://definable.ai/workflow/
- Apps llms.txt index: https://definable.ai/llms-apps.txt
