Recipients
A [Recipient](/concepts/recipients) 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.
Recipients
#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.
Subscriptions
#Subscription
#A subscription object.
Attributes
The typename of the schema.
Timestamp when the resource was created.
A custom Object entity which belongs to a collection.
The typename of the schema.
The collection this object belongs to.
Timestamp when the resource was created.
Unique identifier for the object.
The custom properties associated with the object.
The timestamp when the resource was last updated.
The custom properties associated with the subscription relationship.
A recipient of a notification, which is either a user or an object.
The timestamp when the resource was last updated.
Preferences
#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.
PreferenceSet
#A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.
Attributes
An object where the key is the category and the values are the preference settings for that category.
An object where the key is the channel type and the values are the preference settings for that channel type.
An object where the key is the channel ID and the values are the preference settings for that channel ID.
Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
Unique identifier for the preference set.
An object where the key is the workflow key and the values are the preference settings for that workflow.
PreferenceSetRequest
#A request to set a preference set for a recipient.
Attributes
Controls how the preference set is persisted. 'replace' will completely replace the preference set, 'merge' will merge with existing preferences.
An object where the key is the category and the values are the preference settings for that category.
An object where the key is the channel type and the values are the preference settings for that channel type.
An object where the key is the channel ID and the values are the preference settings for that channel ID.
Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
An object where the key is the workflow key and the values are the preference settings for that workflow.
InlinePreferenceSetRequest
#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.
Attributes
Any additional custom properties.
PreferenceSetChannelTypes
#Channel type preferences.
Attributes
Whether the channel type is enabled for the preference set.
Whether the channel type is enabled for the preference set.
Whether the channel type is enabled for the preference set.
Whether the channel type is enabled for the preference set.
Whether the channel type is enabled for the preference set.
Whether the channel type is enabled for the preference set.
PreferenceSetChannelTypeSetting
#A set of settings for a channel type. Currently, this can only be a list of conditions to apply.
Attributes
A list of conditions to apply to a channel type.
The argument value to compare against in the condition.
The operator to use in the condition evaluation.
The variable to be evaluated in the condition.
PreferenceSetChannelSetting
#A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
Attributes
A list of conditions to apply to a specific channel.
The argument value to compare against in the condition.
The operator to use in the condition evaluation.
The variable to be evaluated in the condition.
Channel data
#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.
ChannelData
#Channel data for a given channel type.
Attributes
The typename of the schema.
The unique identifier for the channel.
Channel data for a given channel type.
The type of provider.
ChannelDataRequest
#A request to set channel data for a type of channel.
Attributes
Channel data for a given channel type.
PushChannelDataTokensOnly
#Push channel data.
Attributes
A list of push channel tokens.
PushChannelDataDevicesOnly
#Push channel data.
Attributes
A list of devices. Each device contains a token, and optionally a locale and timezone.
The locale of the object. Used for message localization.
The timezone of the object. Must be a valid tz database time zone string. Used for recurring schedules.
The device token to send the push notification to.
SlackChannelData
#Slack channel data.
Attributes
List of Slack channel connections.
A Slack connection token.
A Slack access token.
AWSSNSPushChannelDataTargetARNsOnly
#AWS SNS push channel data.
Attributes
A list of platform endpoint ARNs. See Setting up an Amazon SNS platform endpoint for mobile notifications.
AWSSNSPushChannelDataDevicesOnly
#AWS SNS push channel data.
Attributes
A list of devices. Each device contains a target_arn, and optionally a locale and timezone.
The locale of the object. Used for message localization.
The ARN of a platform endpoint associated with a platform application and a device token. See Setting up an Amazon SNS platform endpoint for mobile notifications.
The timezone of the object. Must be a valid tz database time zone string. Used for recurring schedules.
MsTeamsChannelData
#Microsoft Teams channel data.
Attributes
List of Microsoft Teams connections.
Microsoft Teams tenant ID.
DiscordChannelData
#Discord channel data.
Attributes
List of Discord channel connections.
OneSignalChannelDataPlayerIdsOnly
#OneSignal channel data.
Attributes
A list of OneSignal player IDs.
InlineChannelDataRequest
#A request to set channel data for a type of channel inline.
Attributes
Any additional custom properties.
Recipient
#A recipient of a notification, which is either a user or an object.
Attributes
A recipient of a notification, which is either a user or an object.
RecipientRequest
#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.
Attributes
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.
RecipientReference
#A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
Attributes
A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).