canonical: https://jentic.com/apis/sanity.io/sanity-applications-api

# Sanity User Applications API

The Sanity User Applications API registers and deploys the Studios and custom apps that run on Sanity's hosting. It creates applications of type studio or coreApp under an organization, uploads new versions as a multipart tarball with a version string so the newest deployment becomes active, and lists past deployments. It also checks whether a studio host name is free, resolves an application or project from its appHost, installs singleton applications into an organization with access to datasets or media libraries, and reports whether an application can be embedded in a given origin. The older user-applications routes, scoped to an organization or a project, sit alongside the newer applications registry.

## For AI agents

Register Sanity Studios and custom apps, deploy new versions from a tarball, check host name availability, and install singleton apps into an organization.

## Scope

Does not edit content, manage datasets, or assign user roles. Use for registering, deploying, and installing Sanity Studios and custom apps only.

## Capabilities

- Register a Studio or custom app in the applications registry with type studio or coreApp, a title, an organizationId, and a name or slug
- Deploy a new application version as multipart form-data with a version string and a tarball, superseding the previous active deployment
- Check whether a Studio host name is available before claiming it with the studiohosts availability endpoint
- Resolve which application or project sits behind an appHost, and list a project's user applications filtered by appType or dashboardStatus
- Install a singleton application into an organization with access to named datasets, canvases, dashboards, or media libraries, and list or remove installations
- Check whether an application can be framed by a given Origin, based on its X-Frame-Options and Content-Security-Policy headers

## Use cases

### AI agent shipping Studio deployments

An agent asked to ship a Sanity Studio change searches Jentic for 'deploy a Sanity Studio', loads the application deployment operation, and posts the built tarball with a version string as multipart form-data. The new deployment becomes active and supersedes the previous one, and the agent can list deployments afterwards to confirm the version, all without the Sanity token entering its context.

Example prompt: POST /{apiVersion}/applications/{applicationId}/deployments as multipart form-data with version 1.4.0 and the studio tarball, then GET /{apiVersion}/applications/{applicationId}/deployments to confirm the new version is listed

### Claiming a Studio host name

Hosted Studios live at a chosen appHost, which must match a lowercase pattern of letters, digits, and hyphens. Before creating the application, check the name with the studiohosts availability endpoint, then create the user application with urlType internal and that appHost under the project.

Example prompt: GET /{apiVersion}/studiohosts/{appHost}/availability for appHost acme-content, and if available POST /{apiVersion}/projects/{projectId}/user-applications/ with urlType internal and appHost acme-content

### Installing singleton apps for an organization

Some Sanity applications are singletons installed once per organization. The installations endpoint links one to an organization by organizationId and grants it access to named resources of type dataset, canvas, dashboard, or media-library. The singleton must have an active deployment, and installations can be listed, inspected, configured, and uninstalled.

Example prompt: POST /{apiVersion}/applications/{applicationId}/installations with organizationId or0Bc1hcJ and access [{resourceType: dataset, resourceId: production}], then GET /{apiVersion}/installations/ for that organization to confirm it

### Checking embeddability before iframing an app

Teams that frame a Sanity app inside another tool need to know the host allows it. The embeddable endpoint reports whether an application can be framed by the request's Origin header, based on the X-Frame-Options and Content-Security-Policy headers its URL returns, and caches results per application and origin.

Example prompt: GET /{apiVersion}/applications/{applicationId}/embeddable with the Origin header set to https://intranet.example.com and report whether embedding is allowed

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/{apiVersion}/applications/` | Register an application |
| GET | `/{apiVersion}/applications/` | List applications for an organization |
| POST | `/{apiVersion}/applications/{applicationId}/deployments` | Deploy a new application version |
| GET | `/{apiVersion}/applications/{applicationId}/deployments` | List deployments for an application |
| GET | `/{apiVersion}/studiohosts/{appHost}/availability` | Check Studio host availability |
| POST | `/{apiVersion}/projects/{projectId}/user-applications/` | Create a user application for a project |
| POST | `/{apiVersion}/applications/{applicationId}/installations` | Install a singleton application |

## Key resources

- **Applications** — Registry entries of type studio or coreApp owned by an organization
- **User applications** — Project- or organization-scoped Studio and app records with an appHost and urlType
- **Deployments** — Uploaded versions of an application, the newest of which is active
- **Installations** — Links between a singleton application and an organization, with resource access
- **Studio hosts** — Host names that hosted Studios are served from

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 32 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 60 / 100
  - Developer Experience & Jentic Compatibility: 71 / 100
  - AI-Readiness & Agent Experience: 12 / 100
  - Agent Usability: 94 / 100
  - Security: 75 / 100
  - AI Discoverability: 76 / 100
- **View full report:** https://jentic.com/apis/sanity.io/sanity-applications-api/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the Sanity User Applications API by hand means templating the apiVersion into every path, building multipart tarball uploads, and telling the newer applications registry apart from the older user-applications routes. Through Jentic you install once, import it from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Sanity puts the application, project, and installation ids in the URL path (`/applications/{applicationId}/...`, `/projects/{projectId}/user-applications/...`), so a rule can pin your agent to one app or one project and the operations you pick. You choose the operations it may call, so destructive ones like deleting an application or removing all of a project's user applications are not included unless you add them.
- **Credential handling:** Your Sanity token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'deploy a Sanity Studio' or 'check Sanity Studio host availability', and Jentic returns the matching operation with its input schema so the agent calls the right route without browsing the reference docs.

## Related APIs

- **Sanity Projects API** — Create and configure the projects and datasets a Studio points at
- **Sanity HTTP API** — Query and mutate the content a deployed Studio manages
- **Vercel API** — Deploy and host front-end projects on Vercel
- **Netlify API** — Deploy and host sites on Netlify

## FAQ

### What authentication does the Sanity User Applications API use?

Per its OpenAPI spec, the API uses a bearer token (bearerAuth, a JWT) in the Authorization header on every operation. Operations also need Sanity grants: deploying a Studio requires sanity.project.deployStudio on its project, and other applications require sanity.sdk.applications.deploy on the organization. Through Jentic the token is stored by your own instance and attached at call time.

### How do I deploy a new version of a Sanity app?

POST to /{apiVersion}/applications/{applicationId}/deployments as multipart form-data with a version string and the tarball. The new deployment becomes active and supersedes the previous one, and GET on the same path lists past deployments with cursor-based paging.

### What is the difference between applications and user applications?

The applications routes are the organization-owned registry, where each entry has type studio or coreApp. The user-applications routes are the older project- or organization-scoped records keyed by appHost and urlType. Both sets of routes are in the spec; the two deploy routes under /{apiVersion}/deploy are marked deprecated.

### What are the rate limits for the Sanity User Applications API?

The OpenAPI spec does not specify rate limits. Check the Sanity documentation at https://www.sanity.io/docs for current API limits for your plan.

### Is there a Sanity MCP server?

You don't need an MCP server to give your agent the Sanity User Applications API. Jentic connects it directly from the API Directory: import it, store your Sanity token once, and your agent calls the registry, deployment, and installation operations it needs without loading a separate server's tool definitions.

### How do I check a Studio host name through Jentic?

Search Jentic for 'check Sanity Studio host availability', load the matching operation, and execute GET /{apiVersion}/studiohosts/{appHost}/availability with the host name you want. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the Sanity User Applications API?

Yes. A rule that allows the GET and POST deployment operations for one applicationId lets the agent ship and list versions of that single app, while application deletion, uninstalls, and every other app stay off its list. Every call it makes is logged.
