Skip to main content

Contentstack

Contentstack is a headless content management system (CMS) that lets teams create, manage, and publish structured content and deliver it to any channel through APIs. Its Content Delivery API serves published content types, entries, assets, and taxonomies from a stack, and its Sync API streams full and incremental content changes for keeping downstream systems up to date.

Contentstack icon

Power end-to-end data operations for your Contentstack API with Nexla. Our bi-directional Contentstack connector is purpose-built for Contentstack, 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 Contentstack or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Contentstack 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

To connect Nexla to Contentstack's Content Delivery API, you need access to a Contentstack stack and two pieces of read-only authentication information: the Stack API Key and a Delivery Token for the environment you want to read from. The Content Delivery API serves published content, so the credential you create is read-only by design and cannot modify content in your stack.

Only stack owners, developers, and admins can create delivery tokens. If you do not have one of these roles in the stack, ask a stack administrator to provide the API Key and a Delivery Token, or to grant you the appropriate role.

Retrieve Your Stack API Key

The Stack API Key uniquely identifies the stack that Nexla will read content from.

  1. Log in to your Contentstack account and open the stack you want to connect.

  2. Navigate to Settings > Stack.

  3. Under the API Credentials section on the right-hand side of the page, copy the API Key value.

Create or Retrieve a Delivery Token

A Delivery Token is a read-only credential scoped to a specific publishing environment (for example, production or staging). It controls which environment's published content Nexla can fetch.

  1. In your stack, navigate to Settings > Tokens > Delivery Tokens.

  2. To use an existing token, select the delivery token that corresponds to the publishing environment you want to read from. To create a new token, click + New Token, enter a name and description, select the target environment, and click Generate Token.

  3. At the bottom of the token page, copy the Delivery Token value, and note the Environment name associated with the token.

    In the Content Delivery API, the Delivery Token value is passed as the access_token header. While requests may also work with a legacy Access Token, Contentstack has deprecated Access Tokens for new stacks and strongly recommends using Delivery Tokens for fetching published content.

Identify Your Region Base URL

Contentstack hosts stacks in several regions, and the Content Delivery API base URL differs by region. Confirm the region of your stack so that you select the correct base URL when configuring the credential. For complete details, see the Contentstack API endpoints documentation.

For complete reference information, see the Contentstack Content Delivery API documentation and the overview of tokens.

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. Select the Base URL that matches the region where your Contentstack stack is hosted. This is the host that Nexla sends Content Delivery API requests to. Available options include:

    • Production API (api.contentstack.io) – AWS North America region
    • CDN (cdn.contentstack.io) – AWS North America CDN endpoint, optimized for faster content delivery
    • EU API (eu-api.contentstack.com) – AWS Europe region
    • Azure NA (azure-na-api.contentstack.com) – Azure North America region

    Select the base URL that corresponds to the region of your stack. Requests sent to the wrong regional host will fail authentication. The CDN host is recommended for high-volume read workloads.

  4. Enter your stack's API Key in the API Key field. This value identifies the stack that Nexla will read content from, obtained in Prerequisites above. It is stored securely and is not displayed after the credential is saved.

  5. Enter your Delivery Token in the Delivery Token field. This read-only token, also obtained in Prerequisites, authorizes Nexla to fetch published content for a specific environment and is sent as the access_token header on each request. It is stored securely and is not displayed after the credential is saved.

  6. Enter the publishing environment name in the Environment field (for example, production). This must match the environment associated with the Delivery Token entered above and determines which published version of your content Nexla retrieves. If left blank, the default value production is used.

    The Environment value must match the environment that the Delivery Token was created for. A Delivery Token only grants access to the published content of the environment it is scoped to.

  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 and can be selected for use with a new data source or destination.

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 Contentstack connector tile, then select the credential that will be used to connect to the Contentstack instance, and click Next; or, create a new Contentstack credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Contentstack 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.

All Content Delivery API templates read published content from the environment associated with your credential. Templates that list collections automatically paginate using Contentstack's skip and limit parameters, fetching 100 records per page until all records are retrieved. The Sync templates are not auto-paginated and are designed to be chained together, as described in their individual sections below.

Content Types & Entries

List Content Types

Retrieves all content types defined in the stack. Use this endpoint to discover the structure of your stack and obtain the content type UIDs needed by the entry endpoints below.

  • No required parameters. This endpoint automatically paginates through all content types in the stack.
  • Optionally set Include Count to Yes to include the total count of content types in the response. The default value is No.

A content type defines the structure (schema) of an entry. The unique content_type_uid values returned here are required inputs for the entry and content-query endpoints.

Get Content Type

