Complete reference documentation for the Knock API.
The Knock API enables you to add a complete notification engine to your product. This API provides programmatic access to integrating Knock via a REST-ful API.
Base URL
https://api.knock.app/v1A Workflow orchestrates the delivery of messages to your end users. When you configure a workflow you'll determine which channels its messages should route to, what those messages should look like on each channel, as well as any functions—batch, throttle, delay—you want applied to the messages prior to delivery.
To send notifications, you’ll trigger your workflows. A workflow is triggered by a trigger call, typically when an event occurs in your product that you want your users to know about (e.g. a new comment.)
/v1/workflows/{key}/trigger/v1/workflows/{key}/cancelTrigger a workflow (specified by the key) to run for the given recipients, using the parameters provided. Returns an identifier for the workflow run request. All workflow runs are executed asynchronously. This endpoint also handles inline identifications for the actor, recipient, and tenant fields.
/v1/workflows/{key}/triggerkeystringrequiredKey of the workflow to trigger.
actorunknownA map of properties describing a user or an object to identify in Knock and mark as who or what performed the action.
cancellation_keystringnullableAn optional key that is used to reference a specific workflow trigger request when issuing a [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations.
dataobjectnullableAn 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](/developer-tools/api-logs#log-truncation) in your logs.
The recipients to trigger the workflow for. Can inline identify users, objects, or use a list of user IDs. Limited to 1,000 recipients.
tenantunknownThe 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.
TriggerWorkflowResponseThe response from triggering a workflow.
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. Can optionally be provided one or more recipients to scope the request to.
/v1/workflows/{key}/cancelkeystringrequiredThe key of the workflow to cancel.
cancellation_keystringrequiredAn optional key that is used to reference a specific workflow trigger request when issuing a [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations.
A list of recipients to cancel the notification for. If omitted, cancels for all recipients associated with the cancellation key.
204 No ContentA Message is a notification delivered on a particular channel to a user.
/v1/messages/{message_id}/v1/messages/{message_id}/content/v1/messages/v1/messages/{message_id}/events/v1/messages/{message_id}/delivery_logs/v1/messages/{message_id}/activities/v1/messages/{message_id}/seen/v1/messages/{message_id}/seen/v1/messages/{message_id}/read/v1/messages/{message_id}/read/v1/messages/{message_id}/interacted/v1/messages/{message_id}/archived/v1/messages/{message_id}/archivedRetrieves a specific message by its ID.
/v1/messages/{message_id}message_idstringrequiredThe unique identifier for the message.
Represents a single message that was generated by a workflow for a given channel.
Returns the fully rendered contents of a message, where the response depends on which channel the message was sent through.
/v1/messages/{message_id}/contentmessage_idstringrequiredThe ID of the message to fetch contents of.
MessageContentsThe content of a message.
Returns a paginated list of messages for the current environment.
/v1/messagesafterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
tenantstringLimits the results to items with the corresponding tenant.
channel_idstringLimits the results to items with the corresponding channel ID.
status[]string[]Limits the results to messages with the given delivery status.
engagement_status[]string[]Limits the results to messages with the given engagement status.
message_ids[]string[]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.
workflow_categories[]string[]Limits the results to messages related to any of the provided categories.
sourcestringLimits the results to messages triggered by the given workflow key.
workflow_run_idstringLimits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request.
workflow_recipient_run_idstringLimits the results to messages for a specific recipient's workflow run.
trigger_datastringLimits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information.
inserted_at.gtestringLimits the results to messages inserted after or on the given date.
inserted_at.ltestringLimits the results to messages inserted before or on the given date.
inserted_at.gtstringLimits the results to messages inserted after the given date.
inserted_at.ltstringLimits the results to messages inserted before the given date.
ListMessagesResponseA paginated list of messages.
Returns a paginated list of events for the specified message.
/v1/messages/{message_id}/eventsmessage_idstringrequiredThe ID of the message to fetch events for.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListMessageEventsResponseReturns a paginated list of [delivery and engagement](/send-notifications/message-statuses) events for the specified message.
Returns a paginated list of delivery logs for the specified message.
/v1/messages/{message_id}/delivery_logsmessage_idstringrequiredThe ID of the message to fetch delivery logs for.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListMessageDeliveryLogsResponseA message delivery log response.
Returns a paginated list of activities for the specified message.
/v1/messages/{message_id}/activitiesmessage_idstringrequiredThe ID of the message to fetch activities for.
trigger_datastringThe trigger data to filter activities by.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListActivitiesResponseReturns a paginated list of `activities` associated with a given message. For messages produced after a [batch step](/designing-workflows/batch-function), this will contain one or more activities. Non-batched messages will always return a single activity.
Marks a message as seen. This indicates that the user has viewed the message in their feed or inbox. Read more about message engagement statuses here.
/v1/messages/{message_id}/seenmessage_idstringrequiredThe unique identifier for the message.
Represents a single message that was generated by a workflow for a given channel.
Marks a message as unseen. This reverses the seen state. Read more about message engagement statuses here.
/v1/messages/{message_id}/seenmessage_idstringrequiredThe unique identifier for the message.
Represents a single message that was generated by a workflow for a given channel.
Marks a message as read. This indicates that the user has read the message content. Read more about message engagement statuses here.
/v1/messages/{message_id}/readmessage_idstringrequiredThe unique identifier for the message.
Represents a single message that was generated by a workflow for a given channel.
Marks a message as unread. This reverses the read state. Read more about message engagement statuses here.
/v1/messages/{message_id}/readmessage_idstringrequiredThe unique identifier for the message.
Represents a single message that was generated by a workflow for a given channel.
Marks a message as interacted with by the user. This can include any user action on the message, with optional metadata about the specific interaction. Cannot include more than 5 key-value pairs, must not contain nested data. Read more about message engagement statuses here.
/v1/messages/{message_id}/interactedmessage_idstringrequiredThe unique identifier for the message.
metadataobjectMetadata about the interaction.
Represents a single message that was generated by a workflow for a given channel.
Archives 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.
/v1/messages/{message_id}/archivedmessage_idstringrequiredThe unique identifier for the message.
Represents a single message that was generated by a workflow for a given channel.
Removes a message from the archived state, making it visible in the default message list in the feed again.
/v1/messages/{message_id}/archivedmessage_idstringrequiredThe unique identifier for the message.
Represents a single message that was generated by a workflow for a given channel.
Operations that can be performed on a batch of messages.
/v1/messages/batch/content/v1/messages/batch/seen/v1/messages/batch/unseen/v1/messages/batch/read/v1/messages/batch/unread/v1/messages/batch/interacted/v1/messages/batch/archived/v1/messages/batch/unarchivedGet the contents of multiple messages in a single request.
/v1/messages/batch/contentmessage_ids[]string[]requiredThe IDs of the messages to fetch contents of.
BatchGetMessageContentsResponseA list of `MessageContents`
Marks the given messages as seen. This indicates that the user has viewed the message in their feed or inbox. Read more about message engagement statuses here.
/v1/messages/batch/seenmessage_idsstring[]requiredThe message IDs to update the status of.
BatchListMessagesResponseThe list of messages that were updated.
Marks the given messages as unseen. This reverses the seen state. Read more about message engagement statuses here.
/v1/messages/batch/unseenmessage_idsstring[]requiredThe message IDs to update the status of.
BatchListMessagesResponseThe list of messages that were updated.
Marks the given messages as read. Read more about message engagement statuses here.
/v1/messages/batch/readmessage_idsstring[]requiredThe message IDs to update the status of.
BatchListMessagesResponseThe list of messages that were updated.
Marks the given messages as unread. This reverses the read state. Read more about message engagement statuses here.
/v1/messages/batch/unreadmessage_idsstring[]requiredThe message IDs to update the status of.
BatchListMessagesResponseThe list of messages that were updated.
Marks the given messages as interacted with by the user. This can include any user action on the message, with optional metadata about the specific interaction. Cannot include more than 5 key-value pairs, must not contain nested data. Read more about message engagement statuses here.
/v1/messages/batch/interactedmessage_idsstring[]requiredThe message IDs to batch mark as interacted with.
metadataobjectnullableMetadata about the interaction.
BatchListMessagesResponseThe list of messages that were updated.
Marks the given messages as archived. Archived messages are hidden from the default message list in the feed but can still be accessed and unarchived later.
/v1/messages/batch/archivedmessage_idsstring[]requiredThe message IDs to update the status of.
BatchListMessagesResponseThe list of messages that were updated.
Marks the given messages as unarchived. This reverses the archived state. Archived messages are hidden from the default message list in the feed but can still be accessed and unarchived later.
/v1/messages/batch/unarchivedmessage_idsstring[]requiredThe message IDs to update the status of.
BatchListMessagesResponseThe list of messages that were updated.
Represents a single message that was generated by a workflow for a given channel.
__typenamestringrequiredThe typename of the schema.
actorsRecipientReference[]One or more actors that are associated with this message. Note: this is a list that can contain up to 10 actors if the message is produced from a [batch](/designing-workflows/batch-function).
archived_atstringnullableTimestamp when the message was archived.
channelobjectA configured channel, which is a way to route messages to a provider.
channel_idstringrequiredDeprecated, use channel.id instead.
clicked_atstringnullableTimestamp when the message was clicked.
dataobjectnullableData associated with the message’s workflow run. Includes the workflow trigger request’s `data` payload merged with any additional data returned by a [fetch function](/designing-workflows/fetch-function). For messages produced after a [batch step](/designing-workflows/batch-function), includes the payload `data` from the most-recent trigger request (the final `activity` in the batch).
engagement_statusesstring[]requiredA list of engagement statuses.
idstringrequiredThe unique identifier for the message.
inserted_atstringrequiredTimestamp when the resource was created.
interacted_atstringnullableTimestamp when the message was interacted with.
link_clicked_atstringnullableTimestamp when a link in the message was clicked.
metadataobjectnullableThe metadata associated with the message.
read_atstringnullableTimestamp when the message was read.
A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
scheduled_atstringnullableTimestamp when the message was scheduled to be sent.
seen_atstringnullableTimestamp when the message was seen.
sourceobjectrequiredThe workflow or guide that triggered the message.
statusstringrequiredThe message delivery status.
One of: "queued", "sent", "delivered", "delivery_attempted", "undelivered", "not_sent", "bounced"
tenantstringnullableThe ID of the `tenant` associated with the message. Only present when a `tenant` is provided on a workflow trigger request.
updated_atstringrequiredThe timestamp when the resource was last updated.
workflowstringnullableThe key of the workflow that generated the message.
An activity associated with a workflow trigger request. Messages produced after a batch step can be associated with one or more activities. Non-batched messages will always be associated with a single activity.
__typenamestringThe typename of the schema.
actorobjectThe actor who performed the activity.
dataobjectnullableThe workflow trigger `data` payload associated with the activity.
idstringUnique identifier for the activity.
inserted_atstringTimestamp when the activity was created.
recipientRecipientA recipient of a notification, which is either a user or an object.
updated_atstringTimestamp when the activity was last updated.
A message delivery log contains a request from Knock to a downstream provider and the response that was returned.
__typenamestringrequiredThe typename of the schema.
environment_idstringrequiredThe ID of the environment in which the message delivery occurred.
idstringrequiredThe unique identifier for the message delivery log.
inserted_atstringrequiredTimestamp when the message delivery log was created.
requestMessageDeliveryLogRequestrequiredA message delivery log request.
responseMessageDeliveryLogResponserequiredA message delivery log response.
service_namestringrequiredThe name of the service that processed the delivery.
A message event. Occurs when a message delivery or engagement status changes.
__typenamestringrequiredThe typename of the schema.
dataobjectnullableThe data associated with the message event. Only present for some event types.
idstringrequiredThe unique identifier for the message event.
inserted_atstringrequiredTimestamp when the event was created.
A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
typestringrequiredThe type of event that occurred.
One of: "message.archived", "message.bounced", "message.delivered", "message.delivery_attempted", "message.interacted", "message.link_clicked", "message.not_sent", "message.queued", "message.read", "message.seen", "message.sent", "message.unarchived", "message.undelivered", "message.unread", "message.unseen"
A Channel is a delivery method for a message.
Bulk operations available for messages of a given channel.
/v1/channels/{channel_id}/messages/bulk/{action}Bulk update the status of messages for a specific channel. The channel is specified by the channel_id parameter. The action to perform is specified by the action parameter, where the action is a status change action (e.g. archive, unarchive).
/v1/channels/{channel_id}/messages/bulk/{action}channel_idstringrequiredThe ID of the channel to update messages for.
actionstringrequiredThe target status to be applied to the messages.
One of: "seen", "unseen", "read", "unread", "archived", "unarchived", "interacted", "archive", "unarchive", "delete"
archivedstringLimits the results to messages with the given archived status.
One of: "exclude", "include", "only"
delivery_statusstringLimits the results to messages with the given delivery status.
One of: "queued", "sent", "delivered", "delivery_attempted", "undelivered", "not_sent", "bounced"
engagement_statusstringLimits the results to messages with the given engagement status.
One of: "seen", "unseen", "read", "unread", "archived", "unarchived", "link_clicked", "interacted"
has_tenantbooleanLimits the results to messages that have a tenant or not.
newer_thanstringLimits the results to messages inserted after the given date.
older_thanstringLimits the results to messages inserted before the given date.
recipient_idsstring[]Limits the results to messages with the given recipient IDs.
tenantsstring[]Limits the results to messages with the given tenant IDs.
trigger_datastringLimits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information.
workflowsstring[]Limits the results to messages with the given workflow keys.
A bulk operation entity.
A User represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
/v1/users/{user_id}/v1/users/v1/users/{user_id}/v1/users/{user_id}/merge/v1/users/{user_id}/v1/users/{user_id}/messages/v1/users/{user_id}/schedules/v1/users/{user_id}/subscriptions/v1/users/{user_id}/preferences/v1/users/{user_id}/preferences/{id}/v1/users/{user_id}/preferences/{id}/v1/users/{user_id}/channel_data/{channel_id}/v1/users/{user_id}/channel_data/{channel_id}/v1/users/{user_id}/channel_data/{channel_id}Retrieve a specific user by their ID.
/v1/users/{user_id}user_idstringrequiredThe ID of the user to retrieve.
A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
Retrieve a paginated list of users in the environment. Defaults to 50 users per page.
/v1/usersinclude[]string[]Associated resources to include in the response.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListUsersResponseA paginated list of users.
Create or update a user with the provided identification data. When you identify an existing user, the system merges the properties you specific with what is currently set on the user, updating only the fields included in your requests.
/v1/users/{user_id}user_idstringrequiredThe unique identifier of the user.
avatarstringnullableA URL for the avatar of the user.
channel_dataunknownnullableChannel-specific information that's needed to deliver a notification to an end provider.
created_atstringnullableThe creation date of the user from your system.
emailstringnullableThe primary email address for the user.
localestringnullableThe locale of the user. Used for [message localization](/concepts/translations).
namestringnullableDisplay name of the user.
phone_numberstringnullableThe [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
preferencesunknownnullableA set of preferences for the user.
timezonestringnullableThe timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
Merge two users together, where the user specified with the from_user_id param will be merged into the user specified by user_id.
/v1/users/{user_id}/mergeuser_idstringrequiredThe id of the user to merge into.
from_user_idstringrequiredThe user ID to merge from.
A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
Permanently delete a user and all associated data.
/v1/users/{user_id}user_idstringrequiredThe ID of the user to delete.
204 No ContentReturns a paginated list of messages for a specific user. Messages are sorted with the most recent ones appearing first. Messages outside the account's retention window will not be included in the results.
/v1/users/{user_id}/messagesuser_idstringrequiredThe user ID to list messages for.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
tenantstringLimits the results to items with the corresponding tenant.
channel_idstringLimits the results to items with the corresponding channel ID.
status[]string[]Limits the results to messages with the given delivery status.
engagement_status[]string[]Limits the results to messages with the given engagement status.
message_ids[]string[]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.
workflow_categories[]string[]Limits the results to messages related to any of the provided categories.
sourcestringLimits the results to messages triggered by the given workflow key.
workflow_run_idstringLimits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request.
workflow_recipient_run_idstringLimits the results to messages for a specific recipient's workflow run.
trigger_datastringLimits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information.
inserted_at.gtestringLimits the results to messages inserted after or on the given date.
inserted_at.ltestringLimits the results to messages inserted before or on the given date.
inserted_at.gtstringLimits the results to messages inserted after the given date.
inserted_at.ltstringLimits the results to messages inserted before the given date.
ListMessagesResponseA paginated list of messages.
Returns a paginated list of schedules for a specific user, in descending order.
/v1/users/{user_id}/schedulesuser_idstringrequiredThe user ID to list schedules for.
workflowstringThe workflow key to filter schedules for.
tenantstringThe tenant ID to filter schedules for.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListSchedulesResponseA response containing a list of schedules.
Retrieves a paginated list of subscriptions for a specific user, in descending order.
/v1/users/{user_id}/subscriptionsuser_idstringrequiredThe user ID to list subscriptions for.
include[]string[]Associated resources to include in the response.
objects[]RecipientReference[]Only returns subscriptions for the specified object references.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListSubscriptionsResponseA response containing a list of subscriptions.
Retrieves a list of all preference sets for a specific user.
/v1/users/{user_id}/preferencesuser_idstringrequiredThe unique identifier of the user.
ListUserPreferenceSetsResponseA list of preference sets for the user.
Retrieves a specific preference set for a user identified by the preference set ID.
/v1/users/{user_id}/preferences/{id}user_idstringrequiredThe unique identifier of the user.
idstringrequiredUnique identifier for the preference set.
Default: "default"
tenantstringThe unique identifier for the tenant.
A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.
Updates a complete preference set for a user. By default, this is a destructive operation and will replace any existing preferences with the preferences given. Use 'persistence_strategy': 'merge' to merge with existing preferences instead.
/v1/users/{user_id}/preferences/{id}user_idstringrequiredThe unique identifier of the user.
idstringrequiredUnique identifier for the preference set.
Default: "default"
__persistence_strategy__stringControls how the preference set is persisted. 'replace' will completely replace the preference set, 'merge' will merge with existing preferences.
One of: "merge", "replace"
categoriesunknownAn object where the key is the category and the values are the preference settings for that category.
channel_typesunknownAn object where the key is the channel type and the values are the preference settings for that channel type.
channelsunknownAn object where the key is the channel ID and the values are the preference settings for that channel ID.
commercial_subscribedbooleannullableWhether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
workflowsunknownAn object where the key is the workflow key and the values are the preference settings for that workflow.
A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.
Retrieves the channel data for a specific user and channel ID.
/v1/users/{user_id}/channel_data/{channel_id}user_idstringrequiredThe unique identifier of the user.
channel_idstringrequiredThe unique identifier for the channel.
Channel data for a given channel type.
Updates or creates channel data for a specific user and channel ID. If no user exists in the current environment for the given user_id, Knock will create the user entry as part of this request.
/v1/users/{user_id}/channel_data/{channel_id}user_idstringrequiredThe unique identifier of the user.
channel_idstringrequiredThe unique identifier for the channel.
dataobjectrequiredChannel data for a given channel type.
Channel data for a given channel type.
Deletes channel data for a specific user and channel ID.
/v1/users/{user_id}/channel_data/{channel_id}user_idstringrequiredThe unique identifier of the user.
channel_idstringrequiredThe unique identifier for the channel.
204 No ContentA feed exposes the messages delivered to an in-app feed channel, formatted specially to be consumed in a notification feed.
A feed will always return a list of FeedItems, which are pointers to a message delivered and contain all of the information needed in order to render an item within a notification feed.
Note: Feeds are a specialized form of messages that are designed purely for in-app rendering, and as such return information that is required on the client to do so.
/v1/users/{user_id}/feeds/{id}/v1/users/{user_id}/feeds/{id}/settingsReturns a paginated list of feed items for a user in reverse chronological order, including metadata about the feed. If the user has not yet been identified within Knock, an empty feed will be returned.
You can customize the response using response filters to exclude or only include specific properties on your resources.
Notes:
data and activities fields of UserInAppFeedResponse./v1/users/{user_id}/feeds/{id}user_idstringrequiredThe unique identifier of the user.
idstringrequiredThe unique identifier for the channel.
statusstringThe status of the feed items.
One of: "unread", "read", "unseen", "seen", "all"
sourcestringThe workflow key associated with the message in the feed.
tenantstringThe tenant associated with the feed items.
has_tenantbooleanWhether the feed items have a tenant.
workflow_categories[]string[]The workflow categories of the feed items.
archivedstringThe archived status of the feed items.
One of: "exclude", "include", "only"
trigger_datastringThe trigger data of the feed items (as a JSON string).
localestringThe locale to render the feed items in. Must be in the IETF 5646 format (e.g. `en-US`). When not provided, will default to the locale that the feed items were rendered in. Only available for enterprise plan customers using custom translations.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
UserInAppFeedResponseA paginated list of feed items.
Returns the feed settings for a user.
/v1/users/{user_id}/feeds/{id}/settingsuser_idstringrequiredThe unique identifier of the user.
idstringrequiredThe unique identifier for the channel.
UserInAppFeedSettingsResponseThe response for the user's feed settings.
A Guide is a collection of steps that can be used to guide a user through a workflow.
/v1/users/{user_id}/guides/{channel_id}/v1/users/{user_id}/guides/messages/{message_id}/seen/v1/users/{user_id}/guides/messages/{message_id}/interacted/v1/users/{user_id}/guides/messages/{message_id}/archivedReturns a list of eligible in-app guides for a specific user and channel.
/v1/users/{user_id}/guides/{channel_id}user_idstringrequiredThe unique identifier of the user.
channel_idstringrequiredThe unique identifier for the channel.
tenantstringThe tenant ID to use for targeting and rendering guides.
datastringThe data (JSON encoded object) to use for targeting and rendering guides.
typestringThe type of guides to filter by.
GuidesResponseA response for a list of guides.
Records that a guide has been seen by a user, triggering any associated seen events.
/v1/users/{user_id}/guides/messages/{message_id}/seenuser_idstringrequiredThe unique identifier of the user.
channel_idstringrequiredThe unique identifier for the channel.
contentobjectThe content of the guide.
dataobjectThe data of the guide.
guide_idstringrequiredThe unique identifier for the guide.
guide_keystringrequiredThe key of the guide.
guide_step_refstringrequiredThe step reference of the guide.
is_finalbooleanWhether the guide is final.
metadataobjectThe metadata of the guide.
tenantstringnullableThe tenant ID of the guide.
GuideActionResponseA response for a guide action.
Records that a user has interacted with a guide, triggering any associated interacted events.
/v1/users/{user_id}/guides/messages/{message_id}/interacteduser_idstringrequiredThe unique identifier of the user.
channel_idstringrequiredThe unique identifier for the channel.
contentobjectThe content of the guide.
dataobjectThe data of the guide.
guide_idstringrequiredThe unique identifier for the guide.
guide_keystringrequiredThe key of the guide.
guide_step_refstringrequiredThe step reference of the guide.
is_finalbooleanWhether the guide is final.
metadataobjectThe metadata of the guide.
tenantstringnullableThe tenant ID of the guide.
GuideActionResponseA response for a guide action.
Records that a guide has been archived by a user, triggering any associated archived events.
/v1/users/{user_id}/guides/messages/{message_id}/archiveduser_idstringrequiredThe unique identifier of the user.
channel_idstringrequiredThe unique identifier for the channel.
contentobjectThe content of the guide.
dataobjectThe data of the guide.
guide_idstringrequiredThe unique identifier for the guide.
guide_keystringrequiredThe key of the guide.
guide_step_refstringrequiredThe step reference of the guide.
is_finalbooleanWhether the guide is final.
metadataobjectThe metadata of the guide.
tenantstringnullableThe tenant ID of the guide.
GuideActionResponseA response for a guide action.
Bulk operations available for users. These endpoints return a BulkOperation that executes the job asynchronously. Progress can be tracked via the Bulk operations API.
/v1/users/bulk/identify/v1/users/bulk/preferences/v1/users/bulk/deleteIdentifies 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.
/v1/users/bulk/identifyA list of users.
A bulk operation entity.
Bulk sets the preferences for up to 1,000 users at a time. The preference set :id can be either default or a tenant.id. Learn more about per-tenant preferences. Note that this is a destructive operation and will replace any existing users' preferences with the preferences sent.
/v1/users/bulk/preferencesA request to set a preference set for a recipient.
user_idsstring[]requiredA list of user IDs.
A bulk operation entity.
Permanently deletes up to 1,000 users at a time.
/v1/users/bulk/deleteuser_idsstring[]requiredA list of user IDs.
A bulk operation entity.
A User represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
__typenamestringrequiredThe typename of the schema.
avatarstringnullableA URL for the avatar of the user.
created_atstringnullableThe creation date of the user from your system.
emailstringnullableThe primary email address for the user.
idstringrequiredThe unique identifier of the user.
namestringnullableDisplay name of the user.
phone_numberstringnullableThe [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
timezonestringnullableThe timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
updated_atstringrequiredThe timestamp when the resource was last updated.
A set of parameters to identify a user with. Does not include the user ID, as that's specified elsewhere in the request. You can supply any additional properties you'd like to upsert for the user.
avatarstringnullableA URL for the avatar of the user.
channel_dataunknownnullableChannel-specific information that's needed to deliver a notification to an end provider.
created_atstringnullableThe creation date of the user from your system.
emailstringnullableThe primary email address for the user.
localestringnullableThe locale of the user. Used for [message localization](/concepts/translations).
namestringnullableDisplay name of the user.
phone_numberstringnullableThe [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
preferencesunknownnullableA set of preferences for the user.
timezonestringnullableThe timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
A set of parameters to inline-identify a user with. Inline identifying the user will ensure that the user is available before the request is executed in Knock. It will perform an upsert for the user you're supplying, replacing any properties specified.
avatarstringnullableA URL for the avatar of the user.
channel_dataunknownnullableChannel-specific information that's needed to deliver a notification to an end provider.
created_atstringnullableThe creation date of the user from your system.
emailstringnullableThe primary email address for the user.
idstringrequiredThe unique identifier of the user.
localestringnullableThe locale of the user. Used for [message localization](/concepts/translations).
namestringnullableDisplay name of the user.
phone_numberstringnullableThe [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
preferencesunknownnullableA set of preferences for the user.
timezonestringnullableThe timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
An Object represents a resource in your system that you've stored in Knock. It can be used to send out-of-app notifications to non-user recipients (such as a public channel in a chat app), or to trigger notifications to subscribers of a non-user resource such as a shared document.
/v1/objects/{collection}/{id}/v1/objects/{collection}/{id}/v1/objects/{collection}/v1/objects/{collection}/{id}/v1/objects/{collection}/{object_id}/preferences/v1/objects/{collection}/{object_id}/preferences/{id}/v1/objects/{collection}/{object_id}/preferences/{id}/v1/objects/{collection}/{id}/schedules/v1/objects/{collection}/{id}/messages/v1/objects/{collection}/{object_id}/channel_data/{channel_id}/v1/objects/{collection}/{object_id}/channel_data/{channel_id}/v1/objects/{collection}/{object_id}/channel_data/{channel_id}/v1/objects/{collection}/{object_id}/subscriptions/v1/objects/{collection}/{object_id}/subscriptions/v1/objects/{collection}/{object_id}/subscriptionsCreates a new object or updates an existing one in the specified collection. This operation is used to identify objects with their properties, as well as optional preferences and channel data.
/v1/objects/{collection}/{id}collectionstringrequiredThe collection this object belongs to.
idstringrequiredUnique identifier for the object.
channel_dataInlineChannelDataRequestA request to set channel data for a type of channel inline.
localestringnullableThe locale of the object. Used for [message localization](/concepts/translations).
namestringnullableAn optional name for the object.
preferencesInlinePreferenceSetRequestInline 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.
timezonestringnullableThe timezone of the object. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
A custom [Object](/concepts/objects) entity which belongs to a collection.
Retrieves a specific object by its ID from the specified collection. Returns the object with all its properties.
/v1/objects/{collection}/{id}collectionstringrequiredThe collection this object belongs to.
idstringrequiredUnique identifier for the object.
A custom [Object](/concepts/objects) entity which belongs to a collection.
Returns a paginated list of objects from the specified collection. Optionally includes preference data for the objects.
/v1/objects/{collection}collectionstringrequiredThe collection this object belongs to.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
include[]string[]Includes preferences of the objects in the response.
ListObjectsResponseA paginated list of objects in a collection.
Permanently removes an object from the specified collection. This operation cannot be undone.
/v1/objects/{collection}/{id}collectionstringrequiredThe collection this object belongs to.
idstringrequiredUnique identifier for the object.
204 No ContentReturns a paginated list of preference sets for the specified object.
/v1/objects/{collection}/{object_id}/preferencesobject_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
ListObjectPreferenceSetsResponseA list of preference sets for the object
Returns the preference set for the specified object and preference set id.
/v1/objects/{collection}/{object_id}/preferences/{id}object_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
idstringrequiredUnique identifier for the preference set.
Default: "default"
A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.
Sets preferences within the given preference set. By default, this is a destructive operation and will replace any existing preferences with the preferences given. Use '__persistence_strategy': 'merge' to merge with existing preferences instead. If no object exists in the current environment for the given :collection and :object_id, Knock will create the object as part of this request. The preference set :id can be either default or a tenant.id. Learn more about per-tenant preferences.
/v1/objects/{collection}/{object_id}/preferences/{id}object_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
idstringrequiredUnique identifier for the preference set.
Default: "default"
__persistence_strategy__stringControls how the preference set is persisted. 'replace' will completely replace the preference set, 'merge' will merge with existing preferences.
One of: "merge", "replace"
categoriesunknownAn object where the key is the category and the values are the preference settings for that category.
channel_typesunknownAn object where the key is the channel type and the values are the preference settings for that channel type.
channelsunknownAn object where the key is the channel ID and the values are the preference settings for that channel ID.
commercial_subscribedbooleannullableWhether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
workflowsunknownAn object where the key is the workflow key and the values are the preference settings for that workflow.
A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.
Returns a paginated list of schedules for an object.
/v1/objects/{collection}/{id}/schedulesidstringrequiredThe ID of the object to list schedules for.
collectionstringrequiredThe collection of the object to list schedules for.
tenantstringFilter schedules by tenant id.
workflowstringFilter schedules by workflow id.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListSchedulesResponseA response containing a list of schedules.
Returns a paginated list of messages for a specific object in the given collection. Allows filtering by message status and provides various sorting options.
/v1/objects/{collection}/{id}/messagescollectionstringrequiredThe collection this object belongs to.
idstringrequiredUnique identifier for the object.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
tenantstringLimits the results to items with the corresponding tenant.
channel_idstringLimits the results to items with the corresponding channel ID.
status[]string[]Limits the results to messages with the given delivery status.
engagement_status[]string[]Limits the results to messages with the given engagement status.
message_ids[]string[]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.
workflow_categories[]string[]Limits the results to messages related to any of the provided categories.
sourcestringLimits the results to messages triggered by the given workflow key.
workflow_run_idstringLimits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request.
workflow_recipient_run_idstringLimits the results to messages for a specific recipient's workflow run.
trigger_datastringLimits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information.
inserted_at.gtestringLimits the results to messages inserted after or on the given date.
inserted_at.ltestringLimits the results to messages inserted before or on the given date.
inserted_at.gtstringLimits the results to messages inserted after the given date.
inserted_at.ltstringLimits the results to messages inserted before the given date.
ListMessagesResponseA paginated list of messages.
Returns the channel data for the specified object and channel.
/v1/objects/{collection}/{object_id}/channel_data/{channel_id}object_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
channel_idstringrequiredThe unique identifier for the channel.
Channel data for a given channel type.
Sets the channel data for the specified object and channel. If no object exists in the current environment for the given collection and object_id, Knock will create the object as part of this request.
/v1/objects/{collection}/{object_id}/channel_data/{channel_id}object_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
channel_idstringrequiredThe unique identifier for the channel.
dataobjectrequiredChannel data for a given channel type.
Channel data for a given channel type.
Unsets the channel data for the specified object and channel.
/v1/objects/{collection}/{object_id}/channel_data/{channel_id}object_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
channel_idstringrequiredThe unique identifier for the channel.
204 No ContentList 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. Determined by the mode query parameter.
/v1/objects/{collection}/{object_id}/subscriptionsobject_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
modestringMode 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.
One of: "recipient", "object"
Default: "object"
include[]string[]Additional fields to include in the response.
recipients[]RecipientReference[]Recipients to filter by (only used if mode is `object`).
objects[]ObjectReference[]Objects to filter by (only used if mode is `recipient`).
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListSubscriptionsResponseA response containing a list of subscriptions.
Add subscriptions for an object. If a subscription already exists, it will be updated. This endpoint also handles inline identifications for the recipient.
/v1/objects/{collection}/{object_id}/subscriptionsobject_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
propertiesobjectnullableThe custom properties associated with the subscription relationship.
The recipients of the subscription. You can subscribe up to 100 recipients to an object at a time.
SubscriptionsResponseA response containing a list of subscriptions.
Delete subscriptions for the specified recipients from an object. Returns the list of deleted subscriptions.
/v1/objects/{collection}/{object_id}/subscriptionsobject_idstringrequiredUnique identifier for the object.
collectionstringrequiredThe collection this object belongs to.
The recipients of the subscription. You can subscribe up to 100 recipients to an object at a time.
SubscriptionsResponseA response containing a list of subscriptions.
Bulk operations available for objects. These endpoints return a BulkOperation that executes the job asynchronously. Progress can be tracked via the Bulk operations API.
/v1/objects/{collection}/bulk/set/v1/objects/{collection}/bulk/subscriptions/add/v1/objects/{collection}/bulk/delete/v1/objects/{collection}/bulk/subscriptions/deleteBulk sets up to 1,000 objects at a time in the specified collection.
/v1/objects/{collection}/bulk/setcollectionstringrequiredThe collection this object belongs to.
objectsBulkSetObjectRequest[]requiredA list of objects.
A bulk operation entity.
Add subscriptions for all objects in a single collection. If a subscription for an object in the collection already exists, it will be updated. This endpoint also handles inline identifications for the recipient field.
/v1/objects/{collection}/bulk/subscriptions/addcollectionstringrequiredThe collection this object belongs to.
subscriptionsobject[]requiredA nested list of subscriptions.
A bulk operation entity.
Bulk deletes objects from the specified collection.
/v1/objects/{collection}/bulk/deletecollectionstringrequiredThe collection this object belongs to.
object_idsstring[]requiredList of object IDs to delete.
A bulk operation entity.
Delete subscriptions for many objects in a single collection type. If a subscription for an object in the collection doesn't exist, it will be skipped.
/v1/objects/{collection}/bulk/subscriptions/deletecollectionstringrequiredThe collection this object belongs to.
subscriptionsobject[]requiredA nested list of subscriptions.
A bulk operation entity.
A custom Object entity which belongs to a collection.
__typenamestringrequiredThe typename of the schema.
collectionstringrequiredThe collection this object belongs to.
created_atstringnullableTimestamp when the resource was created.
idstringrequiredUnique identifier for the object.
propertiesobjectThe custom properties associated with the object.
updated_atstringrequiredThe timestamp when the resource was last updated.
A custom Object entity which belongs to a collection.
channel_dataunknownAn optional set of [channel data](/managing-recipients/setting-channel-data) for the object. This is a list of `ChannelData` objects.
collectionstringrequiredThe collection this object belongs to.
created_atstringnullableTimestamp when the resource was created.
idstringrequiredUnique identifier for the object.
namestringnullableAn optional name for the object.
preferencesunknownAn optional set of [preferences](/concepts/preferences) for the object.
A Tenant a grouping with configurable settings that can be applied to a workflow when it's triggered in order to override account-level settings such as branding. Use tenants when sending a notification to user(s) that you want to configure specific brand elements for, such as a separate organization logo.
/v1/tenants/{id}/v1/tenants/{id}/v1/tenants/{id}/v1/tenantsDelete a tenant and all associated data. This operation cannot be undone.
/v1/tenants/{id}idstringrequiredThe unique identifier for the tenant.
204 No ContentGet a tenant by ID.
/v1/tenants/{id}idstringrequiredThe unique identifier for the tenant.
resolve_full_preference_settingsbooleanWhen true, merges environment-level default preferences into the tenant's `settings.preference_set` field before returning the response. Defaults to false.
A tenant entity.
Sets a tenant within an environment, performing an upsert operation. Any existing properties will be merged with the incoming properties.
/v1/tenants/{id}idstringrequiredThe unique identifier for the tenant.
resolve_full_preference_settingsbooleanWhen true, merges environment-level default preferences into the tenant's `settings.preference_set` field before returning the response. Defaults to false.
channel_dataunknownThe channel data for the tenant.
namestringnullableAn optional name for the tenant.
settingsobjectThe settings for the tenant. Includes branding and preference set.
SetTenantResponseThe response from setting a tenant.
List tenants for the current environment.
/v1/tenantstenant_idstringFilter tenants by ID.
namestringFilter tenants by name.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListTenantsResponseA response containing a list of tenants.
Bulk operations available for tenants. These endpoints return a BulkOperation that executes the job asynchronously. Progress can be tracked via the Bulk operations API.
/v1/tenants/bulk/delete/v1/tenants/bulk/setDelete up to 1,000 tenants at a time in a single operation. This operation cannot be undone.
/v1/tenants/bulk/deletetenant_ids[]string[]requiredThe IDs of the tenants to delete.
A bulk operation entity.
Set or update up to 1,000 tenants in a single operation.
/v1/tenants/bulk/setThe tenants to be upserted.
A bulk operation entity.
A tenant entity.
__typenamestringrequiredThe typename of the schema.
idstringrequiredThe unique identifier for the tenant.
namestringnullableAn optional name for the tenant.
settingsobjectnullableThe settings for the tenant. Includes branding and preference set.
A tenant to be set in the system. You can supply any additional properties on the tenant object.
channel_dataunknownThe channel data for the tenant.
idstringrequiredThe unique identifier for the tenant.
namestringnullableAn optional name for the tenant.
preferencesunknownThe preferences for the tenant.
settingsobjectThe settings for the tenant. Includes branding and preference set.
An request to set a tenant inline.
A Recipient represents a person or a non-user entity from your system, represented in Knock. They are most commonly the recipient of a notification, but can also be used to denote an actor that a notification is sent on behalf of.
A subscription object.
__typenamestringrequiredThe typename of the schema.
inserted_atstringrequiredTimestamp when the resource was created.
A custom [Object](/concepts/objects) entity which belongs to a collection.
propertiesobjectnullableThe custom properties associated with the subscription relationship.
A recipient of a notification, which is either a user or an object.
updated_atstringrequiredThe timestamp when the resource was last updated.
Preferences determine whether a recipient should receive a particular type of notification. By default all preferences are opted in unless a preference explicitly opts the recipient out of the notification.
The preference set :id can be either "default" or a tenant.id. Learn more about per-tenant preferences.
A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.
categoriesunknownAn object where the key is the category and the values are the preference settings for that category.
channel_typesunknownAn object where the key is the channel type and the values are the preference settings for that channel type.
channelsunknownAn object where the key is the channel ID and the values are the preference settings for that channel ID.
commercial_subscribedbooleannullableWhether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
idstringrequiredUnique identifier for the preference set.
workflowsunknownAn object where the key is the workflow key and the values are the preference settings for that workflow.
A request to set a preference set for a recipient.
__persistence_strategy__stringControls how the preference set is persisted. 'replace' will completely replace the preference set, 'merge' will merge with existing preferences.
One of: "merge", "replace"
categoriesunknownAn object where the key is the category and the values are the preference settings for that category.
channel_typesunknownAn object where the key is the channel type and the values are the preference settings for that channel type.
channelsunknownAn object where the key is the channel ID and the values are the preference settings for that channel ID.
commercial_subscribedbooleannullableWhether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
workflowsunknownAn object where the key is the workflow key and the values are the preference settings for that workflow.
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.
Channel type preferences.
chatunknownWhether the channel type is enabled for the preference set.
emailunknownWhether the channel type is enabled for the preference set.
httpunknownWhether the channel type is enabled for the preference set.
in_app_feedunknownWhether the channel type is enabled for the preference set.
pushunknownWhether the channel type is enabled for the preference set.
smsunknownWhether the channel type is enabled for the preference set.
A set of settings for a channel type. Currently, this can only be a list of conditions to apply.
A list of conditions to apply to a channel type.
A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
A list of conditions to apply to a specific channel.
Channel data is channel-specific information stored on a Knock user or object that's needed to deliver a notification to an end provider.
For a push channel, this includes device-specific tokens that map the recipient to the device they use, as well as device metadata for supported providers. For chat apps, such as Slack, this includes the access token used to send notifications to a customer's Slack channel.
The shape of the data payload varies depending on the channel type; you can learn more about channel data schemas here.
Channel data for a given channel type.
__typenamestringrequiredThe typename of the schema.
channel_idstringrequiredThe unique identifier for the channel.
dataobjectrequiredChannel data for a given channel type.
providerstringThe type of provider.
One of: "push_fcm", "push_apns", "push_aws_sns", "push_expo", "push_one_signal", "chat_slack", "chat_ms_teams", "chat_discord", "http_knock_webhook"
A request to set channel data for a type of channel.
dataobjectrequiredChannel data for a given channel type.
Push channel data.
tokensstring[]requiredA list of push channel tokens.
Push channel data.
devicesobject[]requiredA list of devices. Each device contains a token, and optionally a locale and timezone.
Slack channel data.
connectionsobject[]requiredList of Slack channel connections.
tokenSlackChannelDataTokenObjectnullableA Slack connection token.
AWS SNS push channel data.
target_arnsstring[]requiredA list of platform endpoint ARNs. See [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
AWS SNS push channel data.
devicesobject[]requiredA list of devices. Each device contains a target_arn, and optionally a locale and timezone.
Microsoft Teams channel data.
connectionsobject[]requiredList of Microsoft Teams connections.
ms_teams_tenant_idstringnullableMicrosoft Teams tenant ID.
Discord channel data.
connectionsobject[]requiredList of Discord channel connections.
OneSignal channel data.
player_idsstring[]requiredA list of OneSignal player IDs.
A request to set channel data for a type of channel inline.
A recipient of a notification, which is either a user or an object.
Specifies a recipient in a request. This can either be a user identifier (string), an inline user request (object), or an inline object request, which is determined by the presence of a collection property.
A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
A Schedule allows you to automatically trigger a workflow at a given time for one or more recipients. You can think of a schedule as a managed, recipient-timezone-aware cron job that Knock will run on your behalf.
/v1/schedules/v1/schedules/v1/schedules/v1/schedulesCreates one or more schedules for a workflow with the specified recipients, timing, and data. Schedules can be one-time or recurring. This endpoint also handles inline identifications for the actor, recipient, and tenant fields.
/v1/schedulesactorobjectA map of properties describing a user or an object to identify in Knock and mark as who or what performed the action.
dataobjectnullableAn 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](/developer-tools/api-logs#log-truncation) in your logs.
ending_atstringnullableThe ending date and time for the schedule.
The recipients to set the schedule for. Limited to 100 recipients per request.
repeatsScheduleRepeatRule[]The repeat rule for the schedule.
scheduled_atstringnullableThe starting date and time for the schedule.
tenantunknownThe 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.
workflowstringrequiredThe key of the workflow.
SchedulesResponseA list of schedules.
Returns a paginated list of schedules for the current environment, filtered by workflow and optionally by recipients and tenant.
/v1/schedulesworkflowstringrequiredFilter by workflow key.
recipients[]RecipientReference[]Filter by recipient references.
tenantstringFilter by tenant ID.
afterstringThe cursor to fetch entries after.
beforestringThe cursor to fetch entries before.
page_sizeintegerThe number of items per page (defaults to 50).
ListSchedulesResponseA response containing a list of schedules.
Updates one or more existing schedules with new timing, data, or other properties. All specified schedule IDs will be updated with the same values. This endpoint also handles inline identifications for the actor, recipient, and tenant fields.
/v1/schedulesactorunknownA map of properties describing a user or an object to identify in Knock and mark as who or what performed the action.
dataobjectnullableAn 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](/developer-tools/api-logs#log-truncation) in your logs.
ending_atstringnullableThe ending date and time for the schedule.
repeatsScheduleRepeatRule[]The repeat rule for the schedule.
schedule_idsstring[]requiredA list of schedule IDs.
scheduled_atstringnullableThe starting date and time for the schedule.
tenantunknownThe 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.
SchedulesResponseA list of schedules.
Permanently deletes one or more schedules identified by the provided schedule IDs. This operation cannot be undone.
/v1/schedulesschedule_idsstring[]requiredA list of schedule IDs.
SchedulesResponseA list of schedules.
Bulk operations available for schedules.
/v1/schedules/bulk/createBulk creates up to 1,000 schedules at a time. This endpoint also handles inline identifications for the actor, recipient, and tenant fields.
/v1/schedules/bulk/createschedulesobject[]requiredA list of schedules.
A bulk operation entity.
A schedule represents a recurring workflow execution.
__typenamestringThe typename of the schema.
actorunknownA map of properties describing a user or an object to identify in Knock and mark as who or what performed the action.
dataobjectnullableAn 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](/developer-tools/api-logs#log-truncation) in your logs.
idstringrequiredUnique identifier for the schedule.
inserted_atstringrequiredTimestamp when the resource was created.
last_occurrence_atstringnullableThe last occurrence of the schedule.
next_occurrence_atstringnullableThe next occurrence of the schedule.
A recipient of a notification, which is either a user or an object.
The repeat rule for the schedule.
tenantstringnullableThe 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.
updated_atstringrequiredThe timestamp when the resource was last updated.
workflowstringrequiredThe workflow the schedule is applied to.
The repeat rule for the schedule.
__typenamestringThe typename of the schema.
day_of_monthintegernullableThe day of the month to repeat the schedule.
daysstring[]nullableThe days of the week to repeat the schedule.
frequencystringrequiredThe frequency of the schedule.
One of: "daily", "weekly", "monthly", "hourly"
hoursintegernullableThe hour of the day to repeat the schedule.
intervalintegerThe interval of the schedule.
Default: 1
minutesintegernullableThe minute of the hour to repeat the schedule.
/v1/audiences/{key}/members/v1/audiences/{key}/members/v1/audiences/{key}/membersAdds one or more members to the specified audience.
/v1/audiences/{key}/memberskeystringrequiredThe key of the audience.
membersAudienceMemberRequest[]requiredA list of audience members to add. Limited to 1,000 members per request.
204 No ContentReturns a paginated list of members for the specified audience.
/v1/audiences/{key}/memberskeystringrequiredThe key of the audience.
ListAudienceMembersResponseA paginated list of audience members.
Removes one or more members from the specified audience.
/v1/audiences/{key}/memberskeystringrequiredThe key of the audience.
membersAudienceMemberRequest[]requiredA list of audience members to remove.
204 No ContentAn audience member.
__typenamestringrequiredThe typename of the schema.
added_atstringrequiredTimestamp when the resource was created.
tenantstringnullableThe unique identifier for the tenant.
A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
user_idstringrequiredThe unique identifier of the user.
A Bulk Operation is a set of changes applied across 0 or more records triggered via a call to the Knock API and performed asynchronously. The BulkOperation record represents the state of the operation, including recording the number of rows that have been modified during the operation.
Please note here: the estimated_total_rows field may have a different value to the processed_rows field due to the asynchronous nature of the operation.
/v1/bulk_operations/{id}Retrieves a bulk operation (if it exists) and displays the current state of it.
/v1/bulk_operations/{id}idstringrequiredThe ID of the bulk operation to retrieve.
A bulk operation entity.
A bulk operation entity.
__typenamestringrequiredThe typename of the schema.
completed_atstringnullableTimestamp when the bulk operation was completed.
error_countintegerThe number of failed operations.
error_itemsobject[]A list of items that failed to be processed.
estimated_total_rowsintegerrequiredThe estimated total number of rows to process.
failed_atstringnullableTimestamp when the bulk operation failed.
idstringrequiredUnique identifier for the bulk operation.
inserted_atstringrequiredTimestamp when the resource was created.
namestringrequiredThe name of the bulk operation.
processed_rowsintegerrequiredThe number of rows processed so far.
progress_pathstringThe URI to the bulk operation's progress.
started_atstringnullableTimestamp when the bulk operation was started.
statusstringrequiredThe status of the bulk operation.
One of: "queued", "processing", "completed", "failed"
success_countintegerrequiredThe number of successful operations.
updated_atstringrequiredThe timestamp when the resource was last updated.
A Provider is a channel-specific configuration that determines how a message is delivered to a recipient.
A Slack provider is a channel-specific configuration that determines how a message is delivered to a recipient via Slack.
/v1/providers/slack/{channel_id}/channels/v1/providers/slack/{channel_id}/auth_check/v1/providers/slack/{channel_id}/revoke_accessList Slack channels for a Slack workspace.
/v1/providers/slack/{channel_id}/channelschannel_idstringrequiredThe ID of the Knock Slack channel to get channels for.
access_token_objectstringrequiredA JSON encoded string containing the access token object reference.
query_options.cursorstringPaginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.
query_options.limitintegerThe maximum number of channels to return. Defaults to 200.
query_options.exclude_archivedbooleanSet to true to exclude archived channels from the list. Defaults to `true` when not explicitly provided.
query_options.typesstringMix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im. Defaults to `"public_channel,private_channel"`. If the user's Slack ID is unavailable, this option is ignored and only public channels are returned.
query_options.team_idstringEncoded team ID (T1234) to list channels in, required if org token is used.
ChannelsForSlackProviderResponseThe response from a Slack provider request, containing a list of channels.
AuthenticationErrorAuthentication error response
Check if a Slack channel is authenticated.
/v1/providers/slack/{channel_id}/auth_checkchannel_idstringrequiredThe ID of the Knock Slack channel to check.
access_token_objectstringrequiredA JSON encoded string containing the access token object reference.
SlackAuthCheckResponseThe response from a Slack auth check request.
Revoke access for a Slack channel.
/v1/providers/slack/{channel_id}/revoke_accesschannel_idstringrequiredThe ID of the Knock Slack channel to revoke access for.
access_token_objectstringrequiredA JSON encoded string containing the access token object reference.
SuccessResponseA response indicating the operation was successful.
AuthenticationErrorAuthentication error response
A Microsoft Teams provider is a channel-specific configuration that determines how a message is delivered to a recipient via Microsoft Teams.
/v1/providers/ms-teams/{channel_id}/channels/v1/providers/ms-teams/{channel_id}/teams/v1/providers/ms-teams/{channel_id}/auth_check/v1/providers/ms-teams/{channel_id}/revoke_accessList the Microsoft Teams channels within a team. By default, archived and private channels are excluded from the results.
/v1/providers/ms-teams/{channel_id}/channelschannel_idstringrequiredThe ID of the Knock Microsoft Teams channel to get channels for.
ms_teams_tenant_objectstringrequiredA JSON encoded string containing the Microsoft Teams tenant object reference.
team_idstringrequiredMicrosoft Teams team ID.
query_options.$filterstring[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to filter channels.
query_options.$selectstring[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to select specific properties.
ChannelsForMsTeamsProviderResponseThe response from a Microsoft Teams provider request, containing a list of channels.
Get a list of teams belonging to the Microsoft Entra tenant. By default, archived and private channels are excluded from the results.
/v1/providers/ms-teams/{channel_id}/teamschannel_idstringrequiredThe ID of the Knock Microsoft Teams channel to get teams for.
ms_teams_tenant_objectstringrequiredA JSON encoded string containing the Microsoft Teams tenant object reference.
query_options.$filterstring[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to filter teams.
query_options.$selectstring[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to select fields on a team.
query_options.$topinteger[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to limit the number of teams returned.
query_options.$skiptokenstring[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to retrieve the next page of results.
TeamsForMsTeamsProviderResponseThe response from a Microsoft Teams provider request, containing a list of teams.
Check if a connection to Microsoft Teams has been authorized for a given Microsoft Teams tenant object.
/v1/providers/ms-teams/{channel_id}/auth_checkchannel_idstringrequiredThe ID of the Knock Microsoft Teams channel to check.
ms_teams_tenant_objectstringrequiredA JSON encoded string containing the Microsoft Teams tenant object reference.
MsTeamsAuthCheckResponseThe response from a Microsoft Teams auth check request.
Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.
/v1/providers/ms-teams/{channel_id}/revoke_accesschannel_idstringrequiredThe ID of the Knock Microsoft Teams channel to revoke access for.
ms_teams_tenant_objectstringrequiredA JSON encoded string containing the Microsoft Teams tenant object reference.
SuccessResponseA response indicating the operation was successful.
AuthenticationErrorAuthentication error response
Resources that are shared across the API.
A condition to be evaluated.
argumentstringrequirednullableThe argument value to compare against in the condition.
operatorstringrequiredThe operator to use in the condition evaluation.
One of: "equal_to", "not_equal_to", "greater_than", "less_than", "greater_than_or_equal_to", "less_than_or_equal_to", "contains", "not_contains", "empty", "not_empty", "contains_all", "is_timestamp", "is_not_timestamp", "is_timestamp_on_or_after", "is_timestamp_before", "is_timestamp_on_or_after_date", "is_timestamp_before_date", "is_timestamp_between", "is_audience_member", "is_not_audience_member"
variablestringrequiredThe variable to be evaluated in the condition.
Pagination information for a list of resources.
__typenamestringrequiredThe typename of the schema.
afterstringnullableThe cursor to fetch entries after.
beforestringnullableThe cursor to fetch entries before.
page_sizeintegerrequiredThe number of items per page (defaults to 50).