Skip to main content

Contentful

Contentful is a headless content management system (CMS) that stores content in a structured, presentation-independent way and delivers it through APIs across spaces and environments. Its Content Management API (CMA), Content Delivery API (CDA), and Content Preview API (CPA) let teams create, update, deliver, and preview content types, entries, and assets for websites, apps, and other digital channels.

Contentful icon

Power end-to-end data operations for your Contentful API with Nexla. Our bi-directional Contentful connector is purpose-built for Contentful, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Contentful or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Contentful workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

The Contentful connector authenticates using an API access token together with a space ID and an environment ID. Before creating a credential, gather the following from your Contentful account.

Choose the Appropriate API and Access Token

Contentful exposes three content APIs, and the type of access token you generate determines which API the token can call:

  • Content Management API (CMA): A read/write API at https://api.contentful.com used to programmatically create, update, and manage content types, entries, and assets. The CMA requires a Content management token (personal access token) and is required for any destination (sink) operation, such as creating or updating entries and assets.

  • Content Delivery API (CDA): A read-only API at https://cdn.contentful.com that serves published content optimized for production delivery. The CDA uses a Content Delivery API access token (a delivery API key).

  • Content Preview API (CPA): A read-only API at https://preview.contentful.com that returns both published and draft content for in-context previews. The CPA uses a Content Preview API access token (a preview API key).

Match the token to the endpoints you plan to use

The endpoint templates included with this connector call different APIs. Management, environment, content type, entry, and asset endpoints call the CMA; "Search Entries (CDA)" calls the CDA; and "Preview Entries (CPA)" and "Get Space" call the CPA. Use an access token that has access to the API(s) required by the endpoints you intend to configure.

Generate a Content Management Token (CMA)

To create content or perform any destination (write) operation, generate a personal access token for the Content Management API.

  1. Sign in to the Contentful web app.

  2. Navigate to Settings > API keys.

  3. Open the Content management tokens tab, and click Generate personal token.

  4. Enter a descriptive name for the token (e.g., "Nexla Integration"), optionally set an expiration date, and click Generate.

    Setting an expiration date is recommended as a security best practice. When the expiration date is reached, the token is automatically revoked, limiting the risk if the token is ever exposed.

  5. Copy the generated token immediately and store it securely. The token cannot be viewed again after the dialog is closed.

    Treat tokens like passwords

    A Content Management token can read and modify content on your behalf. Store it securely, avoid committing it to version control, and rotate it if you suspect it has been exposed.

For complete information, see the Contentful Personal Access Tokens guide.

Generate a Delivery or Preview API Key (CDA / CPA)

To read published content (CDA) or preview published and draft content (CPA), generate the corresponding API key.

  1. In the Contentful web app, navigate to Settings > API keys.

  2. On the Content delivery / preview tokens tab, click Add API key (or select an existing key).

  3. Enter a name and optional description for the key.

  4. Copy the Content Delivery API - access token for read-only delivery access, or the Content Preview API - access token for preview access.

Locate Your Space ID and Environment ID

  1. Open the relevant space in the Contentful web app.

  2. Navigate to Settings > General settings to find the Space ID.

  3. Identify the Environment ID you want to connect to (for example, master for your production content). Environments behave like branches of your content, allowing you to develop and test changes in isolation. If no environment is specified, Contentful defaults to master.

For reference, see Find space ID and the Contentful Authentication documentation.

Authenticate

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Contentful authenticates each API request using a bearer token, which Nexla sends in the Authorization header as Bearer <access token>. Enter your Contentful access token in the Access Token field. Use a Content Management token for write (destination) operations and CMA read operations, or a Delivery/Preview API key for CDA/CPA read operations, as described in Prerequisites.

    The access token is stored securely and is never displayed after the credential is saved.

  4. Enter your Contentful space identifier in the Space ID field. This value is found in Settings > General settings for your space.

  5. Enter the environment identifier in the Environment ID field. This defaults to master if left blank. Environments allow you to isolate content changes (for example, staging or dev) from your production content.

  6. Advanced settings expose the base URL for each Contentful API, pre-populated with Contentful's default endpoints:

    • Content Management API URL: Defaults to https://api.contentful.com.

    • Content Delivery API URL: Defaults to https://cdn.contentful.com.

    • Content Preview API URL: Defaults to https://preview.contentful.com.

    Leave these fields at their default values unless you have a specific reason to override them. The default URLs apply to all standard Contentful accounts.

  7. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Contentful connector tile, then select the credential that will be used to connect to the Contentful instance, and click Next; or, create a new Contentful credential for use in this flow.

