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

# Courier

> Power product notifications with your warehouse data in Courier

## Supported sync methods

Hightouch can sync data to Courier Profiles and List Subscriptions

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-sync-objects.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=ef6d66db5b9a7e397ba33293dfc4f11c)

### Courier profiles

#### Sync modes

Hightouch supports Upsert and Update sync modes:

* In the Upsert mode, new rows will be inserted into Courier and Profile attributes will be kept up-to-date within Courier
* In the Update mode, Profile attributes will be kept up-to-date within Courier.

#### Record matching

Database records can be matched from your source to your Courier workspace by a unique property. Profiles can be matched by a `Recipient ID`.

#### Field mapping

You can sync columns from your source to Courier's Profile default and custom fields.

#### Delete mode

You can choose what Hightouch's behavior is when records leave the query result set. The default is doing nothing, but you can also set Hightouch to delete or clear the Courier profile on record exit.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-delete-mode.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=ef60952165cca6000c454f2a3d10322d)

### Creating a new list

In your sync configuration, you can tell Hightouch to create a new Courier list for you.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-create-list.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=f2daf39e50e15194a9b538a0c8c4b077)

You can optionally assign a custom name to your list. If no name is provided, Hightouch will default to using your model name.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-create-list-name.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=3fa911bebf65422e9aae801244ec760b)

### Syncing to existing lists

Instead of creating a new list, Hightouch can also sync recipients to existing lists that are already populated in your Courier workspace.

Suppose you want to sync to multiple existing lists but do not want to create a new sync for every list. As long as your model has a `list_id` column associated to a row, Hightouch can sync to multiple Courier lists in just one sync.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-multiple-existing-list.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=ac65e411868ec76de0c140976a0bc9bd)

## Connect to Courier

If you're new to Hightouch, be sure to [sign up for a free account](https://app.hightouch.com/signup?from=docs). Your first destination is free, and Courier is a great way to get started.

Before diving into this tutorial, we also recommend reading [this article on our core concepts](https://docs.hightouch.com/getting-started/concepts.md). It's a quick overview of how Hightouch works.

### Connect to Courier

#### Create an API token

1. Log in to Courier
2. Visit your **Settings** page
3. Click on the **API Keys** tab
4. If you already have an API key set up, copy the **Published** token, otherwise click **Generate New API Key**

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-apikeys.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=c7f128f9fe9fc0c0e209cd2d3efa2538)

#### Add Courier as a destination in Hightouch

1. Log in to Hightouch or create a free Hightouch account
2. Click on **Destinations** in the left sidebar
3. Click on **Add destination** in the top right corner
4. Select **Courier** in the destination catalog and click **Continue** to proceed
5. Paste your API token into the **API Key** field and click **Continue** to proceed
6. Give your destination a name and unique slug (for example, “Courier Production” and `courier-production`)
7. Click **Finish** to create your Courier destination.

Now that we've linked Hightouch to your Courier account, it's time to connect to build profiles and list subscriptions using the data that resides in your data warehouse.

### Connect to your data source

Hightouch sits on top of your data warehouse and can read from Snowflake, Redshift, BigQuery, Databricks, Postgres, MySQL, and many other data sources. You can even fetch data from Google Sheets and Airtable. Hightouch can help activate your data wherever it resides.

We've written dedicated guides for each supported data source. Take your pick:

