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.

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
- 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.comused 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.comthat 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.comthat returns both published and draft content for in-context previews. The CPA uses a Content Preview API access token (a preview API key).
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.
-
Sign in to the Contentful web app.
-
Navigate to Settings > API keys.
-
Open the Content management tokens tab, and click Generate personal token.
-
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.
-
Copy the generated token immediately and store it securely. The token cannot be viewed again after the dialog is closed.
Treat tokens like passwordsA 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.
-
In the Contentful web app, navigate to Settings > API keys.
-
On the Content delivery / preview tokens tab, click Add API key (or select an existing key).
-
Enter a name and optional description for the key.
-
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
-
Open the relevant space in the Contentful web app.
-
Navigate to Settings > General settings to find the Space ID.
-
Identify the Environment ID you want to connect to (for example,
masterfor 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 tomaster.
For reference, see Find space ID and the Contentful Authentication documentation.
Authenticate
Create a credential in Nexla
-
After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
-
Contentful authenticates each API request using a bearer token, which Nexla sends in the
Authorizationheader asBearer <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.
-
Enter your Contentful space identifier in the Space ID field. This value is found in Settings > General settings for your space.
-
Enter the environment identifier in the Environment ID field. This defaults to
masterif left blank. Environments allow you to isolate content changes (for example,stagingordev) from your production content. -
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.
-
-
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.
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.
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.
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.