The source templates call different Contentful APIs depending on the type of content being read. Endpoints that read management-level resources (environments, content types, entries, assets, and locales) call the Content Management API (CMA). The "Search Entries (CDA)" template calls the read-only Content Delivery API (CDA), which serves published content. The "Preview Entries (CPA)" and "Get Space" templates call the Content Preview API (CPA). Ensure that the access token in your selected credential has access to the API(s) used by the endpoint(s) you configure.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Contentful endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

List Environments

This endpoint retrieves all environments within the Contentful space configured in your credential. Environments are isolated content workspaces (similar to branches) that let teams develop and test content changes without affecting production.

  • No additional configuration is required beyond selecting this endpoint template. The space is determined by the Space ID in your credential.
  • This endpoint is paginated. Nexla automatically pages through results using Contentful's skip and limit parameters, retrieving up to 100 records per page until all environments are fetched.

Use this endpoint to discover the environment IDs available in your space before configuring environment-scoped endpoints such as List Content Types or List Entries.

Get Environment

This endpoint retrieves the metadata and configuration for a single environment by its ID. Use it when you need details about one specific environment rather than the full list.

  • Enter the identifier of the environment to retrieve in the Environment ID field. This field is required. Environment IDs can be obtained from the List Environments endpoint.

List Content Types

This endpoint retrieves all content types defined in the space and environment configured in your credential. A content type defines the structure of your content—the fields that entries of that type contain.

  • No additional configuration is required beyond selecting this endpoint template. The space and environment are determined by your credential's Space ID and Environment ID.
  • This endpoint is paginated. Nexla automatically pages through results using skip and limit, retrieving up to 100 content types per page.

Content type IDs returned by this endpoint can be used to filter entries in the List Entries, Search Entries (CDA), and Preview Entries (CPA) endpoints.

Get Content Type

This endpoint retrieves a single content type by its ID, including its complete field definitions. Use it when you need the schema for one specific content type.

  • Enter the identifier of the content type to retrieve in the Content Type ID field. This field is required. Content type IDs can be obtained from the List Content Types endpoint.

List Entries

This endpoint retrieves entries from the space and environment configured in your credential using the Content Management API. Entries are individual content records that conform to a content type. Use this endpoint to ingest your full content set, optionally filtered to a single content type.

  • Optionally, enter a content type ID in the Content Type Filter field to retrieve only entries of that type. Leave this field empty to retrieve entries of all content types.
  • This endpoint is paginated. Nexla automatically pages through results using skip and limit, retrieving up to 100 entries per page.

The Content Management API returns all entries regardless of publish state, including drafts and changed entries. To retrieve only published content, use the List Published Entries or Search Entries (CDA) endpoint instead.

Get Entry

This endpoint retrieves a single entry by its ID. Use it when you need to ingest one specific content record rather than a collection.

  • Enter the identifier of the entry to retrieve in the Entry ID field. This field is required. Entry IDs can be obtained from the List Entries endpoint or from the Contentful web app URL when viewing an entry.

List Published Entries

This endpoint retrieves the published versions of all entries in the space and environment using the Content Management API's public entries collection. Use it when you want only content that is currently live, without drafts or unpublished changes.

  • No additional configuration is required beyond selecting this endpoint template. The space and environment are determined by your credential.
  • This endpoint is paginated. Nexla automatically pages through results using skip and limit, retrieving up to 100 entries per page.

List Assets

This endpoint retrieves all assets in the space and environment configured in your credential. Assets are files managed in Contentful, such as images, videos, audio files, and documents, along with their metadata.

  • No additional configuration is required beyond selecting this endpoint template. The space and environment are determined by your credential.
  • This endpoint is paginated. Nexla automatically pages through results using skip and limit, retrieving up to 100 assets per page.

Get Asset

