---
docId: doc_ba8a36f9c8194db6bc130b0d9d44c66f
title: Get a version
description: Gets an agent's version with its complete configuration, whether it is published or not.
api:
  group: agentes/versiones
  auth: bearer
  operations:
    - operationId: getVersion
      method: GET
      path: '/v1/agents/{agentId}/versions/{versionId}'
      postmanName: Get a version
---

<script>
  import { Ways } from '$lib/components';
</script>

# Get a version

Read a version’s complete configuration, whether it is published or not. Send the `versionId` you want to inspect; to edit it later, restore it to the draft.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/agents/$AGENT_ID/versions/v3 \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.agents.versions.get("agent_123", "v3");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `agentId` | string | Agent id | ✓ |
| `versionId` | string | Version id, for example `v5` | ✓ |

## Response

```json
{
  "status": "success",
  "data": {
    "versionId": "v5",
    "number": 5,
    "basedOnVersionId": "v4",
    "restoredFromVersionId": null,
    "copiedFrom": null,
    "createdAt": "2026-10-28T12:05:00.000Z",
    "createdBy": { "kind": "user", "email": "ana@acme.com" },
    "source": "mcp",
    "via": null,
    "note": "Shorter answers",
    "config": {
      "instructions": "You are the sales assistant for Acme Store. Answer in under 80 words."
    }
  }
}
```

The example shows only one section; `config` includes all 15 in full.

## Response fields

The fields of each version in [List versions](/api-reference/agents/versions/list#response-fields), plus:

| Field | Description |
|-------|-------------|
| `config` | The complete [configuration](/api-reference/agents/configuration) of that version. `instructions` is a string |

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `404` | `AGENT_NOT_FOUND` | The agent doesn't exist in the workspace or was deleted |
| `404` | `VERSION_NOT_FOUND` | That version doesn't exist on that agent |

```json
{
  "code": 404,
  "error": "Not Found - The resource doesn't exist",
  "details": {
    "code": "VERSION_NOT_FOUND",
    "message": "Version v9 of agent Xq8mTe2LwP4kZ1aB9cDf not found"
  }
}
```

## Notes

- To know which version is the draft and which is published, use [Get an agent](/api-reference/agents/get).
- A version isn't edited. To start from it, [restore it](/api-reference/agents/drafts/restore) into the draft.
