# Update a lead's status

Updates a lead's status. Fields you leave out keep their current values. Works with Meta Ads.

```http
PATCH https://api.pozy.ai/v1/ads/leads/{id}
```

- Area: Ads / Lead Gen
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `id` (string, required)

## Request body

Content type: `application/json`

- `status`, string, required: One of `new`, `contacted`, `unreachable`, `qualified`, `converted`, `disqualified`
- `value`, number: At least 0
- `currency`, string
- `accountId`, string

## Example request

```bash
curl -X PATCH "https://api.pozy.ai/v1/ads/leads/6bfebd43ddc270f6d2c56fc5" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "new"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/leads/6bfebd43ddc270f6d2c56fc5", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    status: "new"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.patch(
    "https://api.pozy.ai/v1/ads/leads/6bfebd43ddc270f6d2c56fc5",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "status": "new",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `status`, string
- `lead`, object
  - `id`, string
  - `leadgenId`, string
  - `formId`, string
  - `formName`, string: Can be null
  - `accountId`, string
  - `adId`, string: Can be null
  - `adsetId`, string: Can be null
  - `campaignId`, string: Can be null
  - `isOrganic`, boolean
  - `createdTime`, string: Can be null
  - `fields`, map of string
  - `fieldData`, array of object
  - `consents`, array of object
    - `checkboxKey`, string, required
    - `isChecked`, boolean, required
  - `status`, string: One of `new`, `contacted`, `unreachable`, `qualified`, `converted`, `disqualified`
  - `statusChangedAt`, string (date-time): Can be null
  - `value`, number: Can be null
  - `currency`, string: Can be null
  - `contactId`, string: Can be null
  - `firstContactedAt`, string (date-time): Can be null
  - `conversationId`, string: Can be null
  - `webhookDeliveredAt`, string (date-time): Can be null

```json
{
  "status": "active",
  "lead": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "leadgenId": "6dca97cccbf47a98016ac05b",
    "formId": "6da2ff1d8c680bca61eb524a",
    "formName": "Acme",
    "accountId": "696e0b682d0a31188e7a2ba9",
    "adId": "6f40fa2fb0a7e728dd1a73b7",
    "adsetId": "6766358a9af7b9dbb7d42ea6",
    "campaignId": "65a3737dd8b11ea61f199e6e",
    "isOrganic": true,
    "createdTime": "string",
    "fields": {
      "key": "string"
    },
    "fieldData": [
      {}
    ],
    "consents": [
      {
        "checkboxKey": "string",
        "isChecked": true
      }
    ],
    "status": "new",
    "statusChangedAt": "2026-10-02T09:00:00.000Z",
    "value": 12.5,
    "currency": "USD",
    "contactId": "642d31f43531ce7d44aa5013",
    "firstContactedAt": "2026-10-02T09:00:00.000Z",
    "conversationId": "6e525f3820fc636aa96d2ee9",
    "webhookDeliveredAt": "2026-10-02T09:00:00.000Z"
  }
}
```