This endpoint retrieves a single asset by its ID, including its file metadata and URLs. Use it when you need details for one specific file.

  • Enter the identifier of the asset to retrieve in the Asset ID field. This field is required. Asset IDs can be obtained from the List Assets endpoint.

List Locales

This endpoint retrieves all locales configured in the space and environment. Locales define the languages and regional variants that your content can be localized into (for example, en-US or de-DE).

  • No additional configuration is required beyond selecting this endpoint template. The space and environment are determined by your credential.
  • This endpoint is paginated. Nexla automatically pages through results using skip and limit, retrieving up to 100 locales per page.

Use the locale codes returned by this endpoint to understand the localized field values present in entries and assets retrieved by the other endpoints.

Get Space

This endpoint retrieves the metadata and configuration for the space configured in your credential, such as the space name and default locale. It calls the Content Preview API (CPA), so the access token in your credential must have preview access.

  • No additional configuration is required beyond selecting this endpoint template. The space is determined by your credential's Space ID.

Search Entries (CDA)

This endpoint searches published entries using the Content Delivery API (CDA), which is optimized for fast, production-grade delivery of live content. Use it when you want to ingest a targeted subset of published content based on content type and search criteria. The access token in your credential must have delivery access.

  • Optionally, enter a content type ID in the Content Type field to restrict the search to a single content type. Leave this field empty to search across all content types.
  • Optionally, enter additional Contentful search parameters in the Query String field. These are appended to the request as URL query parameters and let you filter, order, and full-text search your content. Examples include:

    • Field filter: fields.title[match]=launch to match entries whose title contains "launch".
    • Ordering: order=sys.createdAt to sort results by creation date.
    • Full-text search: query=marketing to search across all fields.

Multiple search parameters can be combined with & in the Query String field. This endpoint is paginated; Nexla automatically pages through results using skip and limit, retrieving up to 100 entries per page. The CDA returns a maximum of 1,000 entries per result set.

Preview Entries (CPA)

This endpoint retrieves entries using the Content Preview API (CPA), which returns both published and draft content. Use it to ingest in-progress content for staging or review workflows. The access token in your credential must have preview access.

  • Optionally, enter a content type ID in the Content Type Filter field to retrieve only entries of that type. Leave this field empty to retrieve entries of all content types.
  • This endpoint is paginated. Nexla automatically pages through results using skip and limit, retrieving up to 100 entries per page.

Because the CPA returns unpublished drafts, use it for preview and staging scenarios rather than production delivery. For live content only, use the Search Entries (CDA) or List Published Entries endpoint.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Contentful data sources can also be manually configured to ingest data from any valid Contentful API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

The base URL depends on which Contentful API you are calling: the Content Management API (CMA) at https://api.contentful.com, the Content Delivery API (CDA) at https://cdn.contentful.com, or the Content Preview API (CPA) at https://preview.contentful.com. The access token in your credential must match the API in the URL—a delivery token cannot call the CMA, and a management token cannot call the CDA.

Contentful collection responses (entries, assets, content types, locales) wrap the records in a top-level items array, so enter $.items[*] as the path to data; for single-resource responses (Get Entry, Get Asset, Get Space), enter $ to treat the whole response as one record. To carry the collection's total count as metadata on each record, specify its path in the metadata field. The Authorization header carrying your access token is added automatically and does not need to be added as a request header.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Contentful data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the Contentful destination, and select the Send to Destination option from the menu. Select the Contentful connector from the list of available destination connectors, then select the credential that will be used to connect to the Contentful organization, and click Next; or, create a new Contentful credential for use in this flow.

Use a Content Management token for all destination operations

All write operations send data to the Contentful Content Management API (CMA) at https://api.contentful.com. The access token in your selected credential must be a Content management token (personal access token) with write access. Content Delivery and Content Preview tokens are read-only and cannot be used for destination operations.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Contentful endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

Create Content Type

This endpoint creates a new content type in the space and environment configured in your credential. A content type defines the structure—the set of fields—that entries of that type will contain. Use this endpoint to provision new content models programmatically.

  • Each Nexset record is sent as the JSON body of a POST request to the content types collection. Map your Nexset so that each record contains a valid content type definition, including the name and a fields array describing the field schema.
  • No additional endpoint parameters are required. The space and environment are determined by your credential.

