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.Authorizations
Body
application/json
Bulk action request. Provide either hookIDs for specific hooks, or startTime/endTime/limit for a filter-based selection.
Array of hook IDs to act on (max 1000). Mutually exclusive with filter parameters.
Maximum array length:
1000Start of time range filter (RFC 3339). Use with endTime and limit.
End of time range filter (RFC 3339). Use with startTime and limit.
Maximum number of hooks to act on (1-1000). Required with time range filters.
Required range:
1 <= x <= 1000Optional. Filter by endpoint key.
Optional. Filter by sequence ID.
Response
200 - application/json
Bulk cancel initiated
Show child attributes
Show child attributes
Was this page helpful?