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

# Bulk Delete Transformations

> Delete several Queries, Notebooks, or Histories at once with a single request.

Deletes several transformations in one call. The request body takes a list of pipeline **slugs**, not transformation IDs.

<Note>
  Queries, Notebooks, and Histories are all served by the transformations endpoints, so a single request may mix all three. They differ only by `type`: `sql` for a Query, `python` or `pyspark` for a Notebook, and `scd_type_2` for a History.
</Note>

<Note>
  This endpoint uses `POST` rather than `DELETE` because OpenAPI does not document a request body on `DELETE`. It deletes — it does not create anything.
</Note>

## Request body

| Parameter         | Type             | Required | Description                             |
| ----------------- | ---------------- | -------- | --------------------------------------- |
| `transformations` | array of strings | Yes      | Slugs of the transformations to delete. |

## Response

Returns `200 OK` with a summary of what the action did, rather than the deleted objects.

```json theme={null}
{
  "message": "Successfully deleted 2 transformations"
}
```

<Warning>
  The operation is all-or-nothing: nothing is deleted unless **every** listed transformation passes the same checks a single [Delete Transformation](/platform-api/transformations/delete) call would apply. There is no undelete endpoint, so deletion cannot be reversed through the Platform API.
</Warning>

## Example

```bash theme={null}
curl --request POST \
  --url https://api.nekt.ai/api/v1/transformations/bulk-delete/ \
  --header "x-api-key: YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "transformations": ["silver-orders", "gold-revenue-daily"]
  }'
```

## Python example: delete every transformation carrying a given tag

```python theme={null}
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.nekt.ai"

headers = {
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
}

transformations = requests.get(
    f"{BASE_URL}/api/v1/transformations/",
    headers=headers,
    params={"expand[]": "tags"},
).json()

sandbox_slugs = [
    t["slug"]
    for t in transformations["results"]
    if any(tag["name"] == "sandbox" for tag in t.get("tags", []))
]

response = requests.post(
    f"{BASE_URL}/api/v1/transformations/bulk-delete/",
    headers=headers,
    json={"transformations": sandbox_slugs},
)
print(response.json()["message"])
```

## Authentication

This endpoint requires an [API key](/platform-api/introduction#create-an-api-key) in the `x-api-key` header. MCP tokens cannot delete resources and are rejected with `403 Forbidden`.

## Related

* [Delete Transformation](/platform-api/transformations/delete) — remove a single transformation.
* [List Transformations](/platform-api/transformations/list) — collect the slugs to send.


## OpenAPI

````yaml POST /api/v1/transformations/bulk-delete/
openapi: 3.0.3
info:
  title: Nekt API
  version: v1
  description: Nekt API Documentation
  contact:
    email: support@nekt.ai
servers:
  - url: https://api.nekt.ai
security: []
paths:
  /api/v1/transformations/bulk-delete/:
    post:
      tags:
        - v1
      description: >-
        Delete several transformations at once.


        All-or-nothing: nothing is deleted unless every listed transformation
        passes

        the same checks a single `DELETE` would apply.
      operationId: v1_transformations_bulk_delete_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkTransformationInput'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BulkTransformationInput'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BulkTransformationInput'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionResponse'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BulkTransformationInput:
      type: object
      properties:
        transformations:
          type: array
          items:
            type: string
          default: []
          description: Slugs of the transformations to act on.
    BulkActionResponse:
      type: object
      description: The summary a bulk action returns instead of the affected objects.
      properties:
        message:
          type: string
          description: Human-readable summary of what the bulk action did.
      required:
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Format: ''x-api-key: api_key'''

````