In Contentful, a newly created content type is in a draft state and must be published before entries can be created against it. Publishing is a separate Content Management API operation.

Update Content Type

This endpoint updates an existing content type identified by its ID. Use it to modify a content type's fields or settings.

  • Enter the identifier of the content type to update in the Content Type ID field. This field is required. Content type IDs can be obtained from the List Content Types data source endpoint.
  • Each Nexset record is sent as the JSON body of a PUT request. Map your Nexset to contain the full, updated content type definition.

Contentful uses optimistic locking for management updates. Updates typically require the current version of the resource (sent in the X-Contentful-Version header). For complete details, see the Contentful Content Management API documentation.

Create Entry

This endpoint creates a new entry in the space and environment configured in your credential. An entry is a single content record that conforms to a content type. Use this endpoint to push new content records into Contentful.

  • Enter the content type ID for the new entries in the Content Type ID field. This field is required. Nexla sends this value in the X-Contentful-Content-Type request header, which Contentful requires when creating an entry.
  • Each Nexset record is sent as the JSON body of a POST request. Map your Nexset so that each record contains a fields object whose keys match the fields defined on the target content type, with values keyed by locale (for example, {"fields": {"title": {"en-US": "My title"}}}).

Newly created entries are in a draft state. Publish them with a separate Content Management API operation when they are ready to go live.

Update Entry

This endpoint replaces an existing entry identified by its ID with new field values. Use it to apply a full update to an entry's content.

  • Enter the identifier of the entry to update in the Entry ID field. This field is required. Entry IDs can be obtained from the List Entries data source endpoint.
  • Each Nexset record is sent as the JSON body of a PUT request. Map your Nexset to contain the complete, updated fields object for the entry.

Use Update Entry when you are replacing the full set of fields. To change only specific fields without sending the entire entry, use the Patch Entry endpoint instead.

Patch Entry

This endpoint partially updates an existing entry, modifying only the specified fields rather than replacing the entire entry. Use it for efficient, targeted updates.

  • Enter the identifier of the entry to patch in the Entry ID field. This field is required.
  • Each Nexset record is sent as the JSON body of a PATCH request. Map your Nexset to contain a JSON Patch document describing only the field changes to apply.

The Patch Entry endpoint uses JSON Patch semantics. For the exact patch document format Contentful expects, see the Contentful Content Management API documentation.

Create Asset

This endpoint creates a new asset in the space and environment configured in your credential. Assets represent files such as images, videos, audio files, and documents. Use this endpoint to register new files in Contentful.

  • Each Nexset record is sent as the JSON body of a POST request to the assets collection. Map your Nexset so that each record contains the asset's fields (such as title, description, and file), with values keyed by locale.
  • No additional endpoint parameters are required. The space and environment are determined by your credential.

In Contentful, creating an asset registers its metadata. The asset must then be processed and published in separate Content Management API operations before it is available for delivery.

Update Asset

This endpoint updates an existing asset identified by its ID. Use it to modify an asset's title, description, file reference, or other metadata.

  • Enter the identifier of the asset to update in the Asset ID field. This field is required. Asset IDs can be obtained from the List Assets data source endpoint.
  • Each Nexset record is sent as the JSON body of a PUT request. Map your Nexset to contain the updated asset fields.

Manual configuration

Contentful destinations can also be manually configured to send data to any valid Contentful Content Management API endpoint, such as publishing entries and assets, managing tags, or targeting a specific environment. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

All write operations use the base URL https://api.contentful.com and expect JSON. For update operations, include the ID of the object to be updated at the end of the URL—for example, https://api.contentful.com/spaces/{'{space_id}'}/environments/{'{environment_id}'}/entries/{'{entry_id}'}. Common Contentful management headers include X-Contentful-Content-Type (required when creating an entry) and X-Contentful-Version (required for many update operations); the Authorization header is added automatically and does not need to be configured.

The Contentful Content Management API creates and updates resources one at a time, so most Contentful write flows should leave record batching disabled. Enabling the response webhook option lets you capture the response from each call, such as the ID and version of a created or updated resource.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to Contentful, open the destination resource menu, and select Activate.

The Nexset data will not be sent to Contentful until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.