Contentful content APIs
Contentful provides a content platform that comprises REST and GraphQL APIs for working with your content. Each of these APIs serve a different purpose, so which one to use depends on what you want to do:
- If you're retrieving content to display to users in an app or website, use the Content Delivery API.
- If you want to programmatically create or update content items, use the Content Management API.
- If you want to retrieve unpublished content to show in-context previews to content creators and editors, use the Content Preview API. This API behaves like the Content Delivery API, but includes content that has not yet been published.
- If you want to retrieve and apply transformations to images stored in Contentful, use the Images API.
- If you want to generate schemas and query content in the GraphQL format, use the GraphQL Content API.
Content Delivery API
The Content Delivery API (CDA), available at cdn.contentful.com, is a read-only API for delivering content from Contentful to apps, websites and other media. Content is delivered as JSON data, and images, videos and other media as files.
The API is available via a globally distributed content delivery network. The server closest to the user serves all content, both JSON and binary. This minimizes latency, which especially benefits mobile apps. Hosting content in multiple global data centers also greatly improves the availability of content.
For more details read the reference guide for the Content Delivery API.
Content Management API
The Content Management API (CMA), available at api.contentful.com, is a read-write API for managing content. Unlike the Content Delivery API, the management API requires you to authenticate as a Contentful user. You could use the CMA for several use cases, such as:
- Automatic imports from WordPress, Drupal, and more.
- Integration with other backend systems, such as an e-commerce shop.
- Building custom editing experiences. We built the Contentful web app on top of this API.
For more details read the reference documentation for the Content Management API.
Content Preview API
The Content Preview API, available at preview.contentful.com, is a variant of the CDA for previewing your content before delivering it to your customers. You use the Content Preview API in combination with a "preview" deployment of your website (or a "preview" build of your mobile app) that allows content managers and authors to view their work in-context, as if it were published, using a "preview" access token as though it were delivered by the CDA.
For more details read the reference documentation for the Content Preview API.
The Images API, available at images.ctfassets.net, allows you to resize and crop images, change their background color and convert them to different formats. Using our API for these transformations lets you upload high-quality assets, deliver exactly what your app needs, and still get all the benefits of our caching CDN.
For more details read the reference documentation for the Images API.
GraphQL Content API
The GraphQL Content API, available at graphql.contentful.com, provides each space in Contentful with a GraphQL schema based on its content types. The schema gets regenerated every time these content types are updated.
For more details read the reference documentation for the GraphQL Content API.
Not what you’re looking for? Try our FAQ.