# Lists the agent's saved system prompt versions.

GET https://api.awork.com/api/v1/agents/{agentId}/systempromptversions

Lists the saved system prompt versions for the specified custom agent.
            Use a returned version id with the system prompt restore endpoint to restore an earlier prompt.
            <Check title="Required Permissions" icon="key">The user must have read access to the agent.</Check>

## Request example

```sh
curl -X GET --globoff 'https://api.awork.com/api/v1/agents/{agentId}/systempromptversions' \
  -H 'Authorization: Bearer <token>'
```

- path parameter `agentId`: string (required). The agent id.

## Response 200

OK

application/json

```json
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "agentId": "123e4567-e89b-12d3-a456-426614174000",
    "versionNumber": 1,
    "isCurrent": true,
    "systemPrompt": "string",
    "createdOn": "2026-01-15T09:30:00Z",
    "createdBy": "123e4567-e89b-12d3-a456-426614174000"
  }
]
```

## Response 401

Unauthorized

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```

## Response 404

Not Found

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```
