> 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.

# Get revision

GET https://api.smallest.ai/atoms/v1/agent/{id}/branches/{branchId}/revisions/{revisionId}

Return a single revision plus its `resolvedConfig` (the fully-merged agent config at that revision).

Reference: https://docs.smallest.ai/voice-agents/api-reference/agent-versioning-revisions/get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: atoms
  version: 1.0.0
paths:
  /agent/{id}/branches/{branchId}/revisions/{revisionId}:
    get:
      operationId: get
      summary: Get revision
      description: >-
        Return a single revision plus its `resolvedConfig` (the fully-merged
        agent config at that revision).
      tags:
        - agentVersioningRevisions
      parameters:
        - name: id
          in: path
          description: The agent ID.
          required: true
          schema:
            type: string
        - name: branchId
          in: path
          description: The branch ID.
          required: true
          schema:
            type: string
        - name: revisionId
          in: path
          description: >-
            The revision ID. Equal to the v1 `versionId` for revisions that were
            migrated from the v1 model.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            API key from the console ApiKey collection, sent as Bearer token.
            Also accepts session cookies for browser-based auth.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/agent_versioning_revisions_get_Response_200
        '400':
          description: >-
            Bad request. Invalid ID, or the revision does not belong to this
            branch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '404':
          description: >-
            Resource not found. The referenced ID does not exist or does not
            belong to the caller's organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRevisionRequestNotFoundError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
servers:
  - url: https://api.smallest.ai/atoms/v1
    description: Production server
components:
  schemas:
    RevisionStatus:
      type: string
      enum:
        - published
        - draft
        - archived
      title: RevisionStatus
    VersionBlocks:
      type: object
      properties:
        workflow_prompt:
          type: string
        workflow_tools:
          type: string
        workflow_graph:
          type: string
        llm:
          type: string
        voice:
          type: string
        language:
          type: string
        call_handling:
          type: string
        detection:
          type: string
        analytics:
          type: string
        timeouts:
          type: string
        audio:
          type: string
        privacy:
          type: string
        widget:
          type: string
        playbooks:
          type: string
          description: >-
            Only present on revisions created after multi-agent playbooks
            shipped.
      description: >-
        ObjectId references to the `AgentConfigBlock` docs that make up a
        revision, one per config section.
      title: VersionBlocks
    RevisionSecurityCheck:
      type: object
      properties:
        status:
          type: string
          description: The `SecurityCheckStatus` enum.
        reason:
          type:
            - string
            - 'null'
        triggeredAt:
          type:
            - string
            - 'null'
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
      description: Populated after publish. `null` on pre-feature versions.
      title: RevisionSecurityCheck
    RevisionPendingPublishState:
      type: string
      enum:
        - active
        - cancelled
      title: RevisionPendingPublishState
    RevisionPendingPublish:
      type: object
      properties:
        state:
          $ref: '#/components/schemas/RevisionPendingPublishState'
        startedBy:
          type: string
        startedAt:
          type: string
          format: date-time
      description: Set while a publish is armed against this draft revision.
      title: RevisionPendingPublish
    PromptScoreDimensionsItems:
      type: object
      properties:
        tier:
          type: integer
        level:
          type: string
        evidence_span:
          type: string
        title:
          type: string
        description:
          type: string
      title: PromptScoreDimensionsItems
    PromptScore:
      type: object
      properties:
        overall_score:
          type: number
          format: double
        overall_grade:
          type: string
        band:
          type: string
        estimated_ttft_overhead_ms:
          type: number
          format: double
        scoredAt:
          type: string
          format: date-time
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/PromptScoreDimensionsItems'
      description: Result of the prompt-scoring pass, if any.
      title: PromptScore
    Revision:
      type: object
      properties:
        _id:
          type: string
        agent:
          type: string
        status:
          $ref: '#/components/schemas/RevisionStatus'
        branch:
          type:
            - string
            - 'null'
          description: Owning branch (v2). `null` on legacy rows until backfilled.
        revisionNumber:
          type:
            - integer
            - 'null'
          description: Monotonic per-branch commit number. Only set on committed rows.
        versionNumber:
          type:
            - integer
            - 'null'
          description: >-
            Legacy v1 published-version number. `null` for branch revisions and
            drafts.
        label:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        isPinned:
          type: boolean
        publishedBy:
          type:
            - string
            - 'null'
        publishedAt:
          type:
            - string
            - 'null'
          format: date-time
        publishedByName:
          type:
            - string
            - 'null'
          description: Display name of the publisher. `null` when unresolvable.
        restoredFromLabel:
          type:
            - string
            - 'null'
          description: >-
            On a commit produced by restore, the label of the revision it
            copied.
        draftId:
          type:
            - string
            - 'null'
        draftName:
          type:
            - string
            - 'null'
        draftRevision:
          type:
            - integer
            - 'null'
        sourceVersionId:
          type:
            - string
            - 'null'
        blocks:
          $ref: '#/components/schemas/VersionBlocks'
        workflowType:
          type: string
          description: The `WorkflowType` enum for this revision.
        parentVersion:
          type:
            - string
            - 'null'
        isActive:
          type: boolean
        activatedBy:
          type:
            - string
            - 'null'
        activatedAt:
          type:
            - string
            - 'null'
          format: date-time
        securityCheck:
          oneOf:
            - $ref: '#/components/schemas/RevisionSecurityCheck'
            - type: 'null'
          description: Populated after publish. `null` on pre-feature versions.
        pendingPublish:
          oneOf:
            - $ref: '#/components/schemas/RevisionPendingPublish'
            - type: 'null'
          description: Set while a publish is armed against this draft revision.
        restoredFromRevisionId:
          type:
            - string
            - 'null'
          description: On a commit produced by restore, the revision it copied.
        sourceDraftId:
          type:
            - string
            - 'null'
        promptScore:
          $ref: '#/components/schemas/PromptScore'
        promptScoreStale:
          type: boolean
        createdBy:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      description: >
        An `AgentVersion` document. Represents either a committed revision
        (`status: published`, with `branch` + `revisionNumber`) or an
        in-progress draft revision (`status: draft`, with `draftId` +
        `draftRevision`). Fields that do not apply to a given row are `null`.
      title: Revision
    AgentIdBranchesBranchIdRevisionsRevisionIdGetResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        revision:
          $ref: '#/components/schemas/Revision'
        resolvedConfig:
          type: object
          additionalProperties:
            description: Any type
          description: Fully-merged agent config at this revision.
      title: >-
        AgentIdBranchesBranchIdRevisionsRevisionIdGetResponsesContentApplicationJsonSchemaData
    agent_versioning_revisions_get_Response_200:
      type: object
      properties:
        status:
          type: boolean
        data:
          $ref: >-
            #/components/schemas/AgentIdBranchesBranchIdRevisionsRevisionIdGetResponsesContentApplicationJsonSchemaData
      title: agent_versioning_revisions_get_Response_200
    BadRequestErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: BadRequestErrorResponse
    UnauthorizedErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: UnauthorizedErrorResponse
    ApiResponseData:
      type: object
      properties: {}
      title: ApiResponseData
    ApiResponse:
      type: object
      properties:
        status:
          type: boolean
        data:
          $ref: '#/components/schemas/ApiResponseData'
      title: ApiResponse
    GetRevisionRequestNotFoundError:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: GetRevisionRequestNotFoundError
    InternalServerErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: InternalServerErrorResponse
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from the console ApiKey collection, sent as Bearer token. Also
        accepts session cookies for browser-based auth.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "status": true,
  "data": {
    "revision": {
      "_id": "5f8d0d55b54764421b7156c1",
      "agent": "5f8d0d55b54764421b7156b9",
      "status": "published",
      "branch": "5f8d0d55b54764421b7156b5",
      "revisionNumber": 12,
      "versionNumber": 34,
      "label": "Initial Release",
      "description": "First stable version of the agent configuration.",
      "isPinned": false,
      "publishedBy": "user_12345",
      "publishedAt": "2024-01-15T09:30:00Z",
      "publishedByName": "Alice Johnson",
      "restoredFromLabel": null,
      "draftId": null,
      "draftName": null,
      "draftRevision": null,
      "sourceVersionId": "5f8d0d55b54764421b7156a9",
      "blocks": {
        "workflow_prompt": "5f8d0d55b54764421b7156d0",
        "workflow_tools": "5f8d0d55b54764421b7156d1",
        "workflow_graph": "5f8d0d55b54764421b7156d2",
        "llm": "5f8d0d55b54764421b7156d3",
        "voice": "5f8d0d55b54764421b7156d4",
        "language": "5f8d0d55b54764421b7156d5",
        "call_handling": "5f8d0d55b54764421b7156d6",
        "detection": "5f8d0d55b54764421b7156d7",
        "analytics": "5f8d0d55b54764421b7156d8",
        "timeouts": "5f8d0d55b54764421b7156d9",
        "audio": "5f8d0d55b54764421b7156da",
        "privacy": "5f8d0d55b54764421b7156db",
        "widget": "5f8d0d55b54764421b7156dc",
        "playbooks": "5f8d0d55b54764421b7156dd"
      },
      "workflowType": "standard",
      "parentVersion": "5f8d0d55b54764421b7156a8",
      "isActive": true,
      "activatedBy": "user_12345",
      "activatedAt": "2024-01-15T10:00:00Z",
      "securityCheck": {
        "status": "passed",
        "reason": null,
        "triggeredAt": "2024-01-15T09:45:00Z",
        "completedAt": "2024-01-15T09:50:00Z"
      },
      "pendingPublish": null,
      "restoredFromRevisionId": null,
      "sourceDraftId": null,
      "promptScore": {
        "overall_score": 92.5,
        "overall_grade": "A",
        "band": "high",
        "estimated_ttft_overhead_ms": 120.5,
        "scoredAt": "2024-01-15T09:55:00Z",
        "dimensions": [
          {
            "tier": 1,
            "level": "high",
            "evidence_span": "Prompt section 2",
            "title": "Relevance",
            "description": "The prompt is highly relevant to the task."
          }
        ]
      },
      "promptScoreStale": false,
      "createdBy": "user_12345",
      "createdAt": "2024-01-10T08:00:00Z",
      "updatedAt": "2024-01-15T09:30:00Z"
    },
    "resolvedConfig": {
      "language": "en-US",
      "voice": "female-1",
      "timeoutSeconds": 30,
      "callHandling": {
        "voicemailEnabled": true,
        "callRecording": false
      },
      "analytics": {
        "enabled": true,
        "trackingId": "UA-12345678-9"
      },
      "privacy": {
        "dataRetentionDays": 90,
        "anonymizeCalls": true
      },
      "widget": {
        "theme": "dark",
        "position": "bottom-right"
      },
      "playbooks": {
        "enabled": true,
        "defaultPlaybookId": "playbook_7890"
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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/branches/branchId/revisions/revisionId")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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/branches/branchId/revisions/revisionId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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

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()
```