Retrieves the schema of a single content type by its unique identifier. Use this endpoint when you need the field definitions for one specific content type.

  • Enter the unique identifier of the content type in the Content Type UID field. You can obtain available UIDs using the List Content Types endpoint.

List Entries

Retrieves all published entries of a specific content type from the environment associated with your credential. This is the primary endpoint for ingesting content records.

  • Enter the unique identifier of the content type whose entries you want to fetch in the Content Type UID field.
  • This endpoint automatically paginates through all entries, fetching 100 records per page.

Entries are returned for the environment configured in your credential. Only content that has been published to that environment is returned by the Content Delivery API.

Get Entry

Retrieves a single published entry by its unique identifier. Use this endpoint when you need one specific record rather than a full collection.

  • Enter the unique identifier of the content type that contains the entry in the Content Type UID field.
  • Enter the unique identifier of the entry in the Entry UID field. Entry UIDs can be obtained from the List Entries endpoint.

List Entries with Limit

Retrieves entries of a content type, paginating in pages governed by the API's limit parameter. Use this endpoint to ingest large entry collections in controlled batches.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Nexla manages pagination automatically, fetching 100 records per page until all entries are retrieved.

List Entries with Skip

Retrieves entries of a content type using the API's skip parameter to offset the starting position. Use this endpoint when you want to begin ingestion from a specific point in the entry collection.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Nexla automatically advances the skip offset across pages, fetching 100 records per page.

List Entries - Paginated

Retrieves entries of a content type with both pagination and an optional total count. Use this endpoint when you want the total number of matching entries returned alongside the data.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Optionally set Include Count to Yes to include the total count of entries in the response. The default value is Yes.

Assets

List Assets

Retrieves all published assets—such as images, videos, and documents—from the environment associated with your credential.

  • No required parameters. This endpoint automatically paginates through all assets in the environment, fetching 100 records per page.

Assets are files uploaded to your stack. The response includes asset metadata such as the file name, content type, file size, and the URL where the asset is hosted.

Get Asset

Retrieves a single published asset by its unique identifier from the environment associated with your credential.

  • Enter the unique identifier of the asset in the Asset UID field. Asset UIDs can be obtained from the List Assets endpoint.

Sync API

The Sync API returns published entries and assets along with a token in each response. When more than 100 records are available, the response includes a pagination_token for fetching the next batch; when the batch is complete, it instead includes a sync_token for fetching future incremental changes. These templates are not auto-paginated—you chain them by passing the returned token into the next call.

Initial Sync

Starts a full stack synchronization (init=true), returning all published entries and assets for the environment. Use this endpoint the first time you synchronize content to a downstream system.

  • No required parameters. The request fetches the first batch of items for the environment associated with your credential.
  • Inspect the response to determine the next step:

    • If the response contains a pagination_token, more records are available. Pass that token to the Sync Using Pagination Token endpoint to fetch the next batch.
    • If the response contains a sync_token, the initial sync is complete. Save that token and use it later with the Subsequent Sync endpoint to fetch only incremental changes.

The Sync API returns content for the environment configured in your credential. Each response includes either a pagination_token (more pages remain) or a sync_token (the batch is complete)—never both.

Sync Using Pagination Token

Fetches one batch of sync results using a pagination_token returned by a previous sync call. Call this endpoint repeatedly until a sync_token is returned, indicating that all records have been fetched.

  • Enter the token returned by the previous sync response in the Pagination Token field.
  • Each response again contains either a new pagination_token (more pages remain) or a sync_token (the sync is complete). Continue calling this endpoint with each new pagination token until a sync token is returned.

Pagination tokens are especially useful for resuming an interrupted sync. If a sync is interrupted, you can restart from where it stopped by reusing the last pagination_token you received.

Subsequent Sync

Fetches only the content changes (delta updates) made since a previous completed sync, using the sync_token from that sync. Use this endpoint for ongoing incremental synchronization after an initial sync.

  • Enter the token returned by the previous completed sync in the Sync Token field.
  • The response contains the changed items along with either a pagination_token (more changed pages remain) or a new sync_token (the incremental sync is complete). Save the new sync token for the next incremental run.

Incremental changes include published, unpublished, and deleted entries and assets, allowing you to keep a downstream system fully in step with your stack.

Taxonomy Queries

These endpoints query taxonomy entries using Contentstack's taxonomy query operators. Each accepts a JSON Query parameter (with a sample default value provided) and automatically paginates through matching results.

List Taxonomy Entries

Retrieves all taxonomy entries for the environment with no query filter applied. Use this endpoint to ingest the full set of taxonomy-tagged content.

  • No required parameters. This endpoint automatically paginates through all taxonomy entries.

Taxonomies let you classify content using hierarchical terms. The query endpoints below filter taxonomy entries using operators that respect this hierarchy.

Taxonomy Query - OR Operator

Retrieves taxonomy entries that match any one of multiple conditions using the $or operator.

  • Enter the JSON query in the Query field. The default value is {"$or":[{"taxonomies.color":"blue"},{"taxonomies.color":"red"}]}, which matches entries tagged with either color.

Taxonomy Query - AND Operator

Retrieves taxonomy entries that match all of the specified conditions using the $and operator.

  • Enter the JSON query in the Query field. The default value is {"$and":[{"taxonomies.color":"blue"},{"taxonomies.size":"large"}]}, which matches entries tagged with both terms.

Taxonomy Query - Exists Operator

Retrieves taxonomy entries where a specified field exists, using the $exists operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.color":{"$exists":true}}, which matches entries that have a color taxonomy term assigned.

Taxonomy Query - Equal and Below

Retrieves taxonomy entries that match a specific term and all of its descendant terms, using the $eq_below operator. Use this endpoint to ingest a term together with everything beneath it in the taxonomy hierarchy.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$eq_below":"electronics"}}.

Taxonomy Query - Below Operator

Retrieves taxonomy entries that match only the descendant terms of a specified term, excluding the term itself, using the $below operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$below":"electronics"}}.

Taxonomy Query - Equal and Above

Retrieves taxonomy entries that match a specific term and all of its ancestor terms, using the $eq_above operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$eq_above":"laptops"}}.

Taxonomy Query - Above Operator

Retrieves taxonomy entries that match only the ancestor (parent) terms of a specified term, excluding the term itself, using the $above operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$above":"laptops"}}.

Content Queries

These endpoints query the entries of a specific content type using Contentstack's query operators. Each requires a Content Type UID and accepts a JSON Query parameter (with a sample default value provided), and automatically paginates through matching results.

Content Query - OR Operator

Retrieves entries that match any one of multiple conditions using the $or operator.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$or":[{"color":"Gold"},{"color":"Black"}]}.

Content Query - OR in Groups

Retrieves entries matching an $or condition applied to fields nested inside a group field.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$or":[{"group.field1":"value1"},{"group.field2":"value2"}]}.

A group field bundles related fields together. Reference fields inside a group using dot notation, such as group.field1.

Content Query - AND in Modular Blocks

Retrieves entries matching an $and condition applied to fields inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$and":[{"modular_block.field1":"value1"},{"modular_block.field2":"value2"}]}.

Modular blocks let content editors assemble entries from reusable, repeatable block components. Reference fields inside a modular block using dot notation.

Content Query - OR in Modular Blocks

Retrieves entries matching an $or condition applied to fields inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$or":[{"modular.field1":"value1"},{"modular.field2":"value2"}]}.

Content Query - Less Than

Retrieves entries whose numeric field value is less than a specified threshold, using the $lt operator.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"price":{"$lt":600}}.

Content Query - Less Than in Groups

Retrieves entries whose group-field value is less than a specified threshold, using the $lt operator on a field inside a group.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"group.discount":{"$lt":25}}.

Content Query - Less Than in Modular Blocks

Retrieves entries whose modular-block field value is less than a specified threshold, using the $lt operator on a field inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"modular.rating":{"$lt":3}}.

Content Query - Less Than or Equal To

Retrieves entries whose numeric field value is less than or equal to a specified threshold, using the $lte operator.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"price":{"$lte":146}}.

Content Query - Less Than or Equal To in Groups

Retrieves entries whose group-field value is less than or equal to a specified threshold, using the $lte operator on a field inside a group.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"group.discount":{"$lte":27}}.

Content Query - Less Than or Equal To in Modular Blocks

Retrieves entries whose modular-block field value is less than or equal to a specified threshold, using the $lte operator on a field inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"modular.rating":{"$lte":3}}.

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

Contentstack data sources can also be manually configured to ingest data from any valid Contentstack Content Delivery API endpoint, including endpoints not covered by the pre-built templates or requiring custom query 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.

Content Delivery API requests are read-only, so GET is the only method used. The host must match your stack's region, and most endpoints require the environment query parameter to return published content—for example, https://api.contentstack.io/v3/content_types/{content_type_uid}/entries?environment=production. Set the path to data to $.entries[*] or $.assets[*] for list endpoints, $.items[*] for the Sync endpoints, and $.entry, $.asset, or $.content_type for single-record endpoints; the sibling count value returned by list endpoints (when requested) can be captured via the path to metadata. The api_key and access_token headers are added automatically from your credential and do not need to be set manually.

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