* Connect to [Airtable](https://docs.hightouch.com/sources/airtable)
* Connect to [Amazon Athena](https://docs.hightouch.com/sources/amazon-athena.md)
* Connect to [Amazon Redshift](https://docs.hightouch.com/sources/amazon-redshift.md)
* Connect to [ClickHouse](https://docs.hightouch.com/sources/clickhouse.md)
* Connect to [Databricks](https://docs.hightouch.com/sources/databricks.md)
* Connect to [Elasticsearch](https://docs.hightouch.com/sources/elasticsearch)
* Connect to [Firebolt](https://docs.hightouch.com/sources/firebolt)
* Connect to [Google BigQuery](https://docs.hightouch.com/sources/google-bigquery.md)
* Connect to [Google Sheets](https://docs.hightouch.com/sources/google-sheets.md)
* Connect to [Looker](https://docs.hightouch.com/sources/looker)
* Connect to [Metabase](https://docs.hightouch.com/sources/metabase)
* Connect to [MySQL](https://docs.hightouch.com/sources/mysql.md)
* Connect to [PostgreSQL](https://docs.hightouch.com/sources/postgresql.md)
* Connect to [Rockset](https://docs.hightouch.com/sources/rockset)
* Connect to [SFTP](https://docs.hightouch.com/sources/sftp.md)
* Connect to [Snowflake](https://docs.hightouch.com/sources/snowflake.md)
* Connect to [SQL Server](https://docs.hightouch.com/sources/sqlserver.md)
* Connect to [Trino](https://docs.hightouch.com/sources/trino.md)

> [!NOTE]
>
> If you're missing the credentials necessary to connect to your data source,
> try inviting your teammates to Hightouch. You can have unlimited collaborators
> in your workspace.

#### Connect to a sample database instead

Waiting for credentials to your data warehouse? No problem. You can connect to one of our [sample datasets](https://docs.hightouch.com/sources/sample-data.md) to get started right away. For the rest of this tutorial, we'll use the **B2B SaaS** sample source, which contains a `users` table with names, emails, locations, and other user attributes. This sample source is available when you log in for the first time—no setup required.

Next, we'll write a SQL query to define which profiles and list subscriptions should be synced to Courier.

### Create a model

In Hightouch, a model represents a query that filters or transforms the records in your data source. Models are used to determine exactly which records to sync between sources and destinations.

When you connect to a data warehouse, your models will probably be written in SQL. You can also import models from tools like dbt and Looker.

In this example, we'll keep it simple. Suppose you want to use Courier to send notifications only for your customers located in the city of Nashville. To accomplish this, you'll want to create a model that looks like this:

```sql theme={null}
SELECT * FROM users WHERE location = 'Nashville';
```

1. Click on **Models** in the left sidebar
2. Click on **Add model** in the top right corner
3. Select **Demo Database** as your source and click **Continue** to proceed
4. Select **SQL Editor** as your modeling method
5. Paste the SQL query from above into the editor on the left side of the page
6. Click **Preview** to execute the query
7. Click **Continue** to proceed
8. Give your model a name and unique slug (for example, "Users in Nashville" and `users-in-nashville`)
9. Select **ID** as the primary key for your model
10. Click **Finish** to create your model.

We just created a model using a SQL query that filters our `users` table down to only those located in Nashville. Next, we'll configure our sync to add these users to Courier.

### Create a sync to Courier Profiles

1. Click on **Syncs** in the left sidebar
2. Click on **Add sync** in the top right corner
3. Select **Users in Nashville** as your model and click **Continue** to proceed
4. Select **Courier Production** as your destination and click **Continue** to proceed
5. Select **Profile** as the object you wish to update in Courier
6. Select which update mode you want to use
7. Identify which field from your model represents the identifier known to Courier
8. Identify which fields from your model you want to sync to a Courier Profile
9. Select how you want to handle records leaving your source
10. Give a name to your segment (for example, "My beta test")
11. Click **Continue** to proceed to the last step
12. Select **Interval** to tell your sync to run on a set interval
13. Configure your sync schedule to run every **5 minutes**
14. Click **Finish** to create your sync.

Your Courier sync configuration would look something like this.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-profiles-sync-config.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=8e9b034c62db7156be349020aa8bf5fa)

And your sync schedule configuration would resemble this.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-launchdarkly-create-sync-schedule-config.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=b5a562f06a5c0fab821d5f685f5723dd)

### Create a sync to Courier Lists

1. Click on **Syncs** in the left sidebar
2. Click on **Add sync** in the top right corner
3. Select **Users in Nashville** as your model and click **Continue** to proceed
4. Select **Courier Production** as your destination and click **Continue** to proceed
5. Identify which field from your model represents the identifier known to Courier
6. Select Create a new segment
7. Give a name to your segment (for example, "My beta test")
8. Click Continue to proceed to the last step
9. Select Interval to tell your sync to run on a set interval
10. Configure your sync schedule to run every 5 minutes
11. Click Finish to create your sync.

Your Courier sync configuration would look something like this.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-lists-sync-config.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=c707b28e51dd478379891600e07f03fc)

And your sync schedule configuration would resemble this.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-launchdarkly-create-sync-schedule-config.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=b5a562f06a5c0fab821d5f685f5723dd)

## 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).

## Common errors

### Don't see your data in Courier?

Make sure you've configured your destination to use the correct Courier environment API key. There may be quite a few so you might've accidentally copied the wrong one. If that doesn't solve your issue, [please reach out](#pylon-chat). We're happy to help.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-courier-troubleshoot-apikeys.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=8536b09534b35c858a5721f2cb78b040)
