# Status history

Lead, campaign and account status changes, the initial snapshot and completeness of the available history.

Base URL: https://api.melioralab.io/v1. Pass the key in the `Authorization: Bearer mel_live_...` header.

Endpoints:

- `GET /v1/leads/{id}/status-history`: Lead status history
- `GET /v1/campaigns/{id}/status-history`: Campaign status history
- `GET /v1/campaigns/{id}/accounts/{account_id}/status-history`: Campaign account status history

## The LeadStatusTransition object

An actual status change. The allowed statuses depend on `entity_kind`.

| Field | Type | Description |
|---|---|---|
| `object` | string | Object type, always `message`. |
| `id` | string (uuid) | Opaque, stable message ID. Do not parse its format. |
| `workspace_id` | string (uuid) | Workspace ID. |
| `campaign_id` | string (uuid) | Campaign ID. |
| `lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `entity_kind` | string | Entity kind: lead, campaign or account. Always `"lead"`. |
| `entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `from_status` | string | The previous public status. Unrecognized values are returned as `unknown`. Values: `new`, `contacted`, `completed`, `replied`, `blocked`, `failed`, `suspended`, `deleted`, `opted_out`, `unknown`. |
| `to_status` | string | The new public status. Unrecognized values are returned as `unknown`. Values: `new`, `contacted`, `completed`, `replied`, `blocked`, `failed`, `suspended`, `deleted`, `opted_out`, `unknown`. |
| `reason_code` | string | The reason for the status change. `unspecified` if unknown. Values: `operator_action`, `schedule`, `queue_exhausted`, `recipient_not_found`, `telegram_auth`, `subscription`, `recovery`, `unspecified`. |
| `source` | string | The record source, or `unknown` if unavailable. Statistics always use `task_states`. Values: `user`, `system`, `support`, `unknown`. |
| `occurred_at` | string (date-time) | When the change occurred. |
| `recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |

Example:

```json
{
  "object": "status_transition",
  "id": "00000000-0000-4000-8000-000000000001",
  "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
  "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
  "lead_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
  "entity_kind": "lead",
  "entity_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
  "entity_revision": 1,
  "from_status": "new",
  "to_status": "contacted",
  "reason_code": "operator_action",
  "source": "user",
  "occurred_at": "2026-10-27T09:15:42.000Z",
  "recorded_at": "2026-10-27T09:15:42.000Z"
}
```

## The CampaignStatusTransition object

An actual status change. The allowed statuses depend on `entity_kind`.

| Field | Type | Description |
|---|---|---|
| `object` | string | Object type, always `message`. |
| `id` | string (uuid) | Opaque, stable message ID. Do not parse its format. |
| `workspace_id` | string (uuid) | Workspace ID. |
| `campaign_id` | string (uuid) | Campaign ID. |
| `lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `entity_kind` | string | Entity kind: lead, campaign or account. Always `"campaign"`. |
| `entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `from_status` | string | The previous public status. Unrecognized values are returned as `unknown`. Values: `draft`, `scheduled`, `active`, `paused`, `stopped`, `completed`, `archived`, `launching`, `failed`, `paused_no_credits`, `unknown`. |
| `to_status` | string | The new public status. Unrecognized values are returned as `unknown`. Values: `draft`, `scheduled`, `active`, `paused`, `stopped`, `completed`, `archived`, `launching`, `failed`, `paused_no_credits`, `unknown`. |
| `reason_code` | string | The reason for the status change. `unspecified` if unknown. Values: `operator_action`, `schedule`, `queue_exhausted`, `recipient_not_found`, `telegram_auth`, `subscription`, `recovery`, `unspecified`. |
| `source` | string | The record source, or `unknown` if unavailable. Statistics always use `task_states`. Values: `user`, `system`, `support`, `unknown`. |
| `occurred_at` | string (date-time) | When the change occurred. |
| `recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |

Example:

```json
{
  "object": "status_transition",
  "id": "00000000-0000-4000-8000-000000000002",
  "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
  "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
  "lead_id": null,
  "entity_kind": "campaign",
  "entity_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
  "entity_revision": 1,
  "from_status": "draft",
  "to_status": "active",
  "reason_code": "operator_action",
  "source": "user",
  "occurred_at": "2026-10-27T09:15:42.000Z",
  "recorded_at": "2026-10-27T09:15:42.000Z"
}
```

