> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contentstack

> Contentstack is a modern, headless CMS built for teams that want to ship content faster everywhere. Plug in any front-end and use real-time collaboration and workflow automation to keep content fresh and consistent across all platforms.

## Supported syncing

| Type | Description | Supported Sync Modes | API Reference |
| - | - | - | - |
| **Users** | Sync data from any source to Contentstack users | Update | [Users docs](https://docs.lytics.com/reference/put_attributes-table-key-value) |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

## Connect to Contentstack

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **Contentstack** and click **Continue**. You can then authenticate Hightouch to **Contentstack** using a Data Activation Layer (DAL) access token.

### Create a Data Activation Layer access token

1. From your Contentstack account, create a new Data Activation Layer (DAL).
2. Access your DAL through **Data and Insights**, and under **Account** and **Access Tokens**, create a new access token. For token roles, select **Data Manager** under **Custom Roles** and generate your token.

> [!NOTE]
>
> If you set an expiration for your access token, ensure that your access token has not expired if you notice syncs failing due to authorization issues.

## Sync configuration

Once you've set up your Contentstack destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and the Contentstack destination you want to sync to.

### Syncing users

Sync data from any source to Contentstack users.

#### Record matching

To match rows from your model to users in Contentstack, you need to select a model column and corresponding Contentstack field. You can match on any of the following Contentstack fields:

* **External ID**
* **Email**
* **Hashed email**

Refer to the [record matching docs](https://docs.hightouch.com/syncs/record-matching.md) for more information.

#### Field mapping

Hightouch lets you sync user attributes via [field mapping](https://docs.hightouch.com/syncs/mapping-data.md).
You can map data from any of your model columns to default and custom attributes that are defined in Contentstack.
Ensure your model's columns have the same data types as the fields you want to sync to.

## Adding users to audiences

Contentstack allows you to pass a list of audience IDs to **External Audiences** for users to add them to audiences. The user will be added to every audience that is included in the list passed in. The unique IDs of audiences can be found under **Personalize** > Select a personalize project > **Audiences**.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).
