> 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 active drafts GET https://api.smallest.ai/atoms/v1/agent/{id}/drafts **Deprecated on the v2 branch model.** Migrate to `GET /agent/{id}/branches (`openDraftId`/`hasOpenDraft`)`. 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 all active (non-discarded) drafts for an agent. Reference: https://docs.smallest.ai/api-reference/voice-agents/agent-versioning-drafts/list-active-drafts ## 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. ## Response ### 200 Successful response - `status` (boolean, optional) - `data` (list of AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItems, optional) ## Errors ### 401 Unauthorized Error Unauthorized access - `status` (boolean, optional) - `errors` (list of string, optional) ### 403 Forbidden Error Forbidden access - `status` (boolean, optional) - `data` (ApiResponseData, optional) ### 404 Not Found Error Agent not found - `any` ### 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 ### AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItems 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` (AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsBlocks, 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) - `lastEditorName` (string, optional, nullable) — Display name of the last editor ### ApiResponseData ### AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsBlocks 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": [ { "_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", "lastEditorName": "string" } ] } ``` **SDK Code** ```python import requests url = "https://api.smallest.ai/atoms/v1/agent/id/drafts" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.smallest.ai/atoms/v1/agent/id/drafts'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; 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/drafts" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") 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/drafts") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.smallest.ai/atoms/v1/agent/id/drafts") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.smallest.ai/atoms/v1/agent/id/drafts', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.smallest.ai/atoms/v1/agent/id/drafts"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.smallest.ai/atoms/v1/agent/id/drafts")! 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() ```