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

# List Agent Versions

Use this API to fetch the version history for a custom agent. A new version is created automatically on every [Update Agent Version](/docs/api-reference/rest-apis/v2/agents/version/update) call. Versions are returned newest-first (descending by version number). Each version is a **behavioral** snapshot of the agent at that point in time — identity fields (`name`, `description`, `enabled`, `managedBy`) live on the root agent document and are not part of version snapshots.

Any auth secrets in a version snapshot are redacted (`"__redacted__"`) before the response is returned: both `rest-api` strategy secrets and `mcp-tools` server secrets (`execution.mcpServers[].auth`).

# Endpoint

`POST https://api.velt.dev/v2/agents/versions/list`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/docs/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="agentId" type="string" required>
      Min 1 char. Agent ID.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

```JSON theme={null}
{
  "data": {
    "agentId": "abc123def456"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Versions listed successfully",
    "data": {
      "versions": [
        {
          "id": "v3",
          "version": 3,
          "createdAt": 1711900000000,
          "instructions": "Check headings use 'Inter' font. Verify #1A73E8 on all CTAs and links.",
          "contextGathering": {
            "strategies": ["web-page-text", "web-page-screenshot", "web-page-html"]
          },
          "execution": {
            "executionStrategy": "ai",
            "responseDescriptions": { "title": "Short name for the brand inconsistency" }
          },
          "postProcess": {
            "guardrails": { "enabled": true },
            "deletePreviousSuggestions": { "enabled": true }
          }
        },
        {
          "id": "v2",
          "version": 2,
          "createdAt": 1711800000000,
          "instructions": "Check headings use 'Inter' font. Verify #1A73E8 on all CTAs and links.",
          "contextGathering": { "strategies": ["web-page-text", "web-page-screenshot"] },
          "execution": { "executionStrategy": "ai" }
        },
        {
          "id": "v1",
          "version": 1,
          "createdAt": 1711700000000,
          "instructions": "Check headings use Inter font...",
          "contextGathering": { "strategies": ["web-page-text"] }
        }
      ]
    }
  }
}
```

| Field                  | Type      | Description                                             |
| ---------------------- | --------- | ------------------------------------------------------- |
| `data.versions`        | object\[] | Version snapshots, newest first.                        |
| `versions[].id`        | string    | Version document ID in the `v{N}` format (e.g. `"v3"`). |
| `versions[].version`   | number    | Version number.                                         |
| `versions[].createdAt` | number    | Epoch ms when the version was created.                  |

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "NOT_FOUND"
  }
}
```

**Errors:** `NOT_FOUND` (`Store database not found`, or agent does not exist).

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Versions listed successfully",
      "data": {
        "versions": []
      }
    }
  }
  ```
</ResponseExample>
