Knock
Sync users and objects, and trigger workflows, through Knock — notification infrastructure that sends in-app, email, push, SMS and chat messages from workflows you build in Knock. Zeotap keeps Knock users up to date with your data, and a realtime sync can put people into a Knock dynamic audience within seconds of joining one of yours.
Prerequisites
- A Knock account, and the environment (development or production) you want Zeotap to write to
- That environment’s secret API key (it starts with
sk_)
Authentication
Knock uses API Key authentication. The key is sent in an Authorization: Bearer <key> header on every request.
- Sign in to the Knock dashboard .
- Switch to the environment you want to write to, and open Platform → API keys in the sidebar.
- Copy the Secret API key.
- Paste it into the API Key field in Zeotap.
Each Knock environment has its own keys, so the key decides which environment receives your data.
Target Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Object Type | Select | Yes | What to sync to Knock: Users (default), Objects or Trigger Workflow. |
| Collection | Text | Conditional | The object collection to sync to (for example projects). Required for Objects. |
| Workflow Key | Text | Conditional | The key of the Knock workflow to trigger for each row. Required for Trigger Workflow. |
Required Mapping Fields
| Field | Description |
|---|---|
| id | The user or object ID in Knock. |
How It Works
Users
Each row identifies a Knock user at PUT /v1/users/{id}. Knock merges the fields you send into the user, so properties you do not send are kept. An audience Remove, and the removed half of Mirror, delete the user from Knock.
Objects
Each row identifies an object at PUT /v1/objects/{collection}/{id}. A Remove deletes the object.
Trigger Workflow
Each row triggers the workflow named by Workflow Key with the row’s id as the recipient, an optional actor_id as the actor, and the other mapped fields as the workflow’s data.
Realtime syncs
A Knock destination can also receive a realtime sync from a realtime audience: one person at a time, within seconds of the event that changed their answer, rather than a list on a schedule. The same destination and API key serve both.
Knock’s dynamic audiences are rules over user properties that Knock keeps up to date as the properties change, so a realtime sync identifies the user and sets one property you name to true when the person joins and to false when they leave. The property’s name cannot contain a dot, which Knock reads as a nested property path. Build a dynamic audience in Knock on that property being true, and use its membership to start or stop your workflows. The person is matched by their Knock user ID, which is the audience’s destination key; Knock recommends a stable ID from your own system rather than an email address or phone number. Leaving changes only that property and never deletes the user, whatever a scheduled sync to the same destination does on remove.
A leave can create a user. Knock creates a user it has not seen and has no way to update only users it knows, so a leave for someone Knock has never seen creates a user holding only the property set to false. That user is in no audience built on the property being true. Realtime syncs share Knock’s rate limit for identifying users with your scheduled syncs and anything else writing to the same Knock environment. Settings and the full behaviour are under Realtime Syncs → Knock.
Troubleshooting
Authentication failed: invalid API key
Check that you pasted the secret key (starting with sk_), not the public key, and that it belongs to the environment you mean to write to.