cURL
curl -X DELETE https://api.bodhveda.com/recipients/recipient_123/notifications \
-H "Authorization: Bearer bv_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"ids": [123, 456]
}'import { Bodhveda } from "@bodhveda/js";
const bodhveda = new Bodhveda("bv_xxxxxxxxx");
const res = await bodhveda.recipients.notifications.delete("recipient_123", {
ids: [123, 456],
});
// res.deleted_countimport (
"context"
bodhveda "github.com/MudgalLabs/bodhveda/sdk/go"
)
ctx := context.Background()
client := bodhveda.NewClient("bv_xxxxxxxxx", nil)
res, _ := client.Recipients.Notifications.Delete(ctx, "recipient_123", &bodhveda.DeleteNotificationsRequest{
IDs: []int{123, 456},
})
// res.DeletedCountimport { useDeleteNotifications } from "@bodhveda/react";
// Requires a <BodhvedaProvider recipientID="recipient_123"> higher in the tree.
function Delete({ ids }: { ids: number[] }) {
const { mutate } = useDeleteNotifications();
return <button onClick={() => mutate({ ids })}>Delete</button>;
}{
"deleted_count": 2
}Notifications
Delete notifications
Deletes one or more notifications for the specified recipient.
DELETE
/
recipients
/
{recipient_id}
/
notifications
cURL
curl -X DELETE https://api.bodhveda.com/recipients/recipient_123/notifications \
-H "Authorization: Bearer bv_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"ids": [123, 456]
}'import { Bodhveda } from "@bodhveda/js";
const bodhveda = new Bodhveda("bv_xxxxxxxxx");
const res = await bodhveda.recipients.notifications.delete("recipient_123", {
ids: [123, 456],
});
// res.deleted_countimport (
"context"
bodhveda "github.com/MudgalLabs/bodhveda/sdk/go"
)
ctx := context.Background()
client := bodhveda.NewClient("bv_xxxxxxxxx", nil)
res, _ := client.Recipients.Notifications.Delete(ctx, "recipient_123", &bodhveda.DeleteNotificationsRequest{
IDs: []int{123, 456},
})
// res.DeletedCountimport { useDeleteNotifications } from "@bodhveda/react";
// Requires a <BodhvedaProvider recipientID="recipient_123"> higher in the tree.
function Delete({ ids }: { ids: number[] }) {
const { mutate } = useDeleteNotifications();
return <button onClick={() => mutate({ ids })}>Delete</button>;
}{
"deleted_count": 2
}Authorizations
Bearer authentication header of the form Bearer bv_xxxxxxxxx, where bv_xxxxxxxxx is your API Key with Full access scope.
Path Parameters
Unique external identifier for the recipient.
Body
application/json
Array of notification IDs to delete. If omitted, all will be deleted.
Response
200 - application/json
Successfully deleted notifications
Number of notifications deleted.