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

# Activate agent version

> Makes the given published version the active one (same agent). Activating a draft or a version of another agent is rejected.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/agents/{id}/activate
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/agents/{id}/activate:
    post:
      tags:
        - Agents
      summary: Activate agent version
      description: >-
        Makes the given published version the active one (same agent).
        Activating a draft or a version of another agent is rejected.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: 6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                version_number:
                  type: integer
                  example: 3
                version_id:
                  type: string
                  description: Alternative to `version_number` — one or the other.
                  example: b3f7a2c8-5d19-4e6b-8f02-1a4c9e7d3b55
      responses:
        '200':
          description: The agent, with `active_version_id` moved to the version you named
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      org_id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      active_version_id:
                        type: string
                        format: uuid
                        nullable: true
                        description: Null until a published version is activated.
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
        '400':
          description: Bad target (e.g. not published)
        '404':
          description: Not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````