> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt

# Linking Knock as a source - Docs

Copy page

# Linking Knock as a source - Docs

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70)

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d)

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

`npx @posthog/wizard warehouse`

[Learn more](/wizard.md)

![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)

![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you

**Alpha release**

This source is currently in **alpha**. The interface and available tables may change.

The Knock connector syncs your notification data – messages, users, tenants, and workflow recipient runs – into PostHog, so you can analyze notification delivery and engagement alongside your product data.

## Prerequisites

You need a Knock account with access to the **secret API key** for the environment you want to import from. Knock API keys are scoped to a single environment (like development or production), so pick the key for the environment whose data you want.

## Adding a data source

1.  In PostHog, go to the [Sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section.
2.  Click **\+ New source** and click **Link** next to this source.
3.  Enter your credentials (see [Configuration](#configuration) below) and click **Next**.
4.  Select the tables you want to sync, choose a sync method and frequency, then click **Import**.

Once the syncs are complete, you can start querying this data in PostHog.

You need your Knock secret API key (it starts with `sk_`). Find it in the Knock dashboard under **Developers** → **API keys**. Public keys (`pk_`) only support client-side identification and won't work for syncing data.

## Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

-   **Webhook** (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
-   **Incremental** – only new or updated rows are synced on each run, using a cursor field (such as an `updated_at` timestamp). Cheaper than a full refresh, but deletes aren't captured.
-   **Append only** – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
-   **Full refresh** – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See [sync methods](/docs/cdp/sources.md#sync-methods) for a full explanation of how each mode works and how to choose between them.

The `messages` and `workflow_recipient_runs` tables support incremental sync on `inserted_at` using Knock's server-side date filters, so ongoing syncs only fetch new rows. Engagement fields that change on existing messages after delivery (like `read_at`, `seen_at`, and `interacted_at`) are only refreshed by a full refresh, so consider scheduling periodic full refreshes of `messages` if you rely on those fields.

The `users` and `tenants` tables don't have a server-side updated-since filter in Knock's API, so they always sync as a full refresh.

Knock also excludes messages outside your account's retention window from its API, so the `messages` table only backfills as far as your Knock retention allows.

## Configuration

| Option | Type | Required |
| --- | --- | --- |
| Secret API key | password | Yes |

## Supported tables

| Table | Description | Sync method | Incremental field | Primary key |
| --- | --- | --- | --- | --- |
| messages | A notification delivered (or attempted) to a single recipient on a specific channel, with delivery and engagement status. | Incremental, Full refresh | inserted_at | — |
| users | A recipient identified to Knock, with the profile properties used to notify them. | Full refresh | — | — |
| tenants | A tenant used to scope notifications, preferences, and branding to a group of users (typically one of your customers). | Full refresh | — | — |
| workflow_recipient_runs | An individual execution of a workflow for a specific recipient, with its trigger source and status. | Incremental, Full refresh | inserted_at | — |

## Troubleshooting

If the source fails to connect or a sync stops with an authorization error, your secret API key is likely invalid or revoked – generate a new key in the Knock dashboard under **Developers** → **API keys** and update the source credentials. If a table is unexpectedly empty, check that you connected the key for the right Knock environment, since each key only sees its own environment's data.

If your sync is failing or data looks wrong, see the [Data warehouse troubleshooting guide](/docs/data-warehouse/troubleshooting.md). If that doesn't help, [contact support](https://us.posthog.com/#panel=support%3Asupport%3Adata_warehouse%3A%3Atrue) – we're happy to help.

### Was this page useful?

HelpfulCould be better