Skip to main content
POST
/
notifications
/
send
cURL
curl -X POST https://api.bodhveda.com/notifications/send \
  -H "Authorization: Bearer bv_xxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "recipient_id": "recipient_123",
    "target": {
      "channel": "posts",
      "topic": "post_id_123",
      "event": "new_comment"
    },
    "payload": {
      "title": "Elon, Zuck and others commented on your post.",
      "post_url": "/posts/post_id_123#comments"
    }
  }'
{
  "message": "Direct notification sent successfully to recipient recipient_123.",
  "data": {
    "notification": {
      "id": 42069,
      "recipient_id": "recipient_123",
      "payload": {
        "title": "Elon, Zuck and others commented on your post.",
        "post_url": "/posts/post_id_123#comments"
      },
      "broadcast_id": null,
      "target": {
        "channel": "posts",
        "topic": "post_id_123",
        "event": "new_comment"
      },
      "read": false,
      "opened": false,
      "created_at": "2025-11-07T05:31:56Z",
      "updated_at": "2025-11-07T05:31:56Z"
    },
    "broadcast": null
  }
}
Send a direct notification to a specific recipient or send a broadcast to all recipients subscribed to a target.
  • Direct: If recipient_id is set, target is optional.
  • Broadcast: If recipient_id is null, target is required.

Authorizations

Authorization
string
header
required

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

Body

application/json
payload
object
required

Arbitrary JSON payload for the notification.

recipient_id
string | null

The id of a recipient.

  • If null → this is treated as a broadcast notification.
  • If set → this is a direct notification to that recipient.

💡 If no recipient exists with the recipient_id, Bodhveda will create a new recipient with that recipient_id.

target
object

A target is the structure used to describe who should get a notification and how it should be categorized.

Response

200 - application/json

Notification response