## The AccountStatusTransition object

An actual status change. The allowed statuses depend on `entity_kind`.

| Field | Type | Description |
|---|---|---|
| `object` | string | Object type, always `message`. |
| `id` | string (uuid) | Opaque, stable message ID. Do not parse its format. |
| `workspace_id` | string (uuid) | Workspace ID. |
| `campaign_id` | string (uuid) | Campaign ID. |
| `lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `entity_kind` | string | Entity kind: lead, campaign or account. Always `"account"`. |
| `entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `from_status` | string | The previous public status. Unrecognized values are returned as `unknown`. Values: `online`, `offline`, `limited`, `banned`, `deleted`, `locked`, `unauthorized`, `paused`, `unknown`. |
| `to_status` | string | The new public status. Unrecognized values are returned as `unknown`. Values: `online`, `offline`, `limited`, `banned`, `deleted`, `locked`, `unauthorized`, `paused`, `unknown`. |
| `reason_code` | string | The reason for the status change. `unspecified` if unknown. Values: `operator_action`, `schedule`, `queue_exhausted`, `recipient_not_found`, `telegram_auth`, `subscription`, `recovery`, `unspecified`. |
| `source` | string | The record source, or `unknown` if unavailable. Statistics always use `task_states`. Values: `user`, `system`, `support`, `unknown`. |
| `occurred_at` | string (date-time) | When the change occurred. |
| `recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |

Example:

```json
{
  "object": "status_transition",
  "id": "00000000-0000-4000-8000-000000000003",
  "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
  "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
  "lead_id": null,
  "entity_kind": "account",
  "entity_id": "1d9f6b28-4c3e-4a75-8b19-5e7a2c0f6d83",
  "entity_revision": 1,
  "from_status": "online",
  "to_status": "paused",
  "reason_code": "operator_action",
  "source": "user",
  "occurred_at": "2026-10-27T09:15:42.000Z",
  "recorded_at": "2026-10-27T09:15:42.000Z"
}
```

## The StatusBaseline object

An initial status snapshot. It is not a transition and does not produce a status change event.

| Field | Type | Description |
|---|---|---|
| `Variant 1: object` | string | Object type, always `message`. |
| `Variant 1: workspace_id` | string (uuid) | Workspace ID. |
| `Variant 1: campaign_id` | string (uuid) | Campaign ID. |
| `Variant 1: lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `Variant 1: entity_kind` | string | Entity kind: lead, campaign or account. Always `"lead"`. |
| `Variant 1: entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `Variant 1: entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `Variant 1: status` | string | The public status or completeness state. Unrecognized values are returned as `unknown`. Values: `new`, `contacted`, `completed`, `replied`, `blocked`, `failed`, `suspended`, `deleted`, `opted_out`, `unknown`. |
| `Variant 1: recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |
| `Variant 1: provenance` | string | Always `baseline`: an initial snapshot, not a status change. |
| `Variant 2: object` | string | Object type, always `message`. |
| `Variant 2: workspace_id` | string (uuid) | Workspace ID. |
| `Variant 2: campaign_id` | string (uuid) | Campaign ID. |
| `Variant 2: lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `Variant 2: entity_kind` | string | Entity kind: lead, campaign or account. Always `"campaign"`. |
| `Variant 2: entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `Variant 2: entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `Variant 2: status` | string | The public status or completeness state. Unrecognized values are returned as `unknown`. Values: `draft`, `scheduled`, `active`, `paused`, `stopped`, `completed`, `archived`, `launching`, `failed`, `paused_no_credits`, `unknown`. |
| `Variant 2: recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |
| `Variant 2: provenance` | string | Always `baseline`: an initial snapshot, not a status change. |
| `Variant 3: object` | string | Object type, always `message`. |
| `Variant 3: workspace_id` | string (uuid) | Workspace ID. |
| `Variant 3: campaign_id` | string (uuid) | Campaign ID. |
| `Variant 3: lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `Variant 3: entity_kind` | string | Entity kind: lead, campaign or account. Always `"account"`. |
| `Variant 3: entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `Variant 3: entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `Variant 3: status` | string | The public status or completeness state. Unrecognized values are returned as `unknown`. Values: `online`, `offline`, `limited`, `banned`, `deleted`, `locked`, `unauthorized`, `paused`, `unknown`. |
| `Variant 3: recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |
| `Variant 3: provenance` | string | Always `baseline`: an initial snapshot, not a status change. |

Example:

```json
{
  "object": "status_baseline",
  "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
  "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
  "lead_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
  "entity_kind": "lead",
  "entity_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
  "entity_revision": 0,
  "status": "new",
  "recorded_at": "2026-10-26T07:30:00.000Z",
  "provenance": "baseline"
}
```

## Lead status history

`GET /v1/leads/{id}/status-history`

Actual lead status changes in ascending `entity_revision` order. The initial snapshot is separate, in `meta.baseline`. New features are enabled for your organization on request.

Permission: `leads:read`. Request weight: 2.

### Parameters

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes | Lead ID. |
| `limit` | query | integer | no | Number of objects to return per page. From 1 to 100. Defaults to `50`. |
| `cursor` | query | string | no | The `next_cursor` value from the previous response. Other filters must match the first request. |

### Response

A list: `object`, `data`, `has_more`, `next_cursor`, `meta`. Pagination: https://docs.melioralab.io/en/md/pagination.md

The `meta` field:

| Field | Type | Description |
|---|---|---|
| `meta.baseline` | object or null | An initial status snapshot, or `null`. It is not a transition and does not prove earlier history. |
| `meta.baseline.object` | string | Object type, always `message`. |
| `meta.baseline.workspace_id` | string (uuid) | Workspace ID. |
| `meta.baseline.campaign_id` | string (uuid) | Campaign ID. |
| `meta.baseline.lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `meta.baseline.entity_kind` | string | Entity kind: lead, campaign or account. Always `"lead"`. |
| `meta.baseline.entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `meta.baseline.entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `meta.baseline.status` | string | The public status or completeness state. Unrecognized values are returned as `unknown`. Values: `new`, `contacted`, `completed`, `replied`, `blocked`, `failed`, `suspended`, `deleted`, `opted_out`, `unknown`. |
| `meta.baseline.recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |
| `meta.baseline.provenance` | string | Always `baseline`: an initial snapshot, not a status change. |
| `meta.available_from` | string (date-time) or null | Start of the period covered by the data. `null` if unknown. |
| `meta.history_started_at` | string (date-time) or null | When history collection started. Earlier changes are not reconstructed. |
| `meta.retained_from` | string (date-time) or null | The beginning of the retained history period, or `null` if unknown. |
| `meta.completeness` | object | Data completeness. `has_more=false` means there are no more pages, not that the history is complete. |
| `meta.completeness.status` | string | `complete`, `partial` or `unknown`. Values: `complete`, `partial`, `unknown`. |
| `meta.completeness.gaps` | array of object | Up to 50 intervals of possible incompleteness. |
| `meta.completeness.gaps[].id` | string (uuid) | Interval ID. |
| `meta.completeness.gaps[].from` | string (date-time) | Start of the interval. |
| `meta.completeness.gaps[].to` | string (date-time) or null | End of the interval. `null` if the interval is not closed yet. |
| `meta.completeness.gaps[].state` | string | `open`, `recovering`, `recovered`, `unrecoverable` or `unknown`. Values: `open`, `recovering`, `recovered`, `unrecoverable`, `unknown`. |
| `meta.completeness.gaps_truncated` | boolean | `true` if there are more than 50 intervals. |
| `meta.completeness.incomplete_from` | string (date-time) or null | Earliest boundary of the hidden incomplete intervals. `null` if there are none. |
| `meta.observed_at` | string (date-time) | Time the server read the data. |

### Endpoint-specific errors

- `cursor_mismatch` (400): The cursor is corrupted, was issued for a different route or filters, or the key's permissions and scope have changed.
- `scope_required` (403): The key does not permit the operation. A command requires its kind permission.
- `not_found` (404): The object was not found or is outside the key's scope. An unknown path also returns 404.
- `cursor_expired` (410): The cursor expired: 15 minutes for lists, 30 days for the event feed.

Common errors: https://docs.melioralab.io/en/md/errors.md

### Example request

```bash
curl https://api.melioralab.io/v1/leads/5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31/status-history \
  -H "Authorization: Bearer $MELIORA_API_KEY"
