Sanity is a headless CMS platform that provides structured content storage and APIs for modern applications
Sanity is a headless CMS platform that provides structured content storage and APIs for modern applications On Nagent, Sanity is exposed as a fully-configurable developer tools integration that any agent can call — 16 actions, and API key authentication. No code is required to wire Sanity into your workflow — connect it once via the External Integrations panel and reuse it across every agent you build.
Agent builders use Sanity to automate the kinds of tasks developer tools teams previously handled manually. Concrete examples — each one is a single agent step in Nagent — include:
Every action and trigger is paired with a structured input/output schema (visible in the sections below), so when you wire Sanity into Helix — our agentic agent builder — the editor knows exactly what each step expects and produces. Configure once, deploy anywhere across your Nagent agents.
Every operation an agent can call against Sanity, with input parameters and output schema. Drop these into any step of an agent built in Helix.
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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SANITY_CREATE_ATTR_DEFINITIONTool 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.
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'.
When true, the attribute value cannot be modified after creation. Defaults to false.
An optional description explaining what this attribute is used for.
The unique identifier of the specific resource (e.g., organization ID, project ID).
The type of resource the attribute definition belongs to. Examples: 'organizations', 'projects', 'datasets'.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SANITY_CREATE_PROMPT_POSTSend 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.
Input parameters
Agent configuration. Controls behavior, capabilities, and document access.
Controls how directives in the response are formatted.
The prompt message to send to the agent
Custom instructions for the agent
Your Sanity organization ID
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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 unique identifier of the attribute definition to delete.
The type of resource to scope the user attribute definitions to. Common values: 'organization' or 'project'.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SANITY_DELETE_USER_ATTRIBUTESDelete 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.
Input parameters
List of attribute keys to delete from the user
Unique identifier of the Sanity user
Unique identifier of the organization
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SANITY_GET_INVITE_BY_TOKENRetrieve 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.
Input parameters
The resource ID to scope the access request to. Must be a valid ID for the resource type.
The public token for the invite. This token is shared with the invitee.
The resource type to scope the access requests to. Must be one of: organization, project, media-library, canvas, dashboard, view.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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
The unique identifier of the role to retrieve
The unique identifier of the organization
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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'.
The name of the permission. This is a unique identifier for the permission.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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 number of items to return per page. Defaults to 100.
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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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 name of the role to retrieve.
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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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
Number of items to return per page. Defaults to 100. Maximum value is 100.
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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SANITY_LIST_ORG_ROLESList 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.
Input parameters
The unique identifier of the organization
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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
Maximum number of attributes to return
The last attribute key from the previous page (used for pagination)
Unique identifier of the Sanity user
Unique identifier of the organization
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SANITY_QUERY_ALL_SCREENINGExecute a GROQ query to fetch all screening documents from Sanity. Uses the Sanity HTTP query API endpoint. Default query retrieves all documents of type 'screening'. Supports optional query parameters for dynamic queries.
Input parameters
GROQ query string to execute. Defaults to querying all documents of type 'screening'.
Optional parameters to pass to the GROQ query. Use $variableName syntax in query.
The Sanity dataset to query. Defaults to 'production'.
If true, returns query execution plan details.
If true, includes source map information in the response.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SANITY_UPDATE_ORG_ACLTool to assign a role to a member in a Sanity organization. Use when adding or modifying user roles within an organization.
Input parameters
The role name to assign (e.g., 'administrator', 'member')
The Sanity user ID to assign the role to
The ID of the organization
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
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
The unique identifier of the user whose attributes to update.
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
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
No publicly available marketplace agent is found using this tool yet. There are 42 agents privately built on Nagent that already use Sanity.
Build on Nagent
Connect Sanity to any Nagent agent in minutes — no API key management, no boilerplate. Just configure and deploy.
The five questions agent builders ask before adopting a new integration.
Open the External Integrations panel inside Nagent (app.nagent.ai/externalIntegration), find Sanity, and click "Connect Now." You'll authenticate with an API key — Nagent handles credential storage and refresh automatically. Once connected, Sanity is available to any agent in your workspace.
No. Nagent provides no-code integration for every tool. Once Sanity is connected, you configure its 16 actions directly in the agent builder UI — no API calls, no boilerplate, no schema management.
Helix — Nagent's agentic agent builder — lets you drop Sanity steps into any workflow visually. Pick an action (e.g., one of those listed above), fill in the inputs (Helix knows the required vs. optional schema for each parameter), and connect it to upstream/downstream steps. Triggers run as the entry point of an agent, so when a Sanity event fires, the agent kicks off automatically.
Every Sanity action and trigger ships with a fully-typed schema — input parameters with name, type, required flag, and description, plus the output payload shape. The schemas are documented in the sections above. Helix uses these schemas to validate your configuration at build time and to type-check the data flowing between steps.
Yes. While Sanity ships with 16 pre-built developer tools actions, you can layer custom logic around them inside Helix — pre/post-processing steps, conditional branches, retries, or stitching Sanity together with other connected tools. For deeper customization, talk to our team about Nagent's Agentic AI Lab — forward-deployed engineers who build Sanity-based workflows tailored to your business.