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

# Bulk Delete Leads

> Delete leads in bulk by their external IDs. Leads that do not exist are counted as `notFound` but do not cause the request to fail.

**Permission:** `leads:sync_delete`
**Rate limit:** 50 requests per minute




## OpenAPI

````yaml DELETE /api/leads/sync
openapi: 3.1.0
info:
  title: Lead Sync API
  description: >
    Bulk lead synchronization endpoints for creating, updating, and deleting
    leads from external systems. These endpoints have stricter rate limits (50
    req/min) compared to standard API endpoints.
  version: 1.0.0
servers:
  - url: https://api.naturalead.ai
    description: Production
  - url: http://localhost:3001
    description: Local development
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /api/leads/sync:
    delete:
      tags:
        - Lead Sync
      summary: Bulk delete leads
      description: >
        Delete leads in bulk by their external IDs. Leads that do not exist are
        counted as `notFound` but do not cause the request to fail.


        **Permission:** `leads:sync_delete`

        **Rate limit:** 50 requests per minute
      operationId: bulkDeleteLeads
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - lead_ids
              properties:
                lead_ids:
                  type: array
                  description: Array of external lead IDs to delete.
                  items:
                    type: string
      responses:
        '200':
          description: Delete operation completed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    description: Total number of IDs processed.
                  deleted:
                    type: integer
                    description: Number of leads successfully deleted.
                  notFound:
                    type: integer
                    description: Number of IDs that did not match any existing lead.
        '400':
          description: Invalid request payload.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key passed via the `X-API-Key` header.
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token passed via the `Authorization` header.

````