# List the versions of a prompt

`GET https://app.whatsetter.com/api/v1/campaigns/{id}/prompts/{type}/versions`

The history of `conversation` or `first_message`, newest first. Each
entry has a `status`: `live` (what the agent reads now), `draft`
(saved in the editor, never published) or `inactive` (replaced, or out
of the rotation). The text itself is in
`GET …/versions/{versionId}`; the list carries a `preview`.

A version marked `snapshot: true` was filed by the API itself: it is
the text that was in service outside the history, kept the moment a
change replaced it. Its date is the date of that change.
Requires scope `prompts:read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes |  |
| `type` | path | conversation \| first_message | yes |  |
| `variant` | query | A \| B \| C \| D | no | Only the versions of this variant. |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no | Opaque cursor from the previous page's `pagination.next_cursor`. |

## Example request

```bash
curl --request GET \
  --url 'https://app.whatsetter.com/api/v1/campaigns/{id}/prompts/{type}/versions' \
  --header 'Authorization: Bearer ws_live_…'
```

## Responses

### 200: A page of versions

```json
{
  "data": [
    {
      "id": "68e61f7700093d5b1c02",
      "version": 8,
      "variant": "A",
      "name": null,
      "status": "live",
      "author": "api",
      "snapshot": false,
      "created_at": "2026-10-08T14:02:11.000+00:00",
      "characters": 175,
      "preview": "## Identity You are {{agent_name}} from {{company_name}}. ## Goal Qualify the lead, then send {{goal_link}}."
    },
    {
      "id": "68e60d3100212c0a9b41",
      "version": 7,
      "variant": "A",
      "name": null,
      "status": "inactive",
      "author": "dashboard",
      "snapshot": false,
      "created_at": "2026-10-07T09:18:22.000+00:00",
      "characters": 109,
      "preview": "## Identity You are {{agent_name}} from {{company_name}}. ## Goal Qualify the lead, then send {{goal_link}}."
    }
  ],
  "pagination": {
    "has_more": false,
    "next_cursor": "68e60d3100212c0a9b41"
  }
}
```

### 401: Missing, unknown or revoked API key

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 403: The key lacks the required scope (`insufficient_scope`), the plan does not have this part of the API (`not_in_plan`), or Instagram is not enabled on the workspace (`instagram_not_enabled`, Instagram routes)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 404: Resource not found in this workspace

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 409: This text keeps no history (follow-ups, group texts)

```json
{
  "error": {
    "code": "invalid_state",
    "message": "\"follow_up_cold_1\" keeps no history: only \"conversation\" and \"first_message\" are versioned. Its current text is in GET /campaigns/{id}/prompts/follow_up_cold_1."
  }
}
```

### 422: Invalid parameter or body (also an invalid or expired `cursor`)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```


Source: https://docs.whatsetter.com/api-reference/operations/listpromptversions/
