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

# Prompt History

<span class="badge--get">GET</span> <code class="endpoint-url">/workflows/:id/prompt-history</code>

Read an agent's prompt version history — every snapshot taken when the base prompt, a channel override, or the funnel structure changed.

## Path Parameters

| Parameter | Type          | Required | Description |
| --------- | ------------- | -------- | ----------- |
| `id`      | string (uuid) | **Yes**  | Agent ID    |

## Query Parameters

| Parameter | Type    | Required | Description                                                  |
| --------- | ------- | -------- | ------------------------------------------------------------ |
| `limit`   | integer | No       | Max versions to return, newest first. Default `20`, max `50` |

## Responses

### `200` — Successful response

```json theme={null}
{
  "success": true,
  "versions": [
    {
      "version_number": 4,
      "global_prompt": "You are Iris, a friendly sales rep for Acme...",
      "channel_prompts": { "whatsapp": "Keep replies under 2 sentences." },
      "changed_fields": ["global_prompt"],
      "changed_by_email": "founder@acme.com",
      "change_source": "api",
      "change_note": null,
      "activated_at": "2026-02-01T12:00:00Z",
      "superseded_at": null,
      "created_at": "2026-02-01T12:00:00Z"
    }
  ]
}
```

### Response Fields — PromptVersion

| Field              | Type                       | Description                                                                                                                            |
| ------------------ | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `version_number`   | integer                    | Sequential version number                                                                                                              |
| `global_prompt`    | string                     | The base prompt as of this version                                                                                                     |
| `channel_prompts`  | object                     | Per-channel overrides as of this version                                                                                               |
| `changed_fields`   | string\[]                  | Which fields changed in this version                                                                                                   |
| `changed_by_email` | string \| null             | Who made the change                                                                                                                    |
| `change_source`    | string                     | Where the change came from, e.g. `dashboard`, `api`, `training`                                                                        |
| `change_note`      | string \| null             | Optional annotation (see [Update Structure](/docs/en/api/workflows/update-workflow-structure) for editing structure alongside prompts) |
| `activated_at`     | string (date-time) \| null | When this version became live                                                                                                          |
| `superseded_at`    | string (date-time) \| null | When a later version replaced it                                                                                                       |
| `created_at`       | string (date-time)         | When this version was recorded                                                                                                         |

### `401` — Authentication error

See [Authentication](/docs/en/api/authentication).

### `404` — Not found

```json theme={null}
{
  "error": "Not found",
  "message": "Workflow not found"
}
```

### `500` — Internal server error
