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

# Delete Lead from Campaign

> Remove a lead from a campaign and optionally from your account if not used elsewhere

<Warning>
  If the lead is not associated with any other campaign, it will be permanently deleted from your account. This action cannot be undone.
</Warning>

## Path Parameters

<ParamField path="campaign_id" type="number" required>
  The campaign ID to remove the lead from
</ParamField>

<ParamField path="lead_id" type="number" required>
  The lead ID to delete
</ParamField>

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://server.smartlead.ai/api/v1/campaigns/123/leads/456?api_key=YOUR_KEY"
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "YOUR_API_KEY"
  campaign_id = 123
  lead_id = 456

  response = requests.delete(
      f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/leads/{lead_id}",
      params={"api_key": API_KEY}
  )

  result = response.json()
  if result.get('ok'):
      print(f"Lead {lead_id} deleted from campaign {campaign_id}")
  ```

  ```javascript JavaScript theme={null}
  const API_KEY = 'YOUR_API_KEY';
  const campaignId = 123;
  const leadId = 456;

  const response = await fetch(
    `https://server.smartlead.ai/api/v1/campaigns/${campaignId}/leads/${leadId}?api_key=${API_KEY}`,
    { method: 'DELETE' }
  );

  const result = await response.json();
  if (result.ok) {
    console.log(`Lead ${leadId} deleted from campaign ${campaignId}`);
  }
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Lead deleted successfully from campaign
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key
</ResponseField>

<ResponseField name="404" type="Not Found">
  Campaign not found or you don't have access to it
</ResponseField>

<ResponseField name="500" type="Internal Server Error">
  Server error occurred
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "message": "success"
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": "Campaign not found - Invalid campaign_id."
  }
  ```
</ResponseExample>

## Behavior Notes

<Tip>
  The lead will only be permanently deleted from your account if it's not associated with any other campaigns. If the lead exists in other campaigns, only the campaign association is removed.
</Tip>

## Related Endpoints

* [Get Campaign Leads](/api-reference/leads/get-by-campaign)
* [Add Leads to Campaign](/api-reference/leads/add-to-campaign)
* [Pause Lead](/api-reference/leads/pause)
