Subscriptions
Objects
List subscriptions
List 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.
get/v1/objects/{collection}/{object_id}/subscriptions
Path parameters
object_idstring required
Unique identifier for the object.
collectionstring required
The collection this object belongs to.
Query parameters
mode'recipient' | 'object'
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.
include[]string[]
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"
}
]afterstring
The cursor to fetch entries after.
beforestring
The cursor to fetch entries before.
page_sizeinteger
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
}
}