> ## Documentation Index
> Fetch the complete documentation index at: https://trigger.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Abort bulk action

> Abort a pending bulk action so it stops processing additional runs. Runs already processed by the action are not undone.



## OpenAPI

````yaml v3-openapi POST /api/v1/bulk-actions/{bulkActionId}/abort
openapi: 3.1.0
info:
  title: Trigger.dev v3 REST API
  description: >-
    The REST API lets you trigger and manage runs on Trigger.dev. You can
    trigger a run, get the status of a run, and get the results of a run. 
  version: 2024-04
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.trigger.dev
    description: Trigger.dev API
security: []
paths:
  /api/v1/bulk-actions/{bulkActionId}/abort:
    post:
      tags:
        - bulk-actions
      summary: Abort bulk action
      description: >-
        Abort a pending bulk action so it stops processing additional runs. Runs
        already processed by the action are not undone.
      operationId: abort_bulk_action_v1
      parameters:
        - $ref: '#/components/parameters/bulkActionId'
      responses:
        '200':
          description: Bulk action aborted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AbortBulkActionResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized request
        '404':
          description: Resource not found
      security:
        - secretKey: []
      x-codeSamples:
        - lang: typescript
          source: |-
            import { runs } from "@trigger.dev/sdk";

            const aborted = await runs.bulk.abort("bulk_1234");

            console.log(aborted.id);
components:
  parameters:
    bulkActionId:
      in: path
      name: bulkActionId
      required: true
      schema:
        type: string
      description: The ID of a bulk action, starts with `bulk_`.
      example: bulk_1234
  schemas:
    AbortBulkActionResponse:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          example: bulk_1234
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: Something went wrong
      required:
        - error
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >
        Use a named environment API key. It starts with `tr_dev_sk_`,
        `tr_prod_sk_`, `tr_stg_sk_`, etc.


        Create a named API key in the API Keys section of your Trigger.dev
        project dashboard. Choose the narrowest access preset that supports your
        integration.


        Our TypeScript SDK will default to using the value of the
        `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using
        the SDK in a different environment, you can set the key using the
        `configure` function.


        ```typescript

        import { configure } from "@trigger.dev/sdk";


        configure({ accessToken: "tr_dev_sk_1234" });

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.