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

# Restore a revision

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

Republish an older revision as a new revision at the head of this branch. Restore does not overwrite history; the older revision keeps its ID, and a new revision is committed on top.

The response mirrors `POST /agent/{id}/branches/{branchId}/draft/publish`: `200 committed` if the scan is synchronous, `202 scanning` if deferred. Only one publish or restore can be in flight per branch at a time.


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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: atoms
  version: 1.0.0
paths:
  /agent/{id}/branches/{branchId}/revisions/{revisionId}/restore:
    post:
      operationId: restore
      summary: Restore a revision
      description: >
        Republish an older revision as a new revision at the head of this
        branch. Restore does not overwrite history; the older revision keeps its
        ID, and a new revision is committed on top.


        The response mirrors `POST
        /agent/{id}/branches/{branchId}/draft/publish`: `200 committed` if the
        scan is synchronous, `202 scanning` if deferred. Only one publish or
        restore can be in flight per branch at a time.
      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: Restored synchronously.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/agent_versioning_revisions_restore_Response_200
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: >-
            Forbidden. Source revision has not passed its security scan, or the
            caller lacks write 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/RestoreRevisionRequestNotFoundError'
        '409':
          description: >-
            Conflict. The request cannot be completed because of the current
            state of the resource (name already exists, another publish or
            restore is in progress, the source draft failed its security scan,
            or a similar in-flight collision).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictErrorResponse'
        '423':
          description: >-
            Locked. A configuration freeze is active on this agent, or the
            resource is temporarily locked for another write. Retry after the
            freeze window ends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LockedErrorResponse'
        '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:
    PublishResultState:
      type: string
      enum:
        - scanning
        - committed
      title: PublishResultState
    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
    PublishResult:
      type: object
      properties:
        state:
          $ref: '#/components/schemas/PublishResultState'
        revision:
          oneOf:
            - $ref: '#/components/schemas/Revision'
            - type: 'null'
          description: >-
            The newly committed revision. Populated when `state` is `committed`,
            absent when `state` is `scanning`.
      description: >
        Result of publish or restore.


        - `state: "committed"` (HTTP `200`) is returned when the commit is
        synchronous. This happens for restore (the source revision has already
        been scanned) and for publishes whose content does not need a fresh
        scan. The response includes the new revision object under `revision`.

        - `state: "scanning"` (HTTP `202`) is returned when a security scan is
        deferred. In this case the response body carries only `state`.
        `revision` is absent, and clients must list the branch's revisions
        newest-first (`GET /agent/{id}/branches/{branchId}/revisions?limit=1`)
        to obtain the new revision ID. Then poll `GET
        /agent/{id}/branches/{branchId}/revisions/{revisionId}` until
        `revision.status` flips from any transient value to `"published"`. On
        the revision doc the lifecycle field is `status` (not `state`), and the
        security-scan sub-lifecycle is on the nested `securityCheck.status`.
      title: PublishResult
    agent_versioning_revisions_restore_Response_200:
      type: object
      properties:
        status:
          type: boolean
        data:
          $ref: '#/components/schemas/PublishResult'
      title: agent_versioning_revisions_restore_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
    RestoreRevisionRequestNotFoundError:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: RestoreRevisionRequestNotFoundError
    ConflictErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        error_type:
          type: string
        errors:
          type: array
          items:
            type: string
      description: >
        Generic conflict body. `error_type` is a stable machine-readable
        discriminator (for example `branch_name_exists`, `source_has_no_commit`,
        `source_scanning`, `publish_in_progress`, `no_committed_revision`).
      title: ConflictErrorResponse
    LockedErrorResponseErrorType:
      type: string
      enum:
        - config_freeze_active
      title: LockedErrorResponseErrorType
    LockedErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        error_type:
          $ref: '#/components/schemas/LockedErrorResponseErrorType'
        errors:
          type: array
          items:
            type: string
      description: >
        Config-freeze body. Returned on write endpoints during a maintenance
        window (`AGENT_CONFIG_FROZEN`). Reads and test-calls pass.
      title: LockedErrorResponse
    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

### Example 1



**Request**

```json
{}
```

**Response**

```json
{
  "status": true,
  "data": {
    "state": "scanning",
    "revision": {
      "_id": "64b8f9a2e4b0c123456789ab",
      "agent": "64b8f9a2e4b0c123456789ac",
      "status": "published",
      "branch": "64b8f9a2e4b0c123456789ad",
      "revisionNumber": 42,
      "versionNumber": null,
      "label": "Restore of v1.3.7",
      "description": "Restored revision from previous stable release",
      "isPinned": false,
      "publishedBy": "user_987654321",
      "publishedAt": "2024-01-15T09:30:00Z",
      "publishedByName": "Jane Doe",
      "restoredFromLabel": "v1.3.7",
      "draftId": null,
      "draftName": null,
      "draftRevision": null,
      "sourceVersionId": "64b8f9a2e4b0c123456789ae",
      "blocks": {
        "workflow_prompt": "64b8f9a2e4b0c123456789af",
        "workflow_tools": "64b8f9a2e4b0c123456789b0",
        "workflow_graph": "64b8f9a2e4b0c123456789b1",
        "llm": "64b8f9a2e4b0c123456789b2",
        "voice": "64b8f9a2e4b0c123456789b3",
        "language": "64b8f9a2e4b0c123456789b4",
        "call_handling": "64b8f9a2e4b0c123456789b5",
        "detection": "64b8f9a2e4b0c123456789b6",
        "analytics": "64b8f9a2e4b0c123456789b7",
        "timeouts": "64b8f9a2e4b0c123456789b8",
        "audio": "64b8f9a2e4b0c123456789b9",
        "privacy": "64b8f9a2e4b0c123456789ba",
        "widget": "64b8f9a2e4b0c123456789bb",
        "playbooks": "64b8f9a2e4b0c123456789bc"
      },
      "workflowType": "standard",
      "parentVersion": "64b8f9a2e4b0c123456789bd",
      "isActive": true,
      "activatedBy": "user_987654321",
      "activatedAt": "2024-01-15T09:30:00Z",
      "securityCheck": {
        "status": "pending",
        "reason": "Awaiting full scan completion",
        "triggeredAt": "2024-01-15T09:30:00Z",
        "completedAt": null
      },
      "pendingPublish": {
        "state": "active",
        "startedBy": "user_987654321",
        "startedAt": "2024-01-15T09:30:00Z"
      },
      "restoredFromRevisionId": "64b8f9a2e4b0c123456789ae",
      "sourceDraftId": null,
      "promptScore": {
        "overall_score": 87.5,
        "overall_grade": "B+",
        "band": "high",
        "estimated_ttft_overhead_ms": 120.5,
        "scoredAt": "2024-01-15T09:30:00Z",
        "dimensions": [
          {
            "tier": 2,
            "level": "moderate",
            "evidence_span": "workflow_prompt",
            "title": "Prompt Clarity",
            "description": "The prompt is clear but could be more concise."
          }
        ]
      },
      "promptScoreStale": false,
      "createdBy": "user_987654321",
      "createdAt": "2024-01-15T09:00:00Z",
      "updatedAt": "2024-01-15T09:30:00Z"
    }
  }
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId/restore';
const options = {
  method: 'POST',
  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/restore"

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

	req, _ := http.NewRequest("POST", 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/restore")

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

request = Net::HTTP::Post.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.post("https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId/restore")
  .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('POST', 'https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId/restore', [
  '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/restore");
var request = new RestRequest(Method.POST);
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/restore")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Example 2



**Request**

```json
{}
```

**Response**

```json
{
  "status": true,
  "data": {
    "state": "scanning",
    "revision": {
      "_id": "64b8f9a2e4b0c123456789ab",
      "agent": "64b8f9a2e4b0c123456789ac",
      "status": "published",
      "branch": "64b8f9a2e4b0c123456789ad",
      "revisionNumber": 42,
      "versionNumber": null,
      "label": "Restore of v1.3.7",
      "description": "Restored revision from previous stable release",
      "isPinned": false,
      "publishedBy": "user_987654321",
      "publishedAt": "2024-01-15T09:30:00Z",
      "publishedByName": "Jane Doe",
      "restoredFromLabel": "v1.3.7",
      "draftId": null,
      "draftName": null,
      "draftRevision": null,
      "sourceVersionId": "64b8f9a2e4b0c123456789ae",
      "blocks": {
        "workflow_prompt": "64b8f9a2e4b0c123456789af",
        "workflow_tools": "64b8f9a2e4b0c123456789b0",
        "workflow_graph": "64b8f9a2e4b0c123456789b1",
        "llm": "64b8f9a2e4b0c123456789b2",
        "voice": "64b8f9a2e4b0c123456789b3",
        "language": "64b8f9a2e4b0c123456789b4",
        "call_handling": "64b8f9a2e4b0c123456789b5",
        "detection": "64b8f9a2e4b0c123456789b6",
        "analytics": "64b8f9a2e4b0c123456789b7",
        "timeouts": "64b8f9a2e4b0c123456789b8",
        "audio": "64b8f9a2e4b0c123456789b9",
        "privacy": "64b8f9a2e4b0c123456789ba",
        "widget": "64b8f9a2e4b0c123456789bb",
        "playbooks": "64b8f9a2e4b0c123456789bc"
      },
      "workflowType": "standard",
      "parentVersion": "64b8f9a2e4b0c123456789bd",
      "isActive": true,
      "activatedBy": "user_987654321",
      "activatedAt": "2024-01-15T09:30:00Z",
      "securityCheck": {
        "status": "pending",
        "reason": "Awaiting full scan completion",
        "triggeredAt": "2024-01-15T09:30:00Z",
        "completedAt": null
      },
      "pendingPublish": {
        "state": "active",
        "startedBy": "user_987654321",
        "startedAt": "2024-01-15T09:30:00Z"
      },
      "restoredFromRevisionId": "64b8f9a2e4b0c123456789ae",
      "sourceDraftId": null,
      "promptScore": {
        "overall_score": 87.5,
        "overall_grade": "B+",
        "band": "high",
        "estimated_ttft_overhead_ms": 120.5,
        "scoredAt": "2024-01-15T09:30:00Z",
        "dimensions": [
          {
            "tier": 2,
            "level": "moderate",
            "evidence_span": "workflow_prompt",
            "title": "Prompt Clarity",
            "description": "The prompt is clear but could be more concise."
          }
        ]
      },
      "promptScoreStale": false,
      "createdBy": "user_987654321",
      "createdAt": "2024-01-15T09:00:00Z",
      "updatedAt": "2024-01-15T09:30:00Z"
    }
  }
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId/restore';
const options = {
  method: 'POST',
  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/restore"

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

	req, _ := http.NewRequest("POST", 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/restore")

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

request = Net::HTTP::Post.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.post("https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId/restore")
  .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('POST', 'https://api.smallest.ai/atoms/v1/agent/id/branches/branchId/revisions/revisionId/restore', [
  '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/restore");
var request = new RestRequest(Method.POST);
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/restore")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```