curl --request POST \
--url https://api.posthook.io/v1/hooks/bulk/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"hookIDs": [
"e5405623-2c1c-460e-9737-c884f7f59035",
"a1b2c3d4-5678-90ab-cdef-1234567890ab"
]
}
'{
"data": {
"affected": 2
}
}Endpoints
Bulk Cancel Hooks
Cancel pending hooks in bulk. Provide specific hook IDs or use time-range filters.
POST
/
hooks
/
bulk
/
cancel
curl --request POST \
--url https://api.posthook.io/v1/hooks/bulk/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"hookIDs": [
"e5405623-2c1c-460e-9737-c884f7f59035",
"a1b2c3d4-5678-90ab-cdef-1234567890ab"
]
}
'{
"data": {
"affected": 2
}
}Cancel pending hooks in bulk. Cancelled hooks will not be delivered. Bulk actions availability may vary by plan.
All methods return
SDK Methods
| Language | By IDs | By Filter |
|---|---|---|
| TypeScript | posthook.hooks.bulk.cancel({ hookIDs }) | posthook.hooks.bulk.cancel({ startTime, endTime, limit }) |
| Python | client.hooks.bulk.cancel(hook_ids) | client.hooks.bulk.cancel_by_filter(start_time, end_time, limit) |
| Go | client.Hooks.Bulk().Cancel(ctx, &BulkActionByIDs{}) | client.Hooks.Bulk().CancelByFilter(ctx, &BulkActionByFilter{}) |
{ affected: number } — the count of hooks that were cancelled.Body
application/json
Bulk action request. Provide either hookIDs for specific hooks, or startTime/endTime/limit for a filter-based selection.
Was this page helpful?