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

# Resume Lead

> Resume email sending for a paused lead with optional custom delay

<Note>
  Resuming a lead changes its status to `INPROGRESS` and schedules the next email based on the delay specified. If no delay is provided, the sequence's default delay is used.
</Note>

## Path Parameters

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

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

## Query Parameters

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

## Request Body

<ParamField body="resume_lead_with_delay_days" type="number">
  Number of days to wait before sending the next email. If not provided, uses the default delay from the sequence configuration. The next email timestamp is calculated as `last_sent_time + delay_days`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/leads/456/resume?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"resume_lead_with_delay_days": 3}'
  ```

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

  API_KEY = "YOUR_API_KEY"
  campaign_id = 123
  lead_id = 456

  # Resume with custom delay
  payload = {
      "resume_lead_with_delay_days": 3
  }

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

  result = response.json()
  if result.get('ok'):
      print(f"Lead {lead_id} resumed with {payload['resume_lead_with_delay_days']} day delay")

  # Or resume with default delay
  response = requests.post(
      f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/leads/{lead_id}/resume",
      params={"api_key": API_KEY},
      json={}
  )
  ```

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

  // Resume with custom delay
  const payload = {
    resume_lead_with_delay_days: 3
  };

  const response = await fetch(
    `https://server.smartlead.ai/api/v1/campaigns/${campaignId}/leads/${leadId}/resume?api_key=${API_KEY}`,
    {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(payload)
    }
  );

  const result = await response.json();
  if (result.ok) {
    console.log(`Lead ${leadId} resumed with ${payload.resume_lead_with_delay_days} day delay`);
  }
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Lead resumed successfully
</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 (e.g., lead is at the last sequence and cannot be resumed)
</ResponseField>

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

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

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

  ```json 500 - Last Sequence Error theme={null}
  {
    "error": "This is the last sequence. You cannot resume this lead."
  }
  ```

  ```json 500 - Invalid Lead theme={null}
  {
    "error": "Invalid lead id"
  }
  ```
</ResponseExample>

## Behavior Notes

<Info>
  When a lead is resumed:

  * Lead status changes from `PAUSED` to `INPROGRESS`
  * The next sequence is determined automatically
  * The `next_timestamp_to_reach` is calculated based on:
    * If `resume_lead_with_delay_days` is provided: `last_sent_time + specified_days`
    * If not provided: Uses the default delay from the sequence configuration
    * If no `last_sent_time` exists: Scheduled immediately (NOW)
  * Drafted emails are marked as `DRAFTED` and ready to send
</Info>

<Warning>
  You cannot resume a lead that is already on the last sequence of the campaign. Attempting to do so will return an error.
</Warning>

## Related Endpoints

* [Pause Lead](/api-reference/leads/pause)
* [Get Campaign Leads](/api-reference/leads/get-by-campaign)
* [Delete Lead](/api-reference/leads/delete)
