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

# Create Lead Task

> Create a task for a specific lead in a campaign

<Note>
  Create follow-up tasks for leads with priorities and due dates. Tasks appear in the master inbox for easy tracking.
</Note>

## Query Parameters

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

## Request Body

<ParamField body="email_lead_map_id" type="number" required>
  The campaign-lead mapping ID
</ParamField>

<ParamField body="name" type="string" required>
  Task name/title
</ParamField>

<ParamField body="description" type="string">
  Detailed task description
</ParamField>

<ParamField body="priority" type="string">
  Task priority level. Values: `LOW`, `MEDIUM`, `HIGH`. Default: `MEDIUM`
</ParamField>

<ParamField body="due_date" type="string">
  Due date in ISO 8601 format (e.g., `2025-12-15T09:00:00Z`)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/master-inbox/create-task?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "email_lead_map_id": 2433664091,
      "name": "Follow up on enterprise proposal",
      "description": "Send pricing breakdown for 50-seat plan",
      "priority": "HIGH",
      "due_date": "2025-12-15T09:00:00Z"
    }'
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Request successful
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Invalid request parameters or malformed request body
</ResponseField>

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

<ResponseField name="422" type="Validation Error">
  Request validation failed. Check parameter types and constraints.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "data": {
      "id": 789,
      "email_lead_map_id": 2433664091,
      "name": "Follow up on enterprise proposal",
      "description": "Send pricing breakdown for 50-seat plan",
      "priority": "HIGH",
      "due_date": "2025-12-15T09:00:00Z",
      "created_at": "2025-12-01T10:00:00.000Z"
    }
  }
  ```

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