```

### Example response

```json
{
  "object": "list",
  "data": [
    {
      "object": "status_transition",
      "id": "00000000-0000-4000-8000-000000000001",
      "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
      "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "lead_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
      "entity_kind": "lead",
      "entity_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
      "entity_revision": 1,
      "from_status": "new",
      "to_status": "contacted",
      "reason_code": "operator_action",
      "source": "user",
      "occurred_at": "2026-10-27T09:15:42.000Z",
      "recorded_at": "2026-10-27T09:15:42.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "meta": {
    "baseline": {
      "object": "status_baseline",
      "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
      "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "lead_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
      "entity_kind": "lead",
      "entity_id": "5a7c3e92-1f4b-4d68-9c2e-7b0a6d4f8e31",
      "entity_revision": 0,
      "status": "new",
      "recorded_at": "2026-10-26T07:30:00.000Z",
      "provenance": "baseline"
    },
    "available_from": "2026-10-26T07:30:00.000Z",
    "history_started_at": "2026-10-26T07:30:00.000Z",
    "retained_from": "2026-10-26T07:30:00.000Z",
    "completeness": {
      "status": "complete",
      "gaps": [],
      "gaps_truncated": false,
      "incomplete_from": null
    },
    "observed_at": "2026-10-27T09:15:42.000Z"
  }
}
```

## Campaign status history

`GET /v1/campaigns/{id}/status-history`

Actual campaign status changes in ascending `entity_revision` order. New features are enabled for your organization on request.

Permission: `campaigns:read`. Request weight: 2.

### Parameters

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes | Campaign ID. |
| `limit` | query | integer | no | Number of objects to return per page. From 1 to 100. Defaults to `50`. |
| `cursor` | query | string | no | The `next_cursor` value from the previous response. Other filters must match the first request. |

### Response

A list: `object`, `data`, `has_more`, `next_cursor`, `meta`. Pagination: https://docs.melioralab.io/en/md/pagination.md

The `meta` field:

| Field | Type | Description |
|---|---|---|
| `meta.baseline` | object or null | An initial status snapshot, or `null`. It is not a transition and does not prove earlier history. |
| `meta.baseline.object` | string | Object type, always `message`. |
| `meta.baseline.workspace_id` | string (uuid) | Workspace ID. |
| `meta.baseline.campaign_id` | string (uuid) | Campaign ID. |
| `meta.baseline.lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `meta.baseline.entity_kind` | string | Entity kind: lead, campaign or account. Always `"campaign"`. |
| `meta.baseline.entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `meta.baseline.entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `meta.baseline.status` | string | The public status or completeness state. Unrecognized values are returned as `unknown`. Values: `draft`, `scheduled`, `active`, `paused`, `stopped`, `completed`, `archived`, `launching`, `failed`, `paused_no_credits`, `unknown`. |
| `meta.baseline.recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |
| `meta.baseline.provenance` | string | Always `baseline`: an initial snapshot, not a status change. |
| `meta.available_from` | string (date-time) or null | Start of the period covered by the data. `null` if unknown. |
| `meta.history_started_at` | string (date-time) or null | When history collection started. Earlier changes are not reconstructed. |
| `meta.retained_from` | string (date-time) or null | The beginning of the retained history period, or `null` if unknown. |
| `meta.completeness` | object | Data completeness. `has_more=false` means there are no more pages, not that the history is complete. |
| `meta.completeness.status` | string | `complete`, `partial` or `unknown`. Values: `complete`, `partial`, `unknown`. |
| `meta.completeness.gaps` | array of object | Up to 50 intervals of possible incompleteness. |
| `meta.completeness.gaps[].id` | string (uuid) | Interval ID. |
| `meta.completeness.gaps[].from` | string (date-time) | Start of the interval. |
| `meta.completeness.gaps[].to` | string (date-time) or null | End of the interval. `null` if the interval is not closed yet. |
| `meta.completeness.gaps[].state` | string | `open`, `recovering`, `recovered`, `unrecoverable` or `unknown`. Values: `open`, `recovering`, `recovered`, `unrecoverable`, `unknown`. |
| `meta.completeness.gaps_truncated` | boolean | `true` if there are more than 50 intervals. |
| `meta.completeness.incomplete_from` | string (date-time) or null | Earliest boundary of the hidden incomplete intervals. `null` if there are none. |
| `meta.observed_at` | string (date-time) | Time the server read the data. |

### Endpoint-specific errors

- `cursor_mismatch` (400): The cursor is corrupted, was issued for a different route or filters, or the key's permissions and scope have changed.
- `scope_required` (403): The key does not permit the operation. A command requires its kind permission.
- `not_found` (404): The object was not found or is outside the key's scope. An unknown path also returns 404.
- `cursor_expired` (410): The cursor expired: 15 minutes for lists, 30 days for the event feed.

Common errors: https://docs.melioralab.io/en/md/errors.md

### Example request

```bash
curl https://api.melioralab.io/v1/campaigns/4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14/status-history \
  -H "Authorization: Bearer $MELIORA_API_KEY"
```

### Example response

```json
{
  "object": "list",
  "data": [
    {
      "object": "status_transition",
      "id": "00000000-0000-4000-8000-000000000002",
      "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
      "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "lead_id": null,
      "entity_kind": "campaign",
      "entity_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "entity_revision": 1,
      "from_status": "draft",
      "to_status": "active",
      "reason_code": "operator_action",
      "source": "user",
      "occurred_at": "2026-10-27T09:15:42.000Z",
      "recorded_at": "2026-10-27T09:15:42.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "meta": {
    "baseline": {
      "object": "status_baseline",
      "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
      "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "lead_id": null,
      "entity_kind": "campaign",
      "entity_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "entity_revision": 0,
      "status": "draft",
      "recorded_at": "2026-10-26T07:30:00.000Z",
      "provenance": "baseline"
    },
    "available_from": "2026-10-26T07:30:00.000Z",
    "history_started_at": "2026-10-26T07:30:00.000Z",
    "retained_from": "2026-10-26T07:30:00.000Z",
    "completeness": {
      "status": "complete",
      "gaps": [],
      "gaps_truncated": false,
      "incomplete_from": null
    },
    "observed_at": "2026-10-27T09:15:42.000Z"
  }
}
```

## Campaign account status history

`GET /v1/campaigns/{id}/accounts/{account_id}/status-history`

Account history in the selected campaign, without exposing other campaigns. New features are enabled for your organization on request.

Permission: `accounts:read`. Request weight: 2.

### Parameters

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes | Campaign ID. |
| `account_id` | path | string (uuid) | yes | Account ID. |
| `limit` | query | integer | no | Number of objects to return per page. From 1 to 100. Defaults to `50`. |
| `cursor` | query | string | no | The `next_cursor` value from the previous response. Other filters must match the first request. |

### Response

A list: `object`, `data`, `has_more`, `next_cursor`, `meta`. Pagination: https://docs.melioralab.io/en/md/pagination.md

The `meta` field:

| Field | Type | Description |
|---|---|---|
| `meta.baseline` | object or null | An initial status snapshot, or `null`. It is not a transition and does not prove earlier history. |
| `meta.baseline.object` | string | Object type, always `message`. |
| `meta.baseline.workspace_id` | string (uuid) | Workspace ID. |
| `meta.baseline.campaign_id` | string (uuid) | Campaign ID. |
| `meta.baseline.lead_id` | string (uuid) or null | The lead's participation ID in the campaign. May be `null` in campaign or account history. |
| `meta.baseline.entity_kind` | string | Entity kind: lead, campaign or account. Always `"account"`. |
| `meta.baseline.entity_id` | string (uuid) | The ID of the entity whose status changed. |
| `meta.baseline.entity_revision` | integer | The entity's record sequence number. Transitions start at 1; the initial snapshot may have revision 0. |
| `meta.baseline.status` | string | The public status or completeness state. Unrecognized values are returned as `unknown`. Values: `online`, `offline`, `limited`, `banned`, `deleted`, `locked`, `unauthorized`, `paused`, `unknown`. |
| `meta.baseline.recorded_at` | string (date-time) | When the change or initial snapshot was recorded. |
| `meta.baseline.provenance` | string | Always `baseline`: an initial snapshot, not a status change. |
| `meta.available_from` | string (date-time) or null | Start of the period covered by the data. `null` if unknown. |
| `meta.history_started_at` | string (date-time) or null | When history collection started. Earlier changes are not reconstructed. |
| `meta.retained_from` | string (date-time) or null | The beginning of the retained history period, or `null` if unknown. |
| `meta.completeness` | object | Data completeness. `has_more=false` means there are no more pages, not that the history is complete. |
| `meta.completeness.status` | string | `complete`, `partial` or `unknown`. Values: `complete`, `partial`, `unknown`. |
| `meta.completeness.gaps` | array of object | Up to 50 intervals of possible incompleteness. |
| `meta.completeness.gaps[].id` | string (uuid) | Interval ID. |
| `meta.completeness.gaps[].from` | string (date-time) | Start of the interval. |
| `meta.completeness.gaps[].to` | string (date-time) or null | End of the interval. `null` if the interval is not closed yet. |
| `meta.completeness.gaps[].state` | string | `open`, `recovering`, `recovered`, `unrecoverable` or `unknown`. Values: `open`, `recovering`, `recovered`, `unrecoverable`, `unknown`. |
| `meta.completeness.gaps_truncated` | boolean | `true` if there are more than 50 intervals. |
| `meta.completeness.incomplete_from` | string (date-time) or null | Earliest boundary of the hidden incomplete intervals. `null` if there are none. |
| `meta.observed_at` | string (date-time) | Time the server read the data. |

### Endpoint-specific errors

- `cursor_mismatch` (400): The cursor is corrupted, was issued for a different route or filters, or the key's permissions and scope have changed.
- `scope_required` (403): The key does not permit the operation. A command requires its kind permission.
- `not_found` (404): The object was not found or is outside the key's scope. An unknown path also returns 404.
- `cursor_expired` (410): The cursor expired: 15 minutes for lists, 30 days for the event feed.

Common errors: https://docs.melioralab.io/en/md/errors.md

### Example request

```bash
curl https://api.melioralab.io/v1/campaigns/4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14/accounts/1d9f6b28-4c3e-4a75-8b19-5e7a2c0f6d83/status-history \
  -H "Authorization: Bearer $MELIORA_API_KEY"
```

### Example response

```json
{
  "object": "list",
  "data": [
    {
      "object": "status_transition",
      "id": "00000000-0000-4000-8000-000000000003",
      "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
      "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "lead_id": null,
      "entity_kind": "account",
      "entity_id": "1d9f6b28-4c3e-4a75-8b19-5e7a2c0f6d83",
      "entity_revision": 1,
      "from_status": "online",
      "to_status": "paused",
      "reason_code": "operator_action",
      "source": "user",
      "occurred_at": "2026-10-27T09:15:42.000Z",
      "recorded_at": "2026-10-27T09:15:42.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "meta": {
    "baseline": {
      "object": "status_baseline",
      "workspace_id": "3f6a9d21-8b4c-4e7f-a102-5c9e8d7b6a43",
      "campaign_id": "4d8b2f73-6e1a-4c95-b7d0-8a3f5e2c9b14",
      "lead_id": null,
      "entity_kind": "account",
      "entity_id": "1d9f6b28-4c3e-4a75-8b19-5e7a2c0f6d83",
      "entity_revision": 0,
      "status": "online",
      "recorded_at": "2026-10-26T07:30:00.000Z",
      "provenance": "baseline"
    },
    "available_from": "2026-10-26T07:30:00.000Z",
    "history_started_at": "2026-10-26T07:30:00.000Z",
    "retained_from": "2026-10-26T07:30:00.000Z",
    "completeness": {
      "status": "complete",
      "gaps": [],
      "gaps_truncated": false,
      "incomplete_from": null
    },
    "observed_at": "2026-10-27T09:15:42.000Z"
  }
}
```
