For Agents
Manage headless CMS content in Cosmic — list, create, update, and delete objects and object types, upload media, and track object revisions. Supports a bearer Personal Access Token plus per-bucket read/write keys.
Get started with Cosmic API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"create a Cosmic content object"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Cosmic API API.
List, create, fetch, update, and delete content objects inside any bucket to power website and app content surfaces
Track object history by adding revisions through the dedicated revisions endpoint
Manage object types — the schemas that define content models — including creating and deleting type definitions
Upload, update, and delete media assets attached to a bucket and reference them from objects
GET STARTED
Use for: List all blog post objects in my Cosmic bucket, Create a new content object of type 'product' in Cosmic, I want to update the body field of a Cosmic object, Delete an object that is no longer needed
Not supported: Does not handle visual page building, customer identity, or e-commerce checkout — use for Cosmic headless CMS object, type, revision, and media management only.
Jentic publishes the only available OpenAPI document for Cosmic API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for Cosmic API, keeping it validated and agent-ready. The Cosmic API is the v3 surface of the Cosmic headless CMS platform, exposing 16 endpoints to manage buckets, content objects, object types, object revisions, and media uploads. Authentication supports a Personal Access Token (cos_ prefix) sent as a bearer token plus per-bucket read and write keys passed as query parameters, which lets developers separate public read traffic from privileged write operations.
Separate public reads from writes by routing read traffic through the bucket read key and writes through the write key
Probe the API status endpoint to verify Cosmic availability before running batch jobs
Patterns agents use Cosmic API API for, with concrete tasks.
★ Headless CMS for a Website
Power a marketing site or app by storing pages, blog posts, and reusable components as Cosmic objects, organised by object type. The build pipeline reads objects through the bucket read key, while the editor's CMS uses a Personal Access Token to publish updates that flow into the next build.
On build, call GET /buckets/{bucketSlug}/objects with the bucket read key to fetch all published posts, render the static pages, and invalidate the CDN.
AI-Generated Content Publishing
An AI workflow drafts product descriptions, blog posts, or release notes and publishes them directly into Cosmic by creating typed objects. Each generation that needs revising is recorded as a revision so editors can roll back without losing prior text.
Call POST /buckets/{bucketSlug}/objects with the generated object payload, then POST /buckets/{bucketSlug}/objects/{objectId}/revisions on every subsequent edit so editors can audit the history.
Bulk Media Migration
When migrating assets from another CMS or DAM, upload images and documents to Cosmic in batches, then attach them to existing objects through metafields. The media endpoints support upload, update, and delete so the migration script can clean up failures without manual portal work.
For each asset call POST /buckets/{bucketSlug}/media to upload, store the returned media ID, and PATCH /buckets/{bucketSlug}/objects/{objectId} on the relevant content object to attach the new media reference.
AI Agent Content Operations via Jentic
An agent assists editors with prompts like 'publish this draft as a blog post on Cosmic' or 'archive every product object older than two years' by mapping the request to the right Cosmic operation through Jentic. The agent reasons over content intent rather than memorising bucket slugs and HTTP methods.
Search Jentic for 'create Cosmic object' or 'delete Cosmic object', load the matching operation, and execute it with the bucket slug and object payload provided by the editor.
16 endpoints — jentic publishes the only available openapi specification for cosmic api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/buckets/{bucketSlug}/objects
List objects in a bucket
/buckets/{bucketSlug}/objects
Create a content object
/buckets/{bucketSlug}/objects/{objectId}
Update a content object
/buckets/{bucketSlug}/objects/{objectId}
Delete a content object
/buckets/{bucketSlug}/objects/{objectId}/revisions
Add an object revision
/buckets/{bucketSlug}/object-types
List object types
/buckets/{bucketSlug}/media
Upload media to a bucket
/buckets/{bucketSlug}/objects
List objects in a bucket
/buckets/{bucketSlug}/objects
Create a content object
/buckets/{bucketSlug}/objects/{objectId}
Update a content object
/buckets/{bucketSlug}/objects/{objectId}
Delete a content object
/buckets/{bucketSlug}/objects/{objectId}/revisions
Add an object revision
Three things that make agents converge on Jentic-routed access.
Credential isolation
The Cosmic Personal Access Token and per-bucket read/write keys are stored encrypted in the Jentic vault (MAXsystem). Agents receive a scoped execution handle — the right credential is injected per operation (bearer for write, query key for read) and never enters the agent's context.
Intent-based discovery
Agents search by intent (e.g., 'create Cosmic object' or 'upload Cosmic media') and Jentic returns the matching operation with input and response schemas, so the agent picks the right endpoint without browsing Cosmic documentation.
Time to first call
Direct Cosmic integration: half a day for auth selection, bucket setup, and metafield mapping. Through Jentic: under 30 minutes — search, load, execute.
Alternatives and complements available in the Jentic catalogue.
Contentful API
Enterprise-focused headless CMS with deeper localisation, roles, and workflow features than Cosmic.
Choose Contentful when the team needs multi-locale workflows or fine-grained roles; Cosmic is a faster fit for smaller teams and AI-driven content pipelines.
Sanity API
Real-time, query-driven headless CMS with the GROQ query language.
Use Sanity when the workflow benefits from GROQ queries and real-time collaboration; pick Cosmic when REST-style object CRUD is enough.
Storyblok API
Visual editor headless CMS focused on marketing and component-based pages.
Choose Storyblok when editors need a visual page builder; pick Cosmic when the use case is API-first content with simple object types.
Specific to using Cosmic API API through Jentic.
Why is there no official OpenAPI spec for Cosmic API?
Cosmic publishes API documentation but not a single OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Cosmic API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Cosmic API use?
The API supports three credentials: a Personal Access Token with the cos_ prefix sent as a bearer Authorization header, plus per-bucket read_key and write_key values passed as query parameters. Through Jentic, all three are stored encrypted and the right one is injected per operation so the agent never sees the raw secret.
Can I create new content objects with this API?
Yes. POST /buckets/{bucketSlug}/objects creates a new content object inside the named bucket, accepting the object's type slug, metafields, and slug as inputs. Use the bucket write key or a Personal Access Token for this operation.
How do I track changes to a Cosmic object?
Call POST /buckets/{bucketSlug}/objects/{objectId}/revisions after each meaningful edit. Cosmic stores the revision so editors can audit history or roll back without external version control.
What are the rate limits for the Cosmic API?
The OpenAPI spec does not declare numeric rate limits. Treat HTTP 429 responses as authoritative, back off using the Retry-After header where present, and consult the Cosmic dashboard for plan-specific limits before running heavy migrations.
How do I upload media through Jentic?
Search Jentic for 'upload media to Cosmic', load POST /buckets/{bucketSlug}/media, and execute it with the file payload and bucket slug. Jentic returns the operation schema so the agent does not need to read Cosmic docs for the field names.
/buckets/{bucketSlug}/object-types
List object types
/buckets/{bucketSlug}/media
Upload media to a bucket