List subscriptions
Changed onList 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.
Request
- Base URL: https://api.knock.app
- URL: https://api.knock.app/v1/objects/{collection}/{object_id}/subscriptions
- Auth: HTTP bearer
Path parameters
Unique identifier for the object.
The collection this object belongs to.
Query parameters
Mode of the request. recipient to list the objects that the provided object is subscribed to, object to list the recipients that subscribe to the provided object.
Additional fields to include in the response.
Recipients to filter by (only used if mode is object).
[ "user_123" ]
Objects to filter by (only used if mode is recipient).
[
{
"collection": "projects",
"id": "project_123"
}
]The cursor to fetch entries after.
The cursor to fetch entries before.
The number of items per page (defaults to 50).
Response
OK
Example response
{
"entries": [
{
"__typename": "Subscription",
"inserted_at": "2021-01-01T00:00:00Z",
"object": {
"__typename": "Object",
"collection": "assets",
"created_at": null,
"id": "specimen_25",
"properties": {
"classification": "Theropod",
"config": {
"biz": "baz",
"foo": "bar"
},
"name": "Velociraptor",
"status": "contained"
},
"updated_at": "2024-05-22T12: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": "2021-01-01T00:00:00Z"
}
],
"page_info": {
"__typename": "PageInfo",
"after": null,
"before": null,
"page_size": 25
}
}Changes
- warning
deleted the
queryrequest parameterinclude[] - info
added the new optional
queryrequest parameterinclude
- warning
- info
added the optional property
///to the response with the status - info
added the optional property
////to the response with the status
- info