PATCH
/
recipients
/
{recipient_id}
/
preferences
cURL
curl -X PATCH https://api.bodhveda.com/recipients/recipient_123/preferences \
  -H "Authorization: Bearer bv_xxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "target": {
      "channel": "posts",
      "topic": "post_id_123",
      "event": "new_comment"
    },
    "state": {
      "subscribed": false
    }
  }'
{
  "data": {
    "target": {
      "channel": "posts",
      "topic": "post_id_123",
      "event": "new_comment"
    },
    "state": {
      "subscribed": false,
      "inherited": false
    }
  }
}
The target here can be used to set a project pereference (global-level) or a (resource-level) preference. You can use this API to :
  • Allow recipient to update their project preference on the “Notification’s setting” screen.
  • Allow recipient to subscribe to something. Example, “Subscribe a channel on YouTube” via target like yt_channel:mr_beast:new_video with subscribed: true.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer bv_xxxxxxxxx, where bv_xxxxxxxxx is your API Key with Full access or Recipient acess scope.

Path Parameters

recipient_id
string
required

The unique identifier of the recipient.

Body

application/json

Response

200 - application/json

Updated subscription state for the target

The response is of type any.