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

# Lead status set

## PATCH /api/v1/public/prospects/:id/lead-status/

Set one lead's status. The status applies to the person everywhere in the workspace: their lead list row and every campaign they are in.

If the new status is in the workspace's stop rule (`STOPPED` always is — see [GET /public/lead-status/](https://docs.seleqt.ai/api-reference/public/lead-status.md)), **all outreach to the person stops in every campaign**: pending steps are cancelled and running sequences move to `STOPPED`.

Changing the status away from a stopping status does **not** restart the stopped sequences. Send `"resume": true` to restart them in the same call.

Auth: `X-API-Key`

### Path Parameters

* `id` (integer, required): Prospect ID — a lead list row or a campaign row of the person.

### Request Body

```json theme={null}
{
  "status": "STOPPED"
}
```

Back from Stopped, restarting the sequences:

```json theme={null}
{
  "status": "INTERESTED",
  "resume": true
}
```

### Request Body Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `status` | string | Yes | One of `ACTIVE`, `REPLIED`, `INTERESTED`, `MEETING_BOOKED`, `NOT_INTERESTED`, `BOUNCED`, `UNSUBSCRIBED`, `STOPPED`. |
| `resume` | boolean | No | When `true` and the new status doesn't stop outreach, every sequence of the person that a stop ended picks up where it stopped (cancelled steps are planned again without their delay; steps that already ran are not repeated). Ignored when the new status stops outreach. Defaults to `false`. |

### Response

```json theme={null}
{
  "success": true,
  "changed": true,
  "old": "ACTIVE",
  "status": "STOPPED",
  "stopped": 2,
  "resumed": 0,
  "lead_status": "STOPPED"
}
```

| Field | Type | Description |
| - | - | - |
| `success` | boolean | Always `true` on a successful response. |
| `changed` | boolean | `false` when the lead already had this status. Setting `STOPPED` again still cancels anything left running (`stopped` counts it). |
| `old` | string \| null | The status before the call. |
| `status` | string \| null | The status after the call. |
| `stopped` | integer | How many campaign sequences this change stopped. |
| `resumed` | integer | How many stopped sequences were restarted (`resume: true`). |
| `lead_status` | string \| null | The lead's status now. |

The change is recorded in the lead's [status history](https://docs.seleqt.ai/api-reference/public/lead-status-events.md) with source `API`, and the [`lead.status_changed`](https://docs.seleqt.ai/webhooks/webhook-events) webhook event is sent.

### Error Responses

| Status | `error` | When |
| - | - | - |
| `400` | `Unknown status.` | `status` is missing or not one of the values above. The response also lists the valid `statuses`. |
| `403` | `Viewers can't change a lead's status.` | The API key belongs to a Viewer. |
| `404` | `Lead not found.` | No prospect with this ID in your current workspace. |

### Examples

```bash theme={null}
# Stop all outreach to a lead, in every campaign
curl -X PATCH -H "X-API-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"status": "STOPPED"}' \
  "https://api.seleqt.ai/api/v1/public/prospects/12345/lead-status/"
```

```bash theme={null}
# Mark the lead Active again and restart the sequences the stop ended
curl -X PATCH -H "X-API-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"status": "ACTIVE", "resume": true}' \
  "https://api.seleqt.ai/api/v1/public/prospects/12345/lead-status/"
```

### Notes

* Without `resume`, a lead moved from `STOPPED` to another status keeps its sequences stopped. This is on purpose: a status change in a CRM or a Sheet should never restart outreach by itself.
* To stop or resume many leads at once, use [POST /public/campaigns/:id/lead-status/](https://docs.seleqt.ai/api-reference/public/lead-status-campaign.md) or [POST /public/lead-lists/:id/lead-status/](https://docs.seleqt.ai/api-reference/public/lead-status-lead-list.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.