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

# Delete Lead

> Permanently delete a lead and the personal data Octanist keeps about it by Octanist ID with DELETE /api/leads/{id}, for example for a GDPR erasure request.

Delete one lead and the personal data Octanist keeps about it. This cannot be undone.

Use it for data erasure requests, or to remove test leads. Locked leads, which are over your plan's lead limit, can be deleted too, so an erasure request does not have to wait for an upgrade.

### What is removed

* **Deleted:** the lead, its activity history and notes, its raw form submissions, and status updates that were waiting for its email address, phone number or external ID.
* **Phone calls** stay in your call reports, but without the caller's number, the recording, the transcript or the summary. The recording is also deleted from our telephony provider.
* **Website visits** stay in your traffic reports (date, pages, UTMs, channel, country and device), but without the IP address, user agent, cookie ID, click IDs or full referrer. The visitor's earlier visits are anonymised too, unless another lead came from the same browser.
* **Meta, TikTok and Snapchat lead-form submissions** lose every field the person filled in. Octanist only keeps the platform's lead ID, so a repeated delivery from the platform cannot create the lead again.
* **CRM records** linked through an integration keep only the record's ID, stage and amount.

Everything is removed in one go: if the request fails, nothing is deleted and you can safely retry.

### What is not removed

Data that already left Octanist stays where it was sent. Remove it there if your erasure request covers it:

* Conversions already sent to your ad platforms
* Leads sent to your CRM, Zapier or BigQuery export
* Email notifications that were already sent
* Conversations with the AI assistant that mention the lead

## Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | string | Yes | Octanist lead ID. To find the ID by your own identifier, use `GET /api/leads?externalId=...` |

## Example Request

```bash theme={null}
curl -X DELETE \
  -H "X-API-KEY: your_api_key" \
  "https://octanist.com/api/leads/lead_abc123"
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "lead_abc123",
    "deleted": true
  },
  "meta": {
    "requestId": "req_a1b2c3d4e5f6",
    "timestamp": "2026-03-10T12:00:00.000Z"
  }
}
```

## Error Responses

| Status | Code | Description |
| - | - | - |
| 401 | `UNAUTHORIZED` | Missing or invalid API key |
| 403 | `FORBIDDEN` | A [read-only API key](https://octanist.com/docs/api-reference/authentication.md#key-access), or the organization is a read-only demo |
| 404 | `NOT_FOUND` | No lead with this ID in your organization, for example because it was already deleted |
| 500 | `INTERNAL_ERROR` | Server error |


## OpenAPI

````yaml DELETE /api/leads/{id}
openapi: 3.0.1
info:
  title: Octanist API
  description: >-
    The Octanist API allows you to create, update and read leads, run reports,
    read workspace settings, retrieve statistics, and access ad spend data.
  version: 2.5.0
  contact:
    name: Octanist Support
    url: https://octanist.com/docs
servers:
  - url: https://octanist.com
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /api/leads/{id}:
    delete:
      tags:
        - Leads
      summary: Delete Lead
      description: >-
        Permanently delete a lead and its activity history. Works for locked
        leads too. Cannot be undone.
      parameters:
        - name: id
          in: path
          required: true
          description: Octanist lead ID
          schema:
            type: string
            example: lead_abc123
      responses:
        '200':
          description: Lead deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: lead_abc123
                      deleted:
                        type: boolean
                        example: true
                  meta:
                    $ref: '#/components/schemas/Meta'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: A read-only API key, or the organization is a read-only demo
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Lead not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Meta:
      type: object
      properties:
        requestId:
          type: string
          example: req_a1b2c3d4e5f6
        timestamp:
          type: string
          format: date-time
          example: '2026-03-10T12:00:00.000Z'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human readable error message
              example: Human readable error message
            details:
              type: object
              description: Optional additional error details
        meta:
          $ref: '#/components/schemas/Meta'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication

````

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