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

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Trigger Knock workflows and manage notifications from Guild agents

> Connect Guild agents to Knock to trigger and cancel workflows, manage users and tenants, track message delivery, and control schedules and subscriptions.

Integrations · Knock

A Guild agent can drive your Knock notification system: triggering and cancelling workflows, tracking delivery, and updating message states on behalf of your users. Guild stores your Knock API key server-side and injects it as a bearer token, so agent code never sees the credential. Credential policies let you restrict which operations each agent may call, and every request is audited through Guild's credential proxy.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Knock.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Knock to your first agent.

## What the Knock integration exposes

The integration packages Knock's notification and management APIs as agent-callable tools. Tools cover workflow triggering and cancellation, user and tenant identification, object and preference management, schedule creation and deletion, subscription and audience management, and message state updates across channels. Tools follow the knock\_ prefix and are selectable individually with pick().

## How it works

**1. Open credentials in Guild**

Go to Access & setup > Credentials in your Guild account or organization. Click Connect, search for knock, and select it.

**2. Paste your Knock API key**

Enter your key in the API Key field and save. Guild sends it as a bearer token in the Authorization header on every request the agent makes.

**3. Add KnockTools to your agent**

Import KnockTools from the `guildai~knock` package and spread it into your agent's tools object. Use pick() to include only the tools your agent needs.

## Why Knock access needs governing

Knock tools can trigger workflows for any recipient, delete users and tenants in bulk, and update message states across channels. Guild stores the API key server-side and injects it only after the credential proxy checks the credential policies you define. You can write ALLOW and DENY rules scoped to specific agents or workspaces, limiting one agent to read-only delivery queries while another can trigger workflows.

