> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# List published versions

GET https://api.smallest.ai/atoms/v1/agent/{id}/versions

**Deprecated on the v2 branch model.** Migrate to `GET /agent/{id}/branches/{branchId}/revisions`. When `ENABLE_BRANCH_MODEL` is on, this endpoint returns `409 versioning_v2_migration_required` with the `Deprecation: true` header. See the [migration guide](/voice-agents/deprecations/agent-versioning-migration).

|
List published versions for an agent with pagination and optional pin filter.
The `total` value currently represents the total number of published versions
for the agent, not necessarily the filtered count when `isPinned` is used.

Reference: https://docs.smallest.ai/api-reference/voice-agents/agent-versioning-versions/list-published-versions

## Authentication

- `Authorization` header (bearer token, required) — API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

## Request

### Path parameters

- `id` (string, required) — The agent ID.

### Query parameters

- `limit` (integer, optional, default: 20) — Number of versions to return (1-100, default 20)
- `skip` (integer, optional, default: 0) — Number of versions to skip (default 0)
- `isPinned` (boolean, optional) — Filter by pinned status

## Response

### 200

Successful response

- `status` (boolean, optional)
- `data` (AgentIdVersionsGetResponsesContentApplicationJsonSchemaData, optional)

## Errors

### 400 Bad Request Error

Invalid input

- `status` (boolean, optional)
- `errors` (list of string, optional)

### 401 Unauthorized Error

Unauthorized access

- `status` (boolean, optional)
- `errors` (list of string, optional)

### 403 Forbidden Error

Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.

- `status` (boolean, optional)
- `data` (ApiResponseData, optional)

### 404 Not Found Error

Agent not found

- `status` (boolean, optional)
- `errors` (list of string, optional)

### 409 Conflict Error

The v1 versioning endpoint is deprecated on the branch model and will not process this request. The response body carries `error_type: "versioning_v2_migration_required"` and the response includes the `Deprecation: true` header. See the [migration guide](/voice-agents/deprecations/agent-versioning-migration) for the v2 equivalent.

- `status` (boolean, optional)
- `error_type` (enum, optional)
  - Allowed values: `versioning_v2_migration_required`
- `errors` (list of string, optional)

### 500 Internal Server Error

Internal server error

- `status` (boolean, optional)
- `errors` (list of string, optional)

## Types

### AgentIdVersionsGetResponsesContentApplicationJsonSchemaData

- `versions` (list of AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItems, optional)
- `total` (integer, optional) — Total published versions for the agent. When `isPinned` is used, this may not equal the filtered result count.

### ApiResponseData

### AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItems

Represents either a draft revision or a published version of an agent's configuration.

- `_id` (string, optional) — Unique identifier
- `agent` (string, optional) — The agent this version belongs to
- `status` (enum, optional) — Current status of the version record
  - Allowed values: `published`, `draft`, `archived`
- `versionNumber` (integer, optional, nullable) — Auto-incremented version number (published versions only)
- `label` (string, optional, nullable) — Human-readable label for the version
- `description` (string, optional, nullable) — Description of what changed in this version
- `isPinned` (boolean, optional, default: false) — Whether the version is pinned for quick access
- `publishedBy` (string, optional, nullable) — User ID of who published this version
- `publishedAt` (datetime, optional, nullable) — When this version was published
- `activatedBy` (string, optional, nullable) — User ID of who activated this version
- `activatedAt` (datetime, optional, nullable) — When this version was activated
- `draftId` (string, optional, nullable) — Unique draft identifier (drafts only)
- `draftName` (string, optional, nullable) — Human-readable draft name
- `draftRevision` (integer, optional, nullable) — Revision number within the draft (drafts only)
- `sourceVersionId` (string, optional, nullable) — The published version this draft was branched from
- `blocks` (AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsBlocks, optional) — References to the 13 config section blocks
- `workflowType` (enum, optional) — The type of workflow configuration. - `single_prompt` — simple prompt-based agent (default). - `workflow_graph` — node-based visual workflow. **Restricted:** requires the `conversational-agents` org flag. Requests without that flag receive HTTP 403 `"Conversational Flow agents are no longer available for your organization."` The Zod validator still accepts this enum value on any org, but the authorization middleware gates it. - `multi_agents` — multi-agent orchestration (restricted; requires `slmModel` to be one of `[electron, gpt-5.2-azure]`).
  - Allowed values: `workflow_graph`, `single_prompt`, `multi_agents`
- `parentVersion` (string, optional, nullable) — The version this was derived from
- `isActive` (boolean, optional) — Whether this is the currently active version for the agent
- `createdBy` (string, optional) — User ID of who created this record
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)
- `publishedByName` (string, optional, nullable) — Display name of the user who published
- `activatedByName` (string, optional, nullable) — Display name of the user who activated the version

### AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsBlocks

References to the 13 config section blocks

- `workflow_prompt` (string, optional)
- `workflow_tools` (string, optional)
- `workflow_graph` (string, optional)
- `llm` (string, optional)
- `voice` (string, optional)
- `language` (string, optional)
- `call_handling` (string, optional)
- `detection` (string, optional)
- `analytics` (string, optional)
- `timeouts` (string, optional)
- `audio` (string, optional)
- `privacy` (string, optional)
- `widget` (string, optional)

## Examples

**Response**

```json
{
  "status": true,
  "data": {
    "versions": [
      {
        "_id": "string",
        "agent": "string",
        "status": "published",
        "versionNumber": 1,
        "label": "string",
        "description": "string",
        "isPinned": false,
        "publishedBy": "string",
        "publishedAt": "2024-01-15T09:30:00Z",
        "activatedBy": "string",
        "activatedAt": "2024-01-15T09:30:00Z",
        "draftId": "string",
        "draftName": "string",
        "draftRevision": 1,
        "sourceVersionId": "string",
        "blocks": {
          "workflow_prompt": "string",
          "workflow_tools": "string",
          "workflow_graph": "string",
          "llm": "string",
          "voice": "string",
          "language": "string",
          "call_handling": "string",
          "detection": "string",
          "analytics": "string",
          "timeouts": "string",
          "audio": "string",
          "privacy": "string",
          "widget": "string"
        },
        "workflowType": "workflow_graph",
        "parentVersion": "string",
        "isActive": true,
        "createdBy": "string",
        "createdAt": "2024-01-15T09:30:00Z",
        "updatedAt": "2024-01-15T09:30:00Z",
        "publishedByName": "string",
        "activatedByName": "string"
      }
    ],
    "total": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.smallest.ai/atoms/v1/agent/id/versions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.smallest.ai/atoms/v1/agent/id/versions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.smallest.ai/atoms/v1/agent/id/versions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.smallest.ai/atoms/v1/agent/id/versions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.smallest.ai/atoms/v1/agent/id/versions")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.smallest.ai/atoms/v1/agent/id/versions', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.smallest.ai/atoms/v1/agent/id/versions");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.smallest.ai/atoms/v1/agent/id/versions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```