Was this page helpful?

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.

Note: For EU data residency customers, the Content Delivery API is available at cdn.eu.contentful.com.

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.

Note: For EU data residency customers, the Content Management API is available at api.eu.contentful.com.

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.
Note: You can also use the Content Management API to retrieve content. But as it's used to manage content, it will retrieve all items (i.e. all localized and unpublished content).

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.

Note: For EU data residency customers, the Content Preview API is available at preview.eu.contentful.com.

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.

Images 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.

Note: For EU data residency customers, the Images API is available at images.eu.ctfassets.net.

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.

Note: For EU data residency customers, the GraphQL Content API is available at graphql.eu.contentful.com.

For more details read the reference documentation for the GraphQL Content API.

Next steps

Not what you’re looking for? Try our FAQ.