Credentials can be scoped to an account, a single workspace, a member, or one dedicated agent, so the key never travels further than intended. See [Credentials](https://docs.guild.ai/platform/credentials.md) and [Credential policies](https://docs.guild.ai/platform/credential-policies.md) for setup. Without scoped rules, every agent that resolves the credential can call any Knock tool; adding a deny-by-default policy removes that exposure.

## About the Knock integration

Agents can trigger and cancel notification workflows, manage users, tenants, objects, and their preferences, and query message delivery status. They can also create and delete schedules, manage subscriptions and audiences, and update message read or archive states across channels. The integration is `guildai~knock`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as a bearer token in the `Authorization` header

### Setup

**1. Connect Knock**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **knock**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { KnockTools } from "@guildai-services/guildai~knock"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with Knock.",
  tools: { ...KnockTools },
})
```

### Selecting specific tools

Tools are named with the `knock_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~knock`:

> [accordion] All 118 tools
>
> | Tool | What it does |
> | - | - |
> | `knock_add_audience_members` | Adds one or more members to the specified audience. |
> | `knock_add_subscriptions_for_object` | Add subscriptions for an object. |
> | `knock_archive_message` | Archives a message for the user. |
> | `knock_batch_get_message_contents` | Get the contents of multiple messages in a single request. |
> | `knock_batch_mark_messages_as_archived` | Marks the given messages as archived. |
> | `knock_batch_mark_messages_as_interacted` | Marks the given messages as interacted with by the user. |
> | `knock_batch_mark_messages_as_read` | Marks the given messages as 'read'. |
> | `knock_batch_mark_messages_as_seen` | Marks the given messages as 'seen'. |
> | `knock_batch_mark_messages_as_unarchived` | Marks the given messages as unarchived. |
> | `knock_batch_mark_messages_as_unread` | Marks the given messages as 'unread'. |
> | `knock_batch_mark_messages_as_unseen` | Marks the given messages as 'unseen'. |
> | `knock_bulk_add_subscriptions` | Add subscriptions for all objects in a single collection. |
> | `knock_bulk_create_schedules` | Bulk creates up to 1,000 schedules at a time. |
> | `knock_bulk_delete_objects` | Bulk deletes objects from the specified collection. |
> | `knock_bulk_delete_subscriptions` | Delete subscriptions for many objects in a single collection type. |
> | `knock_bulk_delete_tenants` | Delete up to 1,000 tenants at a time in a single operation. |
> | `knock_bulk_delete_users` | Permanently deletes up to 1,000 users at a time. |
> | `knock_bulk_identify_users` | Identifies multiple users in a single operation. |
> | `knock_bulk_set_objects` | Bulk sets up to 1,000 objects at a time in the specified collection. |
> | `knock_bulk_set_tenants` | Set or update up to 1,000 tenants in a single operation. |
> | `knock_bulk_set_user_preferences` | Bulk sets the preferences for up to 1,000 users at a time. |
> | `knock_bulk_update_messages_for_channel` | Bulk update the status of messages for a specific channel. |
> | `knock_cancel_workflow` | Cancels a previously triggered workflow using the provided cancellation key. |
> | `knock_cancel_workflow_by_key` | When invoked for a workflow using a specific workflow key and cancellation key, will cancel any queued workflow runs associated with that key/cancellation key pair. |
> | `knock_create_schedules` | Creates one or more schedules for a workflow with the specified recipients, timing, and data. |
> | `knock_delete_object` | Permanently removes an object from the specified collection. |
> | `knock_delete_object_preference_set` | Unsets the preference set for the object, removing it entirely. |
> | `knock_delete_schedules` | Permanently deletes one or more schedules identified by the provided schedule IDs. |
> | `knock_delete_subscriptions_for_object` | Delete subscriptions for the specified recipients from an object. |
> | `knock_delete_tenant` | Delete a tenant and all associated data. |
> | `knock_delete_user` | Permanently delete a user and all associated data. |
> | `knock_delete_user_preference_set` | Unsets the preference set for the user, removing it entirely. |
> | `knock_generate_preference_center_signed_url` | Generates a signed preference center URL and token for the given user in the current environment. |
> | `knock_get_bulk_operation` | Retrieves a bulk operation (if it exists) and displays the current state of it. |
> | `knock_get_message` | Retrieves a specific message by its ID. |
> | `knock_get_message_contents` | Returns the fully rendered contents of a message, where the response depends on which channel the message was sent through. |
> | `knock_get_object` | Retrieves a specific object by its ID from the specified collection. |
> | `knock_get_object_channel_data` | Returns the channel data for the specified object and channel. |
> | `knock_get_object_preference_set` | Returns the preference set for the specified object and preference set 'id'. |
> | `knock_get_preference_center_config` | Returns the preference center config with environment metadata for the given user. |
> | `knock_get_tenant` | Get a tenant by ID. |
> | `knock_get_user` | Retrieve a specific user by their ID. |
> | `knock_get_user_channel_data` | Retrieves the channel data for a specific user and channel ID. |
> | `knock_get_user_in_app_feed_settings` | Returns the feed settings for a user. |
> | `knock_get_user_preference_set` | Retrieves a specific preference set for a user identified by the preference set ID. |
> | `knock_get_workflow_recipient_run` | Returns a single workflow recipient run with its associated events. |
> | `knock_identify_user` | Create or update a user with the provided identification data. |
> | `knock_list_audience_members` | Returns a paginated list of members for the specified audience. |
> | `knock_list_channels_for_ms_teams_provider` | List the Microsoft Teams channels within a team. |
> | `knock_list_channels_for_slack_provider` | List Slack channels for a Slack workspace. |
> | `knock_list_message_activities` | Returns a paginated list of activities for the specified message. |
> | `knock_list_message_delivery_logs` | Returns a paginated list of delivery logs for the specified message. |
> | `knock_list_message_events` | Returns a paginated list of events for the specified message. |
> | `knock_list_messages` | Returns a paginated list of messages for the current environment. |
> | `knock_list_messages_for_object` | Returns a paginated list of messages for a specific object in the given collection. |
> | `knock_list_messages_for_user` | Returns a paginated list of messages for a specific user. |
> | `knock_list_object_preference_sets` | Returns a paginated list of preference sets for the specified object. |
> | `knock_list_objects` | Returns a paginated list of objects from the specified collection. |
> | `knock_list_object_schedules` | Returns a paginated list of schedules for an object. |
> | `knock_list_schedules` | Returns a paginated list of schedules for the current environment, filtered by workflow and optionally by recipients and tenant. |
> | `knock_list_subscriptions_for_object` | List subscriptions for an object. |
> | `knock_list_subscriptions_for_user` | Retrieves a paginated list of subscriptions for a specific user, in descending order. |
> | `knock_list_teams_for_ms_teams_provider` | Get a list of teams belonging to the Microsoft Entra tenant. |
> | `knock_list_tenants` | List tenants for the current environment. |
> | `knock_list_user_guides` | Returns a list of eligible in-app guides for a specific user and channel. |
> | `knock_list_user_in_app_feed_items` | Returns a paginated list of feed items for a user in reverse chronological order, including metadata about the feed. |
> | `knock_list_user_preference_sets` | Retrieves a list of all preference sets for a specific user. |
> | `knock_list_users` | Retrieve a paginated list of users in the environment. |
> | `knock_list_user_schedules` | Returns a paginated list of schedules for a specific user, in descending order. |
> | `knock_list_workflow_recipient_runs` | Returns a paginated list of workflow recipient runs for the current environment. |
> | `knock_mark_message_interacted` | Marks a message as 'interacted' with by the user. |
> | `knock_mark_message_read` | Marks a message as 'read'. |
> | `knock_mark_message_seen` | Marks a message as 'seen'. |
> | `knock_mark_message_unread` | Marks a message as 'unread'. |
> | `knock_mark_message_unread_alt` | Marks a message as 'unread'. |
> | `knock_mark_message_unseen` | Marks a message as 'unseen'. |
> | `knock_mark_message_unseen_alt` | Marks a message as 'unseen'. |
> | `knock_mark_user_guide_as_archived` | Records that a guide has been archived by a user, triggering any associated archived events. |
> | `knock_mark_user_guide_as_archived_alt` | Records that a guide has been archived by a user, triggering any associated archived events. |
> | `knock_mark_user_guide_as_interacted` | Records that a user has interacted with a guide, triggering any associated interacted events. |
> | `knock_mark_user_guide_as_interacted_alt` | Records that a user has interacted with a guide, triggering any associated interacted events. |
> | `knock_mark_user_guide_as_seen` | Records that a guide has been seen by a user, triggering any associated seen events. |
> | `knock_mark_user_guide_as_seen_alt` | Records that a guide has been seen by a user, triggering any associated seen events. |
> | `knock_mark_user_guide_as_unarchived` | Records that a guide has been unarchived, triggering any associated unarchived events. |
> | `knock_merge_user` | Merge two users together, where the user specified with the 'from\_user\_id' param will be merged into the user specified by 'user\_id'. |
> | `knock_ms_teams_provider_auth_check` | Check if a connection to Microsoft Teams has been authorized for a given Microsoft Teams tenant object. |
> | `knock_ms_teams_provider_revoke_access` | Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object. |
> | `knock_process_census_rpc_request` | Processes a Census custom destination RPC request. |
> | `knock_process_hightouch_rpc_request` | Processes a Hightouch embedded destination RPC request. |
> | `knock_remove_audience_members` | Removes one or more members from the specified audience. |
> | `knock_reset_user_guide_engagement` | Resets the engagement state of a guide for a user, removing the guide's engagement log entry so the next interaction creates a fresh engagement. |
> | `knock_set_object` | Creates a new object or updates an existing one in the specified collection. |
> | `knock_set_object_channel_data` | Sets the channel data for the specified object and channel. |
> | `knock_set_tenant` | Sets a tenant within an environment, performing an upsert operation. |
> | `knock_set_user_channel_data` | Updates or creates channel data for a specific user and channel ID. |
> | `knock_slack_provider_auth_check` | Check if a Slack channel is authenticated. |
> | `knock_slack_provider_revoke_access` | Revoke access for a Slack channel. |
> | `knock_trigger_workflow` | Trigger a workflow (specified by the key) to run for the given recipients, using the parameters provided. |
> | `knock_trigger_workflow_via_notify` | Triggers a workflow with the given key, actor, recipients, and optional data. |
> | `knock_unarchive_message` | Removes a message from the archived state, making it visible in the default message list in the feed again. |
> | `knock_unarchive_message_alt` | Removes a message from the archived state, making it visible in the default message list in the feed again. |
> | `knock_unset_object_channel_data` | Unsets the channel data for the specified object and channel. |
> | `knock_unset_user_channel_data` | Deletes channel data for a specific user and channel ID. |
> | `knock_update_object_preference_categories` | Updates the category preferences for an object's preference set. |
> | `knock_update_object_preference_category` | Updates a specific category preference for an object's preference set. |
> | `knock_update_object_preference_channel_type` | Updates a specific channel type preference for an object's preference set. |
> | `knock_update_object_preference_channel_types` | Updates the channel type preferences for an object's preference set. |
> | `knock_update_object_preference_set` | Sets preferences within the given preference set. |
> | `knock_update_object_preference_workflow` | Updates a specific workflow preference for an object's preference set. |
> | `knock_update_object_preference_workflows` | Updates the workflow preferences for an object's preference set. |
> | `knock_update_schedules` | Updates one or more existing schedules with new timing, data, or other properties. |
> | `knock_update_user_preference_categories` | Updates the categories in a specific user preference set. |
> | `knock_update_user_preference_category` | Updates a single category in a specific user preference set. |
> | `knock_update_user_preference_channel_type` | Updates a single channel type in a specific user preference set. |
> | `knock_update_user_preference_channel_types` | Updates the channel types in a specific user preference set. |
> | `knock_update_user_preference_set` | Updates a complete preference set for a user. |
> | `knock_update_user_preference_workflow` | Updates a single workflow in a specific user preference set. |
> | `knock_update_user_preference_workflows` | Updates the workflows in a specific user preference set. |

## Frequently asked questions

> [accordion] Can an agent cancel a workflow that has already been queued?
>
> Yes. The knock\_cancel\_workflow tool cancels a previously triggered workflow using its cancellation key, and knock\_cancel\_workflow\_by\_key cancels any queued runs matching a workflow key and cancellation key pair.

> [accordion] Does Guild expose Knock webhook events to agents?
>
> No. The catalog entry lists no webhook events for this integration, so agents cannot react to inbound Knock events through Guild.

> [accordion] Can I limit an agent to only reading message delivery status?
>
> Yes. Write a credential policy that ALLOW-lists only the knock\_get\_message, knock\_list\_message\_delivery\_logs, and knock\_list\_messages tools, scoped to that agent. The credential proxy blocks all other Knock operations for that agent. See [Credential policies](https://docs.guild.ai/platform/credential-policies.md) for rule syntax.

> [accordion] How many schedules can an agent create in one call?
>
> The knock\_bulk\_create\_schedules tool creates up to 1,000 schedules in a single operation.

## Put a governed agent on Knock this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Knock.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Knock to your first agent.

## Related

**Also runs on Guild:** [Ably](https://docs.guild.ai/integrations/ably.md) · [Customer.io](https://docs.guild.ai/integrations/customer-io.md) · [Daily](https://docs.guild.ai/integrations/daily.md) · [Discord](https://docs.guild.ai/integrations/discord.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
