List feed items
Returns 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:
- When making this call from a client-side environment, use your publishable key along with a user token.
- This endpoint’s rate limit is always scoped per-user and per-environment. This is true even for requests made without a signed user token.
- Any attachments present in trigger data are automatically excluded from both the data and activities fields of UserInAppFeedResponse.
Path parameters
The unique identifier of the user.
The unique identifier for the channel.
Query parameters
The status of the feed items.
The workflow key associated with the message in the feed.
The tenant associated with the feed items.
Whether the feed items have a tenant.
The workflow categories of the feed items.
The archived status of the feed items.
The trigger data of the feed items (as a JSON string).
The 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.
Comma-separated list of field paths to exclude from the response. Use dot notation for nested fields (e.g., entries.archived_at). Limited to 3 levels deep.
The mode to render the feed items in. Can be compact or rich. Defaults to rich. When mode is compact, feed items will not have activities and total_activities fields; the data field will not include nested arrays and objects; and the actors field will only have up to one actor.
The cursor to fetch entries after.
The cursor to fetch entries before.
The number of items per page (defaults to 50).
Limits the results to items inserted after the given date.
Limits the results to items inserted after or on the given date.
Limits the results to items inserted before the given date.
Limits the results to items inserted before or on the given date.
Response
OK
Example response
{
"entries": [
{
"__typename": "FeedItem",
"activities": [
{
"__typename": "Activity",
"actor": null,
"data": {
"foo": "bar"
},
"id": "2FVHPWxRqNuXQ9krvNP5A6Z4qXe",
"inserted_at": "2024-01-01T00:00:00Z",
"recipient": {
"__typename": "User",
"avatar": null,
"created_at": null,
"email": "jane@ingen.net",
"id": "jane",
"name": "Jane Doe",
"phone_number": null,
"timezone": null,
"updated_at": "2024-05-22T12:00:00Z"
},
"updated_at": "2024-01-01T00:00:00Z"
}
],
"actors": [
{
"__typename": "User",
"avatar": null,
"created_at": null,
"email": "jane@ingen.net",
"id": "jane",
"name": "Jane Doe",
"phone_number": null,
"timezone": null,
"updated_at": "2024-05-22T12:00:00Z"
}
],
"blocks": [
{
"content": "This is a message in an app feed",
"name": "body",
"rendered": "<p>This is a message in an app feed</p>",
"type": "markdown"
}
],
"data": {
"foo": "bar"
},
"id": "2FVHPWxRqNuXQ9krvNP5A6Z4qXe",
"inserted_at": "2021-01-01T00:00:00Z",
"source": {
"__typename": "Workflow",
"categories": [
"collaboration"
],
"key": "my_source",
"version_id": "123e4567-e89b-12d3-a456-426614174000"
},
"tenant": "acme_corp",
"total_activities": 10,
"total_actors": 5,
"updated_at": "2021-01-01T00:00:00Z"
}
],
"meta": {
"__typename": "FeedMetadata",
"total_count": 100,
"unread_count": 10,
"unseen_count": 5
},
"page_info": {
"__typename": "PageInfo",
"after": null,
"before": null,
"page_size": 25
},
"vars": {
"foo": "bar"
}
}