Add subscriptions
Changed onAdd subscriptions for an object. If a subscription already exists, it will be updated. This endpoint also handles inline identifications for the recipient.
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.
Request body
Example request
{
"properties": {
"key": "value"
},
"recipients": [
"user_1",
"user_2"
]
}Response
OK
Example response
[
{
"__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"
}
]Changes
- info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
//////////
- info
- breaking
the request property
//////became not nullable - breaking
the request property
//////became not nullable - breaking
the
//////request property type changed frombooleanto no type - breaking
the
//////request property type changed frombooleanto no type - info
added
subschema #1subschema #3to the//////request propertyanyOflist - info
added
subschema #1subschema #3to the//////request propertyanyOflist
- breaking