> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/contentstack.md).

# ContentStack

ContentStack is a headless CMS. Connect to manage content types, entries, and assets, and publish or unpublish content across environments.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector    | Authentication   |
| ------------ | ---------------- |
| ContentStack | Management Token |

#### ContentStack

Connect to ContentStack to manage content types, entries, assets, and publish or unpublish content across environments.

**Set up in ContentStack**

1. Sign in to ContentStack as a stack Owner or Admin and open your stack, then click the Settings icon in the left navigation.
2. Select Tokens, open the Management Tokens tab, and click + Management Token.
3. Name the token, choose the branches it can access, and click Generate Token.
4. Copy the Management Token and the Stack API Key shown in the confirmation window; the token is displayed only once.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **ContentStack**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field    | Required                 | What to enter                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Stack API Key    | Yes                      | The unique identifier of your Contentstack stack. Find it in the Contentstack UI under Settings -> Stack -> API Credentials. Starts with 'blt'. [Provider instructions](https://www.contentstack.com/docs/developers/apis/content-management-api).                                                                                                                                                                                   |
| Management Token | Yes                      | A Stack management token used to authenticate Content Management API requests. Generate one under Settings -> Tokens -> Management Tokens -> Generate Token, granting Read & Write access on content types, entries, assets, environments, and locales. Copy the value immediately - Contentstack displays it only once. [Provider instructions](https://www.contentstack.com/docs/developers/create-tokens/about-management-token). |
| Region           | Optional / as applicable | Hosting region of your Contentstack stack. Identify it from the Contentstack app URL: app.contentstack.com (AWS\_NA), eu-app.contentstack.com (AWS\_EU), au-app.contentstack.com (AWS\_AU), azure-na-app.contentstack.com (AZURE\_NA), azure-eu-app.contentstack.com (AZURE\_EU), gcp-na-app.contentstack.com (GCP\_NA), gcp-eu-app.contentstack.com (GCP\_EU).                                                                      |

**Provider documentation:** [Setup reference](https://www.contentstack.com/docs/developers/create-tokens/generate-a-management-token).

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **ContentStack** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### List Content Types

List the content types (schemas) declared in your ContentStack stack.

**Inputs**

| Field | Type    | Required | Description                                                                       |
| ----- | ------- | -------- | --------------------------------------------------------------------------------- |
| Limit | integer | No       | Maximum number of content types to return. Minimum: 1. Maximum: 100. Default: 20. |
| Skip  | integer | No       | Number of content types to skip (for pagination). Minimum: 0. Default: 0.         |

**Outputs**

| Field         | Type    | Description                                           |
| ------------- | ------- | ----------------------------------------------------- |
| Content Types | array   | Content types (schemas) declared in the stack.        |
| Count         | integer | Total number of content types available in the stack. |

#### List Entries

List entries for a given content type.

**Inputs**

| Field        | Type            | Required | Description                                                                                                    |
| ------------ | --------------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| Content Type | select (string) | Yes      | The UID of the content type whose entries to list. Options load from the selected connection.                  |
| Locale       | select (string) | No       | Locale code to fetch localized entry content (optional). Options load from the selected connection. Default: . |
| Limit        | integer         | No       | Maximum number of entries to return. Minimum: 1. Maximum: 100. Default: 20.                                    |
| Skip         | integer         | No       | Number of entries to skip (pagination). Minimum: 0. Default: 0.                                                |

**Outputs**

| Field   | Type    | Description                                              |
| ------- | ------- | -------------------------------------------------------- |
| Entries | array   | Entries belonging to the specified content type.         |
| Count   | integer | Total number of entries available for this content type. |

#### Get Entry

Retrieve a single entry by UID.

**Inputs**

| Field        | Type            | Required | Description                                                                                  |
| ------------ | --------------- | -------- | -------------------------------------------------------------------------------------------- |
| Content Type | select (string) | Yes      | The UID of the content type the entry belongs to. Options load from the selected connection. |
| Entry UID    | select (string) | Yes      | The UID of the entry to retrieve. Options load from the selected connection.                 |
| Locale       | select (string) | No       | Locale code for the entry (optional). Options load from the selected connection. Default: .  |

**Outputs**

| Field     | Type   | Description                                           |
| --------- | ------ | ----------------------------------------------------- |
| Entry     | object | The entry object as returned by the ContentStack CMA. |
| Entry UID | string | The unique identifier of the entry.                   |

#### Create Entry

Create a new entry.

**Inputs**

| Field        | Type            | Required | Description                                                                                     |
| ------------ | --------------- | -------- | ----------------------------------------------------------------------------------------------- |
| Content Type | select (string) | Yes      | The UID of the content type to create the entry in. Options load from the selected connection.  |
| Entry Fields | object          | Yes      | JSON object with entry fields matching the content type schema.                                 |
| Locale       | select (string) | No       | Locale code for the new entry (optional). Options load from the selected connection. Default: . |

**Outputs**

| Field     | Type   | Description                                        |
| --------- | ------ | -------------------------------------------------- |
| Entry     | object | The entry as returned by the CMA after creation.   |
| Entry UID | string | The UID assigned by ContentStack to the new entry. |

#### Update Entry

Update an existing entry.

**Inputs**

| Field        | Type            | Required | Description                                                                                  |
| ------------ | --------------- | -------- | -------------------------------------------------------------------------------------------- |
| Content Type | select (string) | Yes      | The UID of the content type the entry belongs to. Options load from the selected connection. |
| Entry UID    | select (string) | Yes      | The UID of the entry to update. Options load from the selected connection.                   |
| Entry Fields | object          | Yes      | JSON object with the fields to update on the entry. Unchanged fields can be omitted.         |
| Locale       | select (string) | No       | Locale code to update. Options load from the selected connection. Default: .                 |

**Outputs**

| Field     | Type   | Description                                        |
| --------- | ------ | -------------------------------------------------- |
| Entry     | object | The entry as returned by the CMA after the update. |
| Entry UID | string | The UID of the updated entry.                      |

#### Delete Entry

Delete an entry.

**Inputs**

| Field        | Type            | Required | Description                                                                                                        |
| ------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
| Content Type | select (string) | Yes      | The UID of the content type the entry belongs to. Options load from the selected connection.                       |
| Entry UID    | select (string) | Yes      | The UID of the entry to delete. Options load from the selected connection.                                         |
| Locale       | select (string) | No       | Locale code to delete (deletes only that localized version). Options load from the selected connection. Default: . |

**Outputs**

| Field     | Type   | Description                                            |
| --------- | ------ | ------------------------------------------------------ |
| Entry UID | string | The UID of the deleted entry.                          |
| Notice    | string | Human-readable confirmation message from ContentStack. |

#### Upload Asset

Upload an asset from a public URL.

**Inputs**

| Field             | Type   | Required | Description                                                                                                   |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------- |
| File URL          | string | Yes      | Publicly accessible URL of the file to upload. The action fetches the bytes and streams them to ContentStack. |
| Filename          | string | No       | Filename to store the asset under (defaults to the URL's filename). Default: .                                |
| Title             | string | No       | Display title for the asset. Default: .                                                                       |
| Description       | string | No       | Description to attach to the asset. Default: .                                                                |
| Parent Folder UID | string | No       | Optional UID of a folder to upload into. Default: .                                                           |
| Tags              | array  | No       | List of tags to attach to the asset.                                                                          |

**Outputs**

| Field     | Type   | Description                             |
| --------- | ------ | --------------------------------------- |
| Asset     | object | Asset object as returned by the CMA.    |
| Asset UID | string | The UID assigned to the uploaded asset. |
| Asset URL | string | CDN URL of the uploaded asset.          |

#### Publish Entry

Publish an entry to one or more environments.

**Inputs**

| Field        | Type                      | Required | Description                                                                                             |
| ------------ | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------- |
| Content Type | select (string)           | Yes      | The UID of the content type the entry belongs to. Options load from the selected connection.            |
| Entry UID    | select (string)           | Yes      | The UID of the entry to publish. Options load from the selected connection.                             |
| Environments | multiple\_select (string) | Yes      | Environments to publish the entry to. Options load from the selected connection.                        |
| Locales      | multiple\_select (string) | No       | Locales to publish (defaults to the master locale if empty). Options load from the selected connection. |
| Scheduled At | string                    | No       | Optional ISO-8601 timestamp to schedule the publish for a future moment. Default: .                     |

**Outputs**

| Field     | Type   | Description                                                  |
| --------- | ------ | ------------------------------------------------------------ |
| Entry UID | string | UID of the entry that was submitted for publishing.          |
| Notice    | string | Human-readable confirmation from ContentStack.               |
| Job ID    | string | Bulk-publish job identifier (when ContentStack returns one). |

#### Unpublish Entry

Unpublish an entry from one or more environments.

**Inputs**

| Field        | Type                      | Required | Description                                                                                               |
| ------------ | ------------------------- | -------- | --------------------------------------------------------------------------------------------------------- |
| Content Type | select (string)           | Yes      | The UID of the content type the entry belongs to. Options load from the selected connection.              |
| Entry UID    | select (string)           | Yes      | The UID of the entry to unpublish. Options load from the selected connection.                             |
| Environments | multiple\_select (string) | Yes      | Environments to unpublish the entry from. Options load from the selected connection.                      |
| Locales      | multiple\_select (string) | No       | Locales to unpublish (defaults to the master locale if empty). Options load from the selected connection. |
| Scheduled At | string                    | No       | Optional ISO-8601 timestamp to schedule the unpublish. Default: .                                         |

**Outputs**

| Field     | Type   | Description                                    |
| --------- | ------ | ---------------------------------------------- |
| Entry UID | string | UID of the entry submitted for unpublishing.   |
| Notice    | string | Human-readable confirmation from ContentStack. |
| Job ID    | string | Bulk-unpublish job identifier, when returned.  |

#### List Environments

List publishing environments in the stack.

**Inputs**

No input fields are required in this catalog entry.

**Outputs**

| Field        | Type    | Description                                    |
| ------------ | ------- | ---------------------------------------------- |
| Environments | array   | Publishing environments declared in the stack. |
| Count        | integer | Number of environments returned.               |

#### List Locales

List locales configured on the stack.

**Inputs**

No input fields are required in this catalog entry.

**Outputs**

| Field   | Type    | Description                      |
| ------- | ------- | -------------------------------- |
| Locales | array   | Locales configured on the stack. |
| Count   | integer | Number of locales returned.      |

### Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/contentstack.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
