---
title: "Create events bulk cancel"
method: POST
path: "/bulk/events/cancel"
tags: ["Bulk cancel events"]
---

# Create events bulk cancel

`POST /bulk/events/cancel`

This endpoint creates and starts an events bulk cancel using the provided query.

## Request body

- object
  - `query` object — Filter properties for the events to be included in the bulk cancel
    - `id` union — Filter by event IDs
      - string — Event ID
      - string[]
    - `status` union — Lifecyle status of the event
      - 'SCHEDULED' | 'QUEUED' | 'HOLD' | 'SUCCESSFUL' | 'FAILED' | 'CANCELLED'
      - EventStatus[]
    - `webhook_id` union — Filter by connection (webhook) IDs
      - string — Connection (webhook) ID
      - string[]
    - `destination_id` union — Filter by destination IDs
      - string — Destination ID
      - string[]
    - `delivery_group` union — Filter by delivery group; null matches events without a delivery group
      - string
      - string[]
    - `source_id` union — Filter by source IDs
      - string — Source ID
      - string[]
    - `attempts` union — Filter by number of attempts
      - integer
      - Operators
        - `gt` string, date-time, nullable
        - `gte` string, date-time, nullable
        - `le` string, date-time, nullable
        - `lte` string, date-time, nullable
        - `any` boolean
        - `all` boolean
    - `response_status` union — Filter by HTTP response status code
      - integer
      - Operators
        - `gt` string, date-time, nullable
        - `gte` string, date-time, nullable
        - `le` string, date-time, nullable
        - `lte` string, date-time, nullable
        - `any` boolean
        - `all` boolean
      - integer[]
    - `successful_at` union — Filter by `successful_at` date using a date operator
      - string, date-time
      - Operators
        - `gt` string, date-time, nullable
        - `gte` string, date-time, nullable
        - `le` string, date-time, nullable
        - `lte` string, date-time, nullable
        - `any` boolean
        - `all` boolean
    - `created_at` union — Filter by `created_at` date using a date operator
      - string, date-time
      - Operators
        - `gt` string, date-time, nullable
        - `gte` string, date-time, nullable
        - `le` string, date-time, nullable
        - `lte` string, date-time, nullable
        - `any` boolean
        - `all` boolean
    - `error_code` union — Filter by error code code
      - 'BAD_RESPONSE' | 'CANCELLED' | 'TIMEOUT' | 'NOT_FOUND' | 'CANCELLED_PAST_RETENTION' | 'CONNECTION_REFUSED' | 'CONNECTION_RESET' | 'MISSING_URL' | 'CLI' | 'CLI_UNAVAILABLE' | 'SELF_SIGNED_CERT' | 'ERR_TLS_CERT_ALTNAME_INVALID' | 'ERR_SSL_WRONG_VERSION_NUMBER' | 'NETWORK_ERROR' | 'NETWORK_REQUEST_CANCELED' | 'NETWORK_UNREACHABLE' | 'TOO_MANY_REDIRECTS' | 'INVALID_CHARACTER' | 'INVALID_URL' | 'SSL_ERROR_CA_UNKNOWN' | 'DATA_ARCHIVED' | 'SSL_CERT_EXPIRED' | 'BULK_RETRY_CANCELLED' | 'DNS_LOOKUP_FAILED' | 'HOST_UNREACHABLE' | 'INTERNAL_ERROR' | 'PROTOCOL_ERROR' | 'PAYLOAD_MISSING' | 'UNABLE_TO_GET_ISSUER_CERT' | 'SOCKET_CLOSED' | 'OAUTH2_HANDSHAKE_FAILED' | 'Z_DATA_ERROR' | 'UNKNOWN' — Error code of the delivery attempt
      - AttemptErrorCodes[]
    - `cli_id` union — Filter by CLI IDs. `?[any]=true` operator for any CLI.
      - string
      - object
        - `any` boolean
        - `all` boolean
      - string[]
    - `last_attempt_at` union — Filter by `last_attempt_at` date using a date operator
      - string, date-time
      - Operators
        - `gt` string, date-time, nullable
        - `gte` string, date-time, nullable
        - `le` string, date-time, nullable
        - `lte` string, date-time, nullable
        - `any` boolean
        - `all` boolean
    - `next_attempt_at` union — Filter by `next_attempt_at` date using a date operator
      - string, date-time
      - Operators
        - `gt` string, date-time, nullable
        - `gte` string, date-time, nullable
        - `le` string, date-time, nullable
        - `lte` string, date-time, nullable
        - `any` boolean
        - `all` boolean
    - `search_term` string — URL Encoded string of the value to match partially to the body, headers, parsed_query or path
    - `headers` union — URL Encoded string of the JSON to match to the data headers
      - string
      - object
    - `body` union — URL Encoded string of the JSON to match to the data body
      - string
      - object
    - `parsed_query` union — URL Encoded string of the JSON to match to the parsed query (JSON representation of the query)
      - string
      - object
    - `path` string — URL Encoded string of the value to match partially to the path
    - `cli_user_id` union
      - string
      - string[]
    - `issue_id` union
      - string
      - string[]
    - `event_data_id` union
      - string
      - string[]
    - `bulk_retry_id` union
      - string
      - string[]

## Response `200`

A single events bulk cancel

- BatchOperation
  - `id` string, required — ID of the bulk retry
  - `team_id` string, required — ID of the project
  - `type` string, required — Type of the bulk operation
  - `query` union — Query object to filter records
    - object
    - string, nullable
  - `created_at` string, date-time, required — Date the bulk retry was created
  - `updated_at` string, date-time, required — Last time the bulk retry was updated
  - `cancelled_at` string, date-time, nullable — Date the bulk retry was cancelled
  - `completed_at` string, date-time, nullable — Date the bulk retry was completed
  - `estimated_batch` integer, nullable — Number of batches required to complete the bulk retry
  - `estimated_count` integer, nullable — Number of estimated events to be retried
  - `processed_batch` integer, nullable — Number of batches currently processed
  - `completed_count` integer, nullable — Number of events that were successfully delivered
  - `in_progress` boolean, required — Indicates if the bulk retry is currently in progress
  - `progress` number, float, nullable — Progression of the batch operations, values 0 - 1
  - `failed_count` integer, nullable — Number of events that failed to be delivered
  - `number` number, float, nullable

## Other responses

- `400` — Bad Request
- `422` — Unprocessable Entity

---

[API](https://skmtc.dev/hookdeck/apis/hookdeck-admin-rest-api.md) · [All operations](https://skmtc.dev/hookdeck/apis/hookdeck-admin-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hookdeck/hookdeck-admin-rest-api/revisions/091808eac7fa/schema)
