The Knock connector lets your AI agent act in each user's Knock account. Each user connects their own Knock access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 54 tools.
- Tools
- 54
- What they doRead · write · destructive
- 26 · 19 · 926 read19 write9 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Knock connection
In AgentKit > Connections, create a Knock connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'knock'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Knock:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'knock_messages_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "knock"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Knock:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="knock_messages_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Knock credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolknock_audience_members_listReturn a paginated list of members for the specified audience.Read-onlyList Audience Members
Return a paginated list of members for the specified audience. Returns entries, an array of items with __typename, added_at, tenant, user, user_id, plus page_info.
Inputs
keystringrequired- The key of the audience. Example: new-comment
knock_bulk_operation_getRetrieve a bulk operation (if it exists) and displays the current state of it.Read-onlyGet bulk operation
Retrieve a bulk operation (if it exists) and displays the current state of it. Returns an object with __typename, completed_at, error_count, error_items, estimated_total_rows, failed_at, id, inserted_at, name, processed_rows, progress_path, started_at and more.
Inputs
idstringrequired- The ID of the bulk operation to retrieve. Example: 3b6b2e4c-1d2a-4f5e-8a9b-0c1d2e3f4a5b
knock_message_activities_listReturn a paginated list of activities for the specified message.Read-onlyList Message Activities
Return a paginated list of activities for the specified message. Returns items, an array of items with __typename, actor, data, id, inserted_at, recipient, updated_at, plus page_info. Needs message_id from knock_messages_list.
Inputs
message_idstringrequired- The ID of the message to fetch activities for. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
trigger_datastring- The trigger data to filter activities by. Example: {"order_id": "A-1001"}
knock_message_content_getReturn the fully rendered contents of a message, where the response depends on which channel the message was sent through.Read-onlyGet message content
Return the fully rendered contents of a message, where the response depends on which channel the message was sent through. Returns an object with __typename, data, inserted_at, message_id. Needs message_id from knock_messages_list.
Inputs
message_idstringrequired- The ID of the message to fetch contents of. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
knock_message_delivery_logs_listReturn a paginated list of delivery logs for the specified message.Read-onlyList Message Delivery Logs
Return a paginated list of delivery logs for the specified message. Returns items, an array of items with __typename, environment_id, id, inserted_at, request, response, service_name, plus page_info. Needs message_id from knock_messages_list.
Inputs
message_idstringrequired- The ID of the message to fetch delivery logs for. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
knock_message_events_listReturn a paginated list of events for the specified message.Read-onlyList Message Events
Return a paginated list of events for the specified message. Returns items, an array of items with __typename, data, id, inserted_at, recipient, type, plus page_info. Needs message_id from knock_messages_list.
Inputs
message_idstringrequired- The ID of the message to fetch events for. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
knock_message_getRetrieve a specific message by its ID.Read-onlyGet message
Retrieve a specific message by its ID. Returns an object with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, interacted_at, link_clicked_at and more. Use this when you have the ID. Use knock_messages_list to find one. Needs message_id from knock_messages_list.
Inputs
message_idstringrequired- The unique identifier for the message. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
knock_messages_listReturn a paginated list of messages for the current environment.Read-onlyList messages
Return a paginated list of messages for the current environment. Returns items, an array of items with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, plus page_info. Use this to browse. Use knock_message_get when you already have the ID.
Inputs
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
channel_idstring- Limits the results to items with the corresponding channel ID. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
engagement_statusarray- Limits the results to messages with the given engagement status. Example: ["unread"]
inserted_at_gtstring- Limits the results to items inserted after the given date. Example: 2025-01-01T00:00:00Z
inserted_at_gtestring- Limits the results to items inserted after or on the given date. Example: 2025-01-01T00:00:00Z
inserted_at_ltstring- Limits the results to items inserted before the given date. Example: 2025-01-01T00:00:00Z
inserted_at_ltestring- Limits the results to items inserted before or on the given date. Example: 2025-01-01T00:00:00Z
message_idsarray- Limits the results to only the message IDs given (max 50). Note: when using this option, the results will be subject to any other filters applied to the query. Example: ["1jNaXzB2RZX3LY8wVQnfCKyPnv7"]
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
sourcestring- Limits the results to messages triggered by the given workflow key. Example: comment-created
statusarray- Limits the results to messages with the given delivery status. Example: ["delivered"]
tenantstring- Limits the results to items with the corresponding tenant. Example: acme-corp
trigger_datastring- Limits the results to only messages that were generated with the given data. See trigger data filtering for more information. Example: {"order_id": "A-1001"}
workflow_categoriesarray- Limits the results to messages related to any of the provided categories. Example: ["workflow_123"]
workflow_recipient_run_idstring- Limits the results to messages for a specific recipient's workflow run. Example: 123e4567-e89b-12d3-a456-426614174000
workflow_run_idstring- Limits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request. Example: 123e4567-e89b-12d3-a456-426614174000
knock_object_channel_data_getReturn the channel data for the specified object and channel.Read-onlyGet Object Channel Data
Return the channel data for the specified object and channel. Returns an object with __typename, channel_id, data, provider. Needs object_id from knock_objects_list.
Inputs
channel_idstringrequired- The unique identifier for the channel. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
collectionstringrequired- The collection this object belongs to. Example: projects
object_idstringrequired- Unique identifier for the object. Example: project-123
knock_object_getRetrieve a specific object by its ID from the specified collection.Read-onlyGet an object
Retrieve a specific object by its ID from the specified collection. Returns an object with __typename, collection, created_at, id, properties, updated_at. Use this when you have the ID. Use knock_objects_list to find one. Needs id from knock_objects_list.
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
idstringrequired- Unique identifier for the object. Example: project-123
knock_object_messages_listReturn a paginated list of messages for a specific object in the given collection.Read-onlyList Object Messages
Return a paginated list of messages for a specific object in the given collection. Returns items, an array of items with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, plus page_info. Needs id from knock_objects_list.
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
idstringrequired- Unique identifier for the object. Example: project-123
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
channel_idstring- Limits the results to items with the corresponding channel ID. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
engagement_statusarray- Limits the results to messages with the given engagement status. Example: ["unread"]
inserted_at_gtstring- Limits the results to items inserted after the given date. Example: 2025-01-01T00:00:00Z
inserted_at_gtestring- Limits the results to items inserted after or on the given date. Example: 2025-01-01T00:00:00Z
inserted_at_ltstring- Limits the results to items inserted before the given date. Example: 2025-01-01T00:00:00Z
inserted_at_ltestring- Limits the results to items inserted before or on the given date. Example: 2025-01-01T00:00:00Z
message_idsarray- Limits the results to only the message IDs given (max 50). Note: when using this option, the results will be subject to any other filters applied to the query. Example: ["1jNaXzB2RZX3LY8wVQnfCKyPnv7"]
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
sourcestring- Limits the results to messages triggered by the given workflow key. Example: comment-created
statusarray- Limits the results to messages with the given delivery status. Example: ["delivered"]
tenantstring- Limits the results to items with the corresponding tenant. Example: acme-corp
trigger_datastring- Limits the results to only messages that were generated with the given data. See trigger data filtering for more information. Example: {"order_id": "A-1001"}
workflow_categoriesarray- Limits the results to messages related to any of the provided categories. Example: ["workflow_123"]
workflow_recipient_run_idstring- Limits the results to messages for a specific recipient's workflow run. Example: 123e4567-e89b-12d3-a456-426614174000
workflow_run_idstring- Limits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request. Example: 123e4567-e89b-12d3-a456-426614174000
knock_object_subscriptions_listList subscriptions for an object.Read-onlyList subscriptions
List subscriptions for an object. Either list the recipients that subscribe to the provided object, or list the objects that the provided object is subscribed to. Returns entries, an array of items with __typename, inserted_at, object, properties, recipient, updated_at, plus page_info. Needs object_id from knock_objects_list.
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
object_idstringrequired- Unique identifier for the object. Example: project-123
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
includearray- Additional fields to include in the response. Example: ["preferences"]
modestring- Mode of the request. `recipient` to list the objects that the provided object is subscribed to, `object` to list the recipients that subscribe to the provided object. Example: objectone of
recipientobject page_sizeinteger- The number of items per page (defaults to 50). Example: 10
knock_objects_listReturn a paginated list of objects from the specified collection.Read-onlyList objects in a collection
Return a paginated list of objects from the specified collection. Returns entries, an array of items with __typename, collection, created_at, id, properties, updated_at, plus page_info.
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
includearray- Includes preferences of the objects in the response. Example: ["preferences"]
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
knock_schedules_listReturn a paginated list of schedules for the current environment, filtered by workflow and optionally by recipients and tenant.Read-onlyList schedules
Return a paginated list of schedules for the current environment, filtered by workflow and optionally by recipients and tenant. Returns entries, an array of items with __typename, actor, data, id, inserted_at, last_occurrence_at, next_occurrence_at, recipient, repeats, tenant, plus page_info.
Inputs
workflowstringrequired- Filter by workflow key. Example: new-comment
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
recipients__array- Filter by recipient references. Example: ["user_123"]
tenantstring- Filter by tenant ID. Example: acme-corp
knock_tenant_getGet a tenant by ID.Read-onlyGet a tenant
Get a tenant by ID. Returns an object with __typename, id, name, settings. Use this when you have the ID. Use knock_tenants_list to find one. Needs id from knock_tenants_list.
Inputs
idstringrequired- The unique identifier for the tenant. Example: acme-corp
resolve_full_preference_settingsboolean- When true, merges environment-level default preferences into the tenant's `settings.preference_set` field before returning the response. Defaults to false. Example: false
knock_tenants_listList tenants for the current environment.Read-onlyList tenants
List tenants for the current environment. Returns entries, an array of items with __typename, id, name, settings, plus page_info. Use this to browse. Use knock_tenant_get when you already have the ID.
Inputs
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
namestring- Filter tenants by name. Example: Scalekit test
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
tenant_idstring- Filter tenants by ID. Example: user-123
knock_user_channel_data_getRetrieve the channel data for a specific user and channel ID.Read-onlyGet User Channel Data
Retrieve the channel data for a specific user and channel ID. Returns an object with __typename, channel_id, data, provider. Needs user_id from knock_users_list.
Inputs
channel_idstringrequired- The unique identifier for the channel. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
user_idstringrequired- The unique identifier of the user. Example: user-123
knock_user_getRetrieve a specific user by their ID.Read-onlyGet user
Retrieve a specific user by their ID. Returns an object with __typename, avatar, created_at, email, id, name, phone_number, timezone, updated_at. Use this when you have the ID. Use knock_users_list to find one. Needs user_id from knock_users_list.
Inputs
user_idstringrequired- The ID of the user to retrieve. Example: user-123
knock_user_messages_listReturn a paginated list of messages for a specific user.Read-onlyList User Messages
Return a paginated list of messages for a specific user. Returns items, an array of items with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, plus page_info. Needs user_id from knock_users_list.
Inputs
user_idstringrequired- The user ID to list messages for. Example: user-123
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
channel_idstring- Limits the results to items with the corresponding channel ID. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
engagement_statusarray- Limits the results to messages with the given engagement status. Example: ["unread"]
inserted_at_gtstring- Limits the results to items inserted after the given date. Example: 2025-01-01T00:00:00Z
inserted_at_gtestring- Limits the results to items inserted after or on the given date. Example: 2025-01-01T00:00:00Z
inserted_at_ltstring- Limits the results to items inserted before the given date. Example: 2025-01-01T00:00:00Z
inserted_at_ltestring- Limits the results to items inserted before or on the given date. Example: 2025-01-01T00:00:00Z
message_idsarray- Limits the results to only the message IDs given (max 50). Note: when using this option, the results will be subject to any other filters applied to the query. Example: ["1jNaXzB2RZX3LY8wVQnfCKyPnv7"]
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
sourcestring- Limits the results to messages triggered by the given workflow key. Example: comment-created
statusarray- Limits the results to messages with the given delivery status. Example: ["delivered"]
tenantstring- Limits the results to items with the corresponding tenant. Example: acme-corp
trigger_datastring- Limits the results to only messages that were generated with the given data. See trigger data filtering for more information. Example: {"order_id": "A-1001"}
workflow_categoriesarray- Limits the results to messages related to any of the provided categories. Example: ["workflow_123"]
workflow_recipient_run_idstring- Limits the results to messages for a specific recipient's workflow run. Example: 123e4567-e89b-12d3-a456-426614174000
workflow_run_idstring- Limits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request. Example: 123e4567-e89b-12d3-a456-426614174000
knock_user_preference_set_getRetrieve a specific preference set for a user identified by the preference set ID.Read-onlyGet user preference set
Retrieve a specific preference set for a user identified by the preference set ID. Returns an object with categories, channel_types, channels, commercial_subscribed, id, workflows. Use this when you have the ID. Use knock_user_preference_sets_list to find one. Needs user_id from knock_users_list; id from knock_user_preference_sets_list.
Inputs
idstringrequired- Unique identifier for the preference set. Example: default
user_idstringrequired- The unique identifier of the user. Example: user-123
tenantstring- The unique identifier for the tenant. Example: acme-corp
knock_user_preference_sets_listRetrieve a list of all preference sets for a specific user.Read-onlyList user preference sets
Retrieve a list of all preference sets for a specific user. Returns an array of items with categories, channel_types, channels, commercial_subscribed, id, workflows. Use this to browse. Use knock_user_preference_set_get when you already have the ID. Needs user_id from knock_users_list.
Inputs
user_idstringrequired- The unique identifier of the user. Example: user-123
knock_user_schedules_listReturn a paginated list of schedules for a specific user, in descending order.Read-onlyList user schedules
Return a paginated list of schedules for a specific user, in descending order. Returns entries, an array of items with __typename, actor, data, id, inserted_at, last_occurrence_at, next_occurrence_at, recipient, repeats, tenant, plus page_info. Needs user_id from knock_users_list.
Inputs
user_idstringrequired- The user ID to list schedules for. Example: user-123
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
tenantstring- The tenant ID to filter schedules for. Example: acme-corp
workflowstring- The workflow key to filter schedules for. Example: new-comment
knock_user_subscriptions_listRetrieve a paginated list of subscriptions for a specific user, in descending order.Read-onlyList user subscriptions
Retrieve a paginated list of subscriptions for a specific user, in descending order. Returns entries, an array of items with __typename, inserted_at, object, properties, recipient, updated_at, plus page_info. Needs user_id from knock_users_list.
Inputs
user_idstringrequired- The user ID to list subscriptions for. Example: user-123
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
includearray- Associated resources to include in the response. Example: ["preferences"]
objects__array- Only returns subscriptions for the specified object references. Example: ["user_123"]
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
knock_users_listRetrieve a paginated list of users in the environment.Read-onlyList users
Retrieve a paginated list of users in the environment. Returns entries, an array of items with __typename, avatar, created_at, email, id, name, phone_number, timezone, updated_at, plus page_info. Use this to browse. Use knock_user_get when you already have the ID.
Inputs
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
includearray- Associated resources to include in the response. Example: ["preferences"]
orderstring- Sort by insertion order. Pass `asc` for oldest first, or `desc` for newest first. Defaults to oldest first when omitted. Example: ascone of
ascdesc page_sizeinteger- The number of items per page (defaults to 50). Example: 10
knock_workflow_run_getReturn a single workflow recipient run with its associated events.Read-onlyGet Workflow Recipient Run
Return a single workflow recipient run with its associated events. Returns an object with __typename, actor, error_count, id, inserted_at, recipient, status, tenant, trigger_source, updated_at, workflow, workflow_run_id and more. Use this when you have the ID. Use knock_workflow_runs_list to find one. Needs id from knock_workflow_runs_list.
Inputs
idstringrequired- The unique identifier for the workflow recipient run (per-recipient). Example: 2Gm6S9mNOg9YIrd7NhbTmIqE7Qw
knock_workflow_runs_listReturn a paginated list of workflow recipient runs for the current environment.Read-onlyList Workflow Recipient Runs
Return a paginated list of workflow recipient runs for the current environment. Returns items, an array of items with __typename, actor, error_count, id, inserted_at, recipient, status, tenant, trigger_source, updated_at, plus page_info. Use this to browse. Use knock_workflow_run_get when you already have the ID.
Inputs
afterstring- The cursor to fetch entries after. Example: eyJpZCI6IjEyMyJ9
beforestring- The cursor to fetch entries before. Example: eyJpZCI6IjEyMyJ9
ending_atstring- Limits the results to workflow recipient runs started before the given date. Example: 2025-01-01T00:00:00Z
has_errorsboolean- Limits the results to workflow recipient runs that have errors. Example: false
page_sizeinteger- The number of items per page (defaults to 50). Example: 10
recipientobject- Limits the results to workflow recipient runs for the given recipient. Accepts a user ID string or an object reference with `id` and `collection`. Example: user_123
starting_atstring- Limits the results to workflow recipient runs started after the given date. Example: 2025-01-01T00:00:00Z
statusarray- Limits the results to workflow recipient runs with the given status. Example: ["queued"]
tenantstring- Limits the results to workflow recipient runs for the given tenant. Example: acme-corp
workflowstring- Limits the results to workflow recipient runs for the given workflow key. Example: new-comment
knock_audience_members_addAdd one or more members to the specified audience.WriteAdd Audience Members
Add one or more members to the specified audience. Returns an empty response on success (HTTP 204).
Inputs
keystringrequired- The key of the audience. Example: new-comment
membersarrayrequired- A list of audience members to add. You can add up to 1,000 members per request. Example: [{"tenant": "ingen_isla_nublar", "user": {"email": "ellie@ingen.net", "id": "dr_sattler", "name": "Dr. Ellie Sattler"}}]
create_audienceboolean- Create the audience if it does not exist. Example: false
knock_message_archiveArchive a message for the user.WriteArchive message
Archive a message for the user. Archived messages are hidden from the default message list in the feed but can still be accessed and unarchived later. Returns an object with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, interacted_at, link_clicked_at and more. The request replaces the stored value with what you send. Needs message_id from knock_messages_list.
- Idempotent
Inputs
message_idstringrequired- The unique identifier for the message. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
knock_message_mark_interactedMark a message as `interacted` with by the user.WriteMark message as interacted
Mark a message as `interacted` with by the user. This can include any user action on the message, with optional metadata about the specific interaction. Returns an object with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, interacted_at, link_clicked_at and more. The request replaces the stored value with what you send. Needs message_id from knock_messages_list.
- Idempotent
Inputs
message_idstringrequired- The unique identifier for the message. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
metadataobject- Metadata about the interaction. Example: {"action": "clicked_cta"}
knock_message_mark_readMark a message as `read`.WriteMark message as read
Mark a message as `read`. This indicates that the user has read the message content. Returns an object with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, interacted_at, link_clicked_at and more. The request replaces the stored value with what you send. Needs message_id from knock_messages_list.
- Idempotent
Inputs
message_idstringrequired- The unique identifier for the message. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
knock_message_mark_seenMark a message as `seen`.WriteMark message as seen
Mark a message as `seen`. This indicates that the user has viewed the message in their feed or inbox. Returns an object with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, interacted_at, link_clicked_at and more. The request replaces the stored value with what you send. Needs message_id from knock_messages_list.
- Idempotent
Inputs
message_idstringrequired- The unique identifier for the message. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
knock_message_unarchiveRemove a message from the archived state, making it visible in the default message list in the feed again.WriteUnarchive Message
Remove a message from the archived state, making it visible in the default message list in the feed again. Returns an object with __typename, actors, archived_at, channel, channel_id, clicked_at, data, engagement_statuses, id, inserted_at, interacted_at, link_clicked_at and more. Needs message_id from knock_messages_list.
- Idempotent
Inputs
message_idstringrequired- The unique identifier for the message. Example: 1jNaXzB2RZX3LY8wVQnfCKyPnv7
knock_object_channel_data_setSet the channel data for the specified object and channel.WriteSet Object Channel Data
Set the channel data for the specified object and channel. Returns an object with __typename, channel_id, data, provider. Needs object_id from knock_objects_list.
- Idempotent
Inputs
channel_idstringrequired- The unique identifier for the channel. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
collectionstringrequired- The collection this object belongs to. Example: projects
dataobjectrequired- Channel data for a given channel type. Example: {"tokens": ["fcm-token-abc123"]}
object_idstringrequired- Unique identifier for the object. Example: project-123
knock_object_setCreate an object or update an existing one in a collection (an upsert).WriteSet Object
Create an object or update an existing one in a collection (an upsert). Returns an object with __typename, collection, created_at, id, properties, updated_at. Needs id from knock_objects_list.
- Idempotent
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
idstringrequired- Unique identifier for the object. Example: project-123
channel_dataobject- A request to set channel data for a type of channel inline. Example: {"97c5837d-c65c-4d54-aa39-080eeb81c69d": {"tokens": ["push_token_123"]}}
localestring- The locale of the object. Used for message localization. Example: en-US
namestring- An optional name for the object. Example: My product
preferencesobject- Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them. Example: {"default": {"channel_types": {"email": true}, "workflows": {"dinosaurs-loose": {"channel_types": {"email": true}}}}}
timezonestring- The timezone of the object. Must be a valid tz database time zone string. Used for recurring schedules. Example: America/New_York
knock_object_subscriptions_addAdd subscriptions for an object.WriteAdd subscriptions
Add subscriptions for an object. If a subscription already exists, it will be updated. Returns an array of items with __typename, inserted_at, object, properties, recipient, updated_at. Needs object_id from knock_objects_list.
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
object_idstringrequired- Unique identifier for the object. Example: project-123
recipientsarrayrequired- The recipients of the subscription. You can subscribe up to 100 recipients to an object at a time. Example: ["user_1", "user_2"]
propertiesobject- The custom properties associated with the subscription relationship. Example: {"role": "owner"}
knock_objects_bulk_setBulk sets up to 1,000 objects at a time in the specified collection.WriteBulk Set Objects
Bulk sets up to 1,000 objects at a time in the specified collection. Returns an object with __typename, completed_at, error_count, error_items, estimated_total_rows, failed_at, id, inserted_at, name, processed_rows, progress_path, started_at and more.
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
objectsarrayrequired- A list of objects. Example: [{"id": "project_1", "name": "My project"}]
knock_schedules_createCreate one or more schedules for a workflow with the specified recipients, timing, and data.WriteCreate Schedules
Create one or more schedules for a workflow with the specified recipients, timing, and data. Returns an array of items with __typename, actor, data, id, inserted_at, last_occurrence_at, next_occurrence_at, recipient, repeats, tenant.
Inputs
recipientsarrayrequired- The recipients to set the schedule for. Limited to 100 recipients per request. Example: ["user_123"]
workflowstringrequired- The key of the workflow. Example: new-comment
actorobject- A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. Example: {"id": "user_1"}
dataobject- An optional map of data to pass into the workflow execution. There is a 10MB limit on the size of the full `data` payload. Any individual string value greater than 1024 bytes in length will be truncated in your logs. Example: {"order_id": "A-1001", "comment": "Looks good"}
ending_atstring- The ending date and time for the schedule. Example: 2026-01-15T09:30:00Z
repeatsarray- The repeat rule for the schedule. Example: [{"__typename": "ScheduleRepeat", "day_of_month": null, "days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "frequency": "daily", "hours": null, "interval": 1, "minutes": null}]
scheduled_atstring- The starting date and time for the schedule. Example: 2026-01-15T09:30:00Z
tenantobject- The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. Example: acme-corp
knock_schedules_updateUpdate one or more existing schedules with new timing, data, or other properties.WriteUpdate Schedules
Update one or more existing schedules with new timing, data, or other properties. Returns an array of items with __typename, actor, data, id, inserted_at, last_occurrence_at, next_occurrence_at, recipient, repeats, tenant.
- Idempotent
Inputs
schedule_idsarrayrequired- A list of schedule IDs. Example: ["123e4567-e89b-12d3-a456-426614174000"]
actorobject- A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. Example: user_123
dataobject- An optional map of data to pass into the workflow execution. There is a 10MB limit on the size of the full `data` payload. Any individual string value greater than 1024 bytes in length will be truncated in your logs. Example: {"order_id": "A-1001", "comment": "Looks good"}
ending_atstring- The ending date and time for the schedule. Example: 2026-01-15T09:30:00Z
repeatsarray- The repeat rule for the schedule. Example: [{"__typename": "ScheduleRepeat", "day_of_month": null, "days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "frequency": "daily", "hours": null, "interval": 1, "minutes": null}]
scheduled_atstring- The starting date and time for the schedule. Example: 2026-01-15T09:30:00Z
tenantobject- The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. Example: acme-corp
knock_tenant_setSet a tenant within an environment, performing an upsert operation.WriteSet a tenant
Set a tenant within an environment, performing an upsert operation. Returns an object with __typename, id, name, settings. Needs id from knock_tenants_list.
- Idempotent
Inputs
idstringrequired- The unique identifier for the tenant. Example: acme-corp
channel_dataobject- The channel data for the tenant. Example: {"97c5837d-c65c-4d54-aa39-080eeb81c69d": {"tokens": ["push_token_xxx"]}}
namestring- An optional name for the tenant. Example: Jurassic Park
resolve_full_preference_settingsboolean- When true, merges environment-level default preferences into the tenant's `settings.preference_set` field before returning the response. Defaults to false. Example: false
settingsobject- The settings for the tenant. Includes branding and preference set. Example: {"branding": {"icon_url": "https://example.com/trex_silhouette_icon.png", "logo_url": "https://example.com/amber_fossil_logo.png", "primary_color": "#DF1A22", "primary_color_contrast": "#FFDE00"}}
knock_user_channel_data_setSet the channel data (for example push tokens or a Slack connection) for a user on one channel.WriteSet User Channel Data
Set the channel data (for example push tokens or a Slack connection) for a user on one channel. Returns an object with __typename, channel_id, data, provider. Needs user_id from knock_users_list.
- Idempotent
Inputs
channel_idstringrequired- The unique identifier for the channel. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
dataobjectrequired- Channel data for a given channel type. Example: {"tokens": ["fcm-token-abc123"]}
user_idstringrequired- The unique identifier of the user. Example: user-123
knock_user_identifyCreate or update a user (an upsert) with properties such as name, email, phone_number, timezone and custom fields.WriteIdentify User
Create or update a user (an upsert) with properties such as name, email, phone_number, timezone and custom fields. Returns an object with __typename, avatar, created_at, email, id, name, phone_number, timezone, updated_at. Needs user_id from knock_users_list.
- Idempotent
Inputs
user_idstringrequired- The unique identifier of the user. Example: user-123
avatarstring- A URL for the avatar of the user. Example: https://example.com/avatars/jane.png
channel_dataobject- Channel-specific information that's needed to deliver a notification to an end provider. Example: {"97c5837d-c65c-4d54-aa39-080eeb81c69d": {"tokens": ["push_token_123"]}}
created_atstring- The creation date of the user from your system. Example: 2026-01-15T09:30:00Z
emailstring- The primary email address for the user. Example: ian.malcolm@chaos.theory
localestring- The locale of the user. Used for message localization. Example: en-US
namestring- Display name of the user. Example: Dr. Ian Malcolm
phone_numberstring- The E.164 phone number of the user (required for SMS channels). Example: +14155550123
preferencesobject- A set of preferences for the user. Example: {"default": {"channel_types": {"email": true}, "workflows": {"dinosaurs-loose": {"channel_types": {"email": true}}}}}
timezonestring- The timezone of the user. Must be a valid tz database time zone string. Used for recurring schedules. Example: America/New_York
knock_user_mergeMerge two users together, where the user specified with the `from_user_id` param will be merged into the user specified by `user_id`.WriteMerge users
Merge two users together, where the user specified with the `from_user_id` param will be merged into the user specified by `user_id`. Returns an object with __typename, avatar, created_at, email, id, name, phone_number, timezone, updated_at. Needs user_id from knock_users_list.
Inputs
from_user_idstringrequired- The user ID to merge from. Example: user_1
user_idstringrequired- The id of the user to merge into. Example: user-123
knock_user_preference_set_updateUpdate a complete preference set for a user.WriteUpdate User Preference Set
Update a complete preference set for a user. By default, this is a destructive operation and will replace any existing preferences with the preferences given. Returns an object with categories, channel_types, channels, commercial_subscribed, id, workflows. The request replaces the stored value with what you send. Needs user_id from knock_users_list; id from knock_user_preference_sets_list.
- Idempotent
Inputs
idstringrequired- Unique identifier for the preference set. Example: default
user_idstringrequired- The unique identifier of the user. Example: user-123
__persistence_strategy__string- Controls how the preference set is persisted. 'replace' will completely replace the preference set, 'merge' will merge with existing preferences. Example: mergeone of
mergereplace categoriesobject- An object where the key is the category and the values are the preference settings for that category. Example: {"marketing": false, "transactional": {"channel_types": {"email": false}}}
channel_typesobject- An object where the key is the channel type and the values are the preference settings for that channel type. Example: {"email": true}
channelsobject- An object where the key is the channel ID and the values are the preference settings for that channel ID. Example: {"2f641633-95d3-4555-9222-9f1eb7888a80": {"conditions": [{"argument": "US", "operator": "equal_to", "variable": "recipient.country_code"}]}, "aef6e715-df82-4ab6-b61e-b743e249f7b6": true}
commercial_subscribedboolean- Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications. Can also be set to a settings object with conditions that are evaluated at notification send time. Example: true
workflowsobject- An object where the key is the workflow key and the values are the preference settings for that workflow. Example: {"dinosaurs-loose": {"channel_types": {"email": false}}}
knock_users_bulk_identifyIdentify multiple users in a single operation.WriteBulk Identify Users
Identify multiple users in a single operation. Allows creating or updating up to 1,000 users in a single batch with various properties, preferences, and channel data. Returns an object with __typename, completed_at, error_count, error_items, estimated_total_rows, failed_at, id, inserted_at, name, processed_rows, progress_path, started_at and more.
Inputs
usersarrayrequired- A list of users. Example: [{"email": "jane@ingen.net", "id": "user_1", "name": "Jane Doe", "timezone": "America/New_York"}]
knock_workflow_triggerTrigger a Knock workflow by its key for one or more recipients (user IDs, inline user objects or object references), with optional actor, tenant, cancellation key and data for the templates.WriteTrigger Workflow
Trigger a Knock workflow by its key for one or more recipients (user IDs, inline user objects or object references), with optional actor, tenant, cancellation key and data for the templates. Returns workflow_run_id for the triggered run. Use this to send a notification through Knock. Use knock_workflow_cancel with the same cancellation_key to stop it before it finishes, and knock_schedules_create to run it on a schedule.
Inputs
keystringrequired- Key of the workflow to trigger. Example: new-comment
recipientsarrayrequired- The recipients to trigger the workflow for. Can inline identify users, objects, or use a list of user IDs. Limited to 1,000 recipients. Example: ["dr_grant", "dr_sattler", "dr_malcolm"]
actorobject- A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. Example: mr_dna
cancellation_keystring- A key that is used to reference a specific workflow trigger request when issuing a workflow cancellation request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations. Example: isla_nublar_incident_1993
dataobject- An optional map of data to pass into the workflow execution. There is a 10MB limit on the size of the full `data` payload. Any individual string value greater than 1024 bytes in length will be truncated in your logs. Example: {"order_id": "A-1001", "comment": "Looks good"}
settingsobject- Optional settings that control how this workflow trigger is executed. Example: {"sandbox_mode": true, "skip_delay": true}
tenantobject- The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. Example: acme-corp
knock_audience_members_removeRemove one or more members from the specified audience.DestructiveRemove Audience Members
Remove one or more members from the specified audience. Returns an empty response on success (HTTP 204).
- Idempotent
Inputs
keystringrequired- The key of the audience. Example: new-comment
membersarrayrequired- A list of audience members to remove. You can remove up to 1,000 members per request. Example: [{"tenant": "ingen_isla_nublar", "user": {"email": "ellie@ingen.net", "id": "dr_sattler", "name": "Dr. Ellie Sattler"}}]
knock_object_deletePermanently removes an object from the specified collection.DestructiveDelete an object
Permanently removes an object from the specified collection. Returns an empty response on success (HTTP 204). Needs id from knock_objects_list.
- Idempotent
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
idstringrequired- Unique identifier for the object. Example: project-123
knock_object_subscriptions_deleteDelete subscriptions for the specified recipients from an object.DestructiveDelete subscriptions
Delete subscriptions for the specified recipients from an object. Returns an array of items with __typename, inserted_at, object, properties, recipient, updated_at. Needs object_id from knock_objects_list.
- Idempotent
Inputs
collectionstringrequired- The collection this object belongs to. Example: projects
object_idstringrequired- Unique identifier for the object. Example: project-123
recipientsarrayrequired- The recipients of the subscription. You can subscribe up to 100 recipients to an object at a time. Example: ["user_123"]
knock_schedules_deletePermanently deletes one or more schedules identified by the provided schedule IDs.DestructiveDelete Schedules
Permanently deletes one or more schedules identified by the provided schedule IDs. Returns an array of items with __typename, actor, data, id, inserted_at, last_occurrence_at, next_occurrence_at, recipient, repeats, tenant.
- Idempotent
Inputs
schedule_idsarrayrequired- A list of schedule IDs. Example: ["123e4567-e89b-12d3-a456-426614174000"]
knock_tenant_deleteDelete a tenant and all associated data.DestructiveDelete a tenant
Delete a tenant and all associated data. This operation cannot be undone. Returns an empty response on success (HTTP 204). Needs id from knock_tenants_list.
- Idempotent
Inputs
idstringrequired- The unique identifier for the tenant. Example: acme-corp
knock_user_channel_data_unsetDelete channel data for a specific user and channel ID.DestructiveUnset User Channel Data
Delete channel data for a specific user and channel ID. Returns an empty response on success (HTTP 204). Needs user_id from knock_users_list.
- Idempotent
Inputs
channel_idstringrequired- The unique identifier for the channel. Example: 4c2f0a3e-8b1d-4e5f-9a6b-7c8d9e0f1a2b
user_idstringrequired- The unique identifier of the user. Example: user-123
knock_user_deletePermanently delete a user and all associated data.DestructiveDelete user
Permanently delete a user and all associated data. Returns an empty response on success (HTTP 204). Needs user_id from knock_users_list.
- Idempotent
Inputs
user_idstringrequired- The ID of the user to delete. Example: user-123
knock_users_bulk_deletePermanently deletes up to 1,000 users at a time.DestructiveBulk Delete Users
Permanently deletes up to 1,000 users at a time. Returns an object with __typename, completed_at, error_count, error_items, estimated_total_rows, failed_at, id, inserted_at, name, processed_rows, progress_path, started_at and more.
Inputs
user_idsarrayrequired- A list of user IDs. Example: ["user_1", "user_2"]
knock_workflow_cancelCancel in-flight runs of a workflow that were triggered with a cancellation_key, optionally only for some recipients.DestructiveCancel Workflow Run
Cancel in-flight runs of a workflow that were triggered with a cancellation_key, optionally only for some recipients. Returns an empty response on success (HTTP 204). Use this to stop delayed, batched or multi-step workflow runs. Messages already delivered are not recalled.
Inputs
cancellation_keystringrequired- A key that is used to reference a specific workflow trigger request when issuing a workflow cancellation request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations. Example: cancel-workflow-123
keystringrequired- The key of the workflow to cancel. Example: new-comment
recipientsarray- A list of recipients to cancel the notification for. If omitted, cancels for all recipients associated with the cancellation key. Example: ["jhammond"]
No tools match.