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

# Update Lead

> Update an existing lead. Only provided fields are changed.

## Path Parameters

<ParamField path="lead_id" type="string" required>
  The unique identifier of the lead.
</ParamField>

## Request Body

All fields are optional. Only include the fields you want to update.

<ParamField body="email" type="string">
  New email address. Must be unique within the workspace.
</ParamField>

<ParamField body="firstName" type="string">
  First name.
</ParamField>

<ParamField body="lastName" type="string">
  Last name.
</ParamField>

<ParamField body="company" type="string">
  Company name.
</ParamField>

<ParamField body="title" type="string">
  Job title.
</ParamField>

<ParamField body="phone" type="string">
  Phone number.
</ParamField>

<ParamField body="linkedinUrl" type="string">
  LinkedIn profile URL.
</ParamField>

<ParamField body="website" type="string">
  Website URL.
</ParamField>

<ParamField body="customFields" type="object">
  Custom key-value fields (replaces entire object).
</ParamField>

<ParamField body="notes" type="string">
  Freeform notes.
</ParamField>

<ParamField body="status" type="string">
  Lead status.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.foxreach.io/api/v1/leads/cld_abc123" \
    -H "X-API-Key: otr_your_key" \
    -H "Content-Type: application/json" \
    -d '{
      "company": "Acme Corp (acquired)",
      "title": "SVP of Sales"
    }'
  ```

  ```python Python SDK theme={null}
  from foxreach import FoxReach, LeadUpdate

  client = FoxReach(api_key="otr_your_key")

  lead = client.leads.update(
      "cld_abc123",
      LeadUpdate(
          company="Acme Corp (acquired)",
          title="SVP of Sales",
      ),
  )
  ```

  ```typescript TypeScript SDK theme={null}
  import { FoxReach } from "foxreach";

  const client = new FoxReach({ apiKey: "otr_your_key" });

  const lead = await client.leads.update("cld_abc123", {
    company: "Acme Corp (acquired)",
    title: "SVP of Sales",
  });
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "id": "cld_abc123",
      "email": "john@acme.com",
      "firstName": "John",
      "lastName": "Doe",
      "company": "Acme Corp (acquired)",
      "title": "SVP of Sales",
      "phone": "+1-555-0100",
      "linkedinUrl": "https://linkedin.com/in/johndoe",
      "website": "https://acme.com",
      "customFields": { "industry": "SaaS" },
      "notes": null,
      "source": "csv_import",
      "status": "active",
      "lastContactedAt": null,
      "createdAt": "2025-01-15T10:30:00",
      "updatedAt": "2025-01-16T08:00:00"
    }
  }
  ```
</ResponseExample>

## Errors

| Status | Description                                               |
| ------ | --------------------------------------------------------- |
| `404`  | Lead not found                                            |
| `409`  | A lead with the new email already exists in the workspace |

## Rate Limit

* **100 requests per minute, per API key.** Fixed 60-second window.
* Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix epoch seconds).
* A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
