> ## 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 Sources

> Delete several sources at once with a single request.

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

<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                     |
| --------- | ---------------- | -------- | ------------------------------- |
| `sources` | array of strings | Yes      | Slugs of the sources 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 sources"
}
```

<Warning>
  The operation is all-or-nothing: nothing is deleted unless **every** listed source passes the same checks a single [Delete Source](/platform-api/sources/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/sources/bulk-delete/ \
  --header "x-api-key: YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "sources": ["facebook-ads", "google-ads"]
  }'
```

## Python example: delete every source 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",
}

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

deprecated_slugs = [
    s["slug"]
    for s in sources["results"]
    if any(tag["name"] == "deprecated" for tag in s.get("tags", []))
]

response = requests.post(
    f"{BASE_URL}/api/v1/sources/bulk-delete/",
    headers=headers,
    json={"sources": deprecated_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 Source](/platform-api/sources/delete) — remove a single source.
* [List Sources](/platform-api/sources/list) — collect the slugs to send.


## OpenAPI

````yaml POST /api/v1/sources/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/sources/bulk-delete/:
    post:
      tags:
        - v1
      description: >-
        Delete several sources at once.


        All-or-nothing: nothing is deleted unless every listed source passes the
        same

        checks a single `DELETE` would apply.
      operationId: v1_sources_bulk_delete_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkSourceInput'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BulkSourceInput'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BulkSourceInput'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionResponse'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BulkSourceInput:
      type: object
      properties:
        sources:
          type: array
          items:
            type: string
          default: []
          description: Slugs of the sources 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'''

````