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

# Get Latest Agent Version

> Retrieve the newest saved version with its full snapshot.

### Overview

Returns the head of the agent's dev timeline, including the full configuration snapshot. Pass `branch` to read a branch's head instead; a branch with no saves of its own returns the version it was cut from. Use the returned `id` and `revision` as `parent_version_id` and `parent_revision` in [Create Agent Version](https://docs.bland.ai/api-v2/post/agents-id-versions.md) to save safely on top of it.

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

**agent\_id** `string` *required*

The agent's unique identifier. A fresh agent with no saved versions returns `404 NO_VERSIONS`.

### Query Parameters

**branch** `string`

An open branch's ID. Returns that branch's newest save, falling back to its base version when the branch has none. Returns `404 BRANCH_NOT_FOUND` if the branch is not open or does not belong to this agent.

### Response

**data** `object`

The newest version, with its snapshot.

**version object**

**id** `string`

Unique identifier for the version.

**org\_id** `string`

The organization that owns the agent.

**agent\_id** `string`

The agent this version belongs to.

**branch\_id** `string | null`

The branch the version was saved onto, or `null` on the dev timeline. When `branch` falls back to the base version, this is `null` because the base lives on the dev timeline.

**snapshot** `object`

The saved configuration: `behavior` (the node and edge graph), `settings` (agent-wide options), `contact` (`inboundNumbers`), and `knowledge` (`kbIds`) when present.

**name** `string | null`

The version's display name, or `null` if none was given.

**created\_via** `string`

`manual` or `autosave`.

**revision** `integer`

Incremented each time an autosave rewrites this row in place. Send it back as `parent_revision` when saving.

**created\_by** `string | null`

ID of the user who saved the version, or `null` when saved with an org-level key.

**created\_at** `string`

ISO 8601 timestamp of the first write.

**errors** `null | array`

`null` on success, or a list of error objects if the request failed.

```json Response theme={null}
{
  "data": {
    "id": "947368cd-ea03-48e1-8d14-84f62a1be090",
    "org_id": "4afedeaf-2bb5-4646-91d5-cb2b8d5e6bf2",
    "agent_id": "9f242ae9-7d90-49df-8bd9-8450a97f1504",
    "branch_id": null,
    "snapshot": {
      "behavior": {
        "nodes": [
          {
            "id": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
            "type": "start",
            "position": { "x": 0, "y": 0 },
            "data": {}
          },
          {
            "id": "c0b9fdb4-62e6-4950-a099-bc24604555c1",
            "type": "scenario",
            "position": { "x": 320, "y": 0 },
            "data": {
              "name": "Reschedule",
              "rule": "Find the caller's existing appointment and offer the next three open slots.",
              "target": { "kind": "dialogue", "label": "Reschedule" },
              "loopWhile": "",
              "variables": [],
              "entry": {
                "mode": "llm",
                "label": "Caller wants to move an appointment",
                "description": "",
                "alwaysPick": false,
                "conditions": []
              }
            }
          }
        ],
        "edges": [
          {
            "id": "74c3c224-a701-44ea-bf53-fef3f6028dc1",
            "source": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
            "target": "c0b9fdb4-62e6-4950-a099-bc24604555c1"
          }
        ]
      },
      "settings": {
        "displayName": "Front desk",
        "systemPrompt": "You are the front desk assistant for a dental clinic.",
        "languages": ["en"],
        "enableMemory": false,
        "backgroundNoise": "off"
      },
      "contact": {
        "inboundNumbers": ["+14155550123"]
      },
      "knowledge": {
        "kbIds": []
      }
    },
    "name": null,
    "created_via": "autosave",
    "revision": 4,
    "created_by": "174ee50e-166c-41ff-8aa0-7c44ebb6e832",
    "created_at": "2026-09-10T23:41:07.902Z"
  },
  "errors": null
}
```

```json No Versions theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "NO_VERSIONS",
      "message": "Agent has no versions yet"
    }
  ]
}
```

```json Branch Not Found theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "BRANCH_NOT_FOUND",
      "message": "Branch not found"
    }
  ]
}
```

```json Not Found theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "NOT_FOUND",
      "message": "Agent not found"
    }
  ]
}
```

***

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.