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

# Replace Stored Version

> Overwrite an existing version snapshot by its numeric versionId.



## OpenAPI

````yaml post /api/v2/agent/{agentId}/versions/{versionId}
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}:
    post:
      tags:
        - Agents
      summary: Replace Stored Version
      description: Overwrite an existing version snapshot by its numeric versionId.
      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 identifying the snapshot
          example: 1750195000123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - snapshot
              properties:
                snapshot:
                  type: object
                  description: Full campaign JSON to store
      responses:
        '200':
          description: Version replaced
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  versionId:
                    type: integer
                    example: 1750195000123
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````