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

# Delete Lead

> Delete a lead

## Authentication

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://app.journeybee.io/api/v1/leads/{leadId}" \
    -H "Authorization: Bearer your-api-key-uuid" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://app.journeybee.io/api/v1/leads/{leadId}",
    {
      method: "DELETE",
      headers: {
        Authorization: "Bearer your-api-key-uuid",
        "Content-Type": "application/json",
      },
    }
  );
  ```
</CodeGroup>

## Path Parameters

<ParamField path="leadId" type="number" required>
  The unique identifier of the lead to delete
</ParamField>

## Response Schema

The API returns a `204 No Content` status code on successful deletion with no response body.

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://app.journeybee.io/api/v1/leads/789" \
    -H "Authorization: Bearer jb_api_1234567890abcdef" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://app.journeybee.io/api/v1/leads/789", {
    method: "DELETE",
    headers: {
      Authorization: "Bearer jb_api_1234567890abcdef",
      "Content-Type": "application/json",
    },
  });

  if (response.ok) {
    console.log("Lead deleted successfully");
  }
  ```
</CodeGroup>

## Example Response

<ResponseExample>`json 204 No Content (No response body) `</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 401 Unauthorized theme={null}
  {
    "error": "Invalid API key or insufficient permissions"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 403 Forbidden theme={null}
  {
    "error": "Write access required for this operation"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 404 Not Found theme={null}
  {
    "error": "Lead not found or already deleted"
  }
  ```
</ResponseExample>
