Skip to main content
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
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.posthook.io/llms.txt

Use this file to discover all available pages before exploring further.

Cancel pending hooks in bulk. Cancelled hooks will not be delivered. Bulk actions availability may vary by plan.

SDK Methods

LanguageBy IDsBy Filter
TypeScriptposthook.hooks.bulk.cancel({ hookIDs })posthook.hooks.bulk.cancel({ startTime, endTime, limit })
Pythonclient.hooks.bulk.cancel(hook_ids)client.hooks.bulk.cancel_by_filter(start_time, end_time, limit)
Goclient.Hooks.Bulk().Cancel(ctx, &BulkActionByIDs{})client.Hooks.Bulk().CancelByFilter(ctx, &BulkActionByFilter{})
All methods return { affected: number } — the count of hooks that were cancelled.

Authorizations

X-API-Key
string
header
required

Body

application/json

Bulk action request. Provide either hookIDs for specific hooks, or startTime/endTime/limit for a filter-based selection.

hookIDs
string[]

Array of hook IDs to act on (max 1000). Mutually exclusive with filter parameters.

Maximum array length: 1000
startTime
string<date-time>

Start of time range filter (RFC 3339). Use with endTime and limit.

endTime
string<date-time>

End of time range filter (RFC 3339). Use with startTime and limit.

limit
integer

Maximum number of hooks to act on (1-1000). Required with time range filters.

Required range: 1 <= x <= 1000
endpointKey
string

Optional. Filter by endpoint key.

sequenceID
string

Optional. Filter by sequence ID.

Response

200 - application/json

Bulk cancel initiated

data
object