# Update Lead

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

> Documentation index: https://www.foxreach.io/docs/llms.txt lists every page of these docs. Each page is also served as Markdown: add `.md` to its URL.

`PATCH` https://api.foxreach.io/api/v1/leads/{lead_id}

## Path Parameters

- `lead_id` string path required

  The unique identifier of the lead.

## Request Body

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

- `email` string body

  New email address. Must be unique within the workspace.

- `firstName` string body

  First name.

- `lastName` string body

  Last name.

- `company` string body

  Company name.

- `title` string body

  Job title.

- `phone` string body

  Phone number.

- `linkedinUrl` string body

  LinkedIn profile URL.

- `website` string body

  Website URL.

- `customFields` object body

  Custom key-value fields (replaces entire object).

- `notes` string body

  Freeform notes.

- `interestStatus` string | null body

`interested`, `not_interested` or `out_of_office`; `null` clears it. A value set here stays until a reply that arrives after it is categorized. It does not change who can be mailed.

- `status` string body

  Lead status.

**Request example**

```bash cURL
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
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
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",
});
```

**Response example**

```json
{
  "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",
    "labels": [],
    "interestStatus": null,
    "interestStatusSource": null,
    "interestStatusUpdatedAt": null,
    "lastContactedAt": null,
    "createdAt": "2025-01-15T10:30:00",
    "updatedAt": "2025-01-16T08:00:00"
  }
}
```

## Errors

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

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- 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](https://www.foxreach.io/docs/rate-limiting).
