contentful-api — Claude Code skill: Contentful API reference
A reference skill for the Contentful REST API: content management, delivery, preview, images and GraphQL. Every example is curl, so it stays language-agnostic.
npx skills add contentful/skills --skill contentful-api -a claude-codeWhat contentful-api does
The skill is split by API. Content Management API handles creating and updating entries, content types, assets and environments. Content Delivery API reads published content only. Preview API serves drafts through the same endpoints with a different host and token. Images API does on-the-fly transformations through URL parameters, and GraphQL gets its own section.
Inside are reference files: authentication with token types and US/EU base URLs, plus HTTP conventions for version locking, rate limits, pagination and errors. CMA has separate files for entries, content types, assets and environments. CDA covers filters and search operators, the include parameter, locales and incremental sync. A quick reference holds ready curl commands for creating a draft entry and fetching entries.
You need Contentful tokens to use it: a CMA token for writes, a CDA token for reads. Images API needs no authentication. Publishing an entry is a separate request with the X-Contentful-Version header, so a draft will not go live on its own.
What it helps with
- create a draft entry and publish it through CMA
- fetch published entries by content type through CDA
- set up locales and fallback chains for multilingual content
- run incremental content sync
- transform images with URL parameters and no auth
Example prompts for the agent
- Show me how to create a draft blogPost entry via CMA and then publish it
- How do I fetch all entries with content_type=blogPost via CDA and resolve links with include?
- Explain how sync works for incremental content synchronization
How to install contentful-api
1Skills CLI (Vercel)
npx skills add contentful/skills --skill contentful-api -a claude-code2Manually: put the files in place
~/.claude/skills/contentful-api/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/contentful-api/
1Skills CLI (Vercel)
npx skills add contentful/skills --skill contentful-api -a codex2Manually: put the files in place
.agents/skills/contentful-api/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add contentful/skills --skill contentful-api -a cursor2Manually: put the files in place
.cursor/skills/contentful-api/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install contentful/skills contentful-api2Manually: put the files in place
.github/skills/contentful-api/SKILL.md1Skills CLI (Vercel)
npx skills add contentful/skills --skill contentful-api -a gemini-cli2Platform CLI
gemini skills install https://github.com/contentful/skills --path skills/contentful-apiManually: put the files in place
.devin/skills/contentful-api/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add contentful/skills --skill contentful-api -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about contentful-api
How do I install contentful-api in Claude?
Run npx skills add contentful/skills --skill contentful-api -a claude-code. The skill then lands at ~/.claude/skills/contentful-api/SKILL.md.
What does contentful-api do?
It is a guide to the Contentful APIs: Content Management, Content Delivery, Preview, Images and GraphQL. Examples use curl and HTTP, so they work with any language.
Which tokens do I need?
A CMA token for writes and a CDA token for reads. Images API works without authentication.
Source text
SKILL.md · MIT
---
name: contentful-api
description: Comprehensive Contentful REST API guide. Covers Content Management API (CMA) for creating/updating content, Content Delivery API (CDA) for fetching published content, Preview API, Images API, and GraphQL API. All examples use curl/HTTP — language-agnostic.
---
# Contentful REST API Guide
Language-agnostic guide for Contentful APIs using HTTP/curl.
## Shared References
- **[Authentication](references/authentication.md)** — Token types, auth headers, API base URLs (US/EU)
- **[HTTP Conventions](references/http-conventions.md)** — Version locking, rate limits, pagination, errors, locale structure
## Content Management API (CMA)
Read/write API for managing content, content types, assets, and environments.
**Start here**: [references/content-management/overview.md](references/content-management/overview.md)
- [**entries.md**](references/content-management/entries.md) — CRUD, publish/unpublish, versioning, query parameters
- [**content-types.md**](references/content-management/content-types.md) — Define/update content models, field types, validations
- [**assets.md**](references/content-management/assets.md) — Upload, process, publish media files
- [**environments.md**](references/content-management/environments.md) — Create, clone, manage environments and aliases
## Content Delivery API (CDA)
Read-only API for fetching published content.
**Start here**: [references/content-delivery/overview.md](references/content-delivery/overview.md)
- [**querying.md**](references/content-delivery/querying.md) — Filters, search operators, pagination, ordering
- [**includes-links.md**](references/content-delivery/includes-links.md) — Include parameter, link resolution
- [**localization.md**](references/content-delivery/localization.md) — Locale parameter, fallback chains
- [**sync.md**](references/content-delivery/sync.md) — Incremental content synchronization
## Content Preview API
Draft + published content via same CDA endpoints, different host/token.
**Reference**: [references/content-preview/overview.md](references/content-preview/overview.md)
## Images API
On-the-fly image transformations via URL parameters. No authentication needed.
**Reference**: [references/images/overview.md](references/images/overview.md)
## GraphQL API
Query content via GraphQL with CDA tokens.
**Reference**: [references/graphql/overview.md](references/graphql/overview.md)
## Quick Reference
```bash
# CMA: Create a draft entry
curl -X POST https://api.contentful.com/spaces/{space_id}/environments/{env_id}/entries \
-H "Authorization: Bearer {cma_token}" \
-H "Content-Type: application/vnd.contentful.management.v1+json" \
-H "X-Contentful-Content-Type: blogPost" \
-d '{"fields":{"title":{"en-US":"Hello"}}}'
# Then publish: PUT .../entries/{id}/published with X-Contentful-Version header
# CDA: Fetch entries
curl "https://cdn.contentful.com/spaces/{space_id}/environments/{env_id}/entries?content_type=blogPost" \
-H "Authorization: Bearer {cda_token}"
```
© contentful · MIT · contentful/skills