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

# Restore Version to Agent

> Copy a stored snapshot into the staging (default) slot.



## OpenAPI

````yaml post /api/v2/agent/{agentId}/versions/{versionId}/restore
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/agent/{agentId}/versions/{versionId}/restore:
    post:
      tags:
        - Agents
      summary: Restore Version to Agent
      description: Copy a stored snapshot into the staging (default) slot.
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
          description: Agent Id
        - name: versionId
          in: path
          required: true
          schema:
            type: string
          description: Epoch-ms score of the snapshot
          example: 1750195000123
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  type: string
                  enum:
                    - staging
                    - default
                  default: staging
      responses:
        '200':
          description: Snapshot restored
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  restored:
                    type: object
                    description: The campaign object now occupying the target slot
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````