> ## 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 block version

> Makes the given published version the block's active one. This is what agent DRAFTS and previews resolve to; published agent versions keep their pin until they are republished (see /rollout).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/prompt-blocks/{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/prompt-blocks/{id}/activate:
    post:
      tags:
        - Prompt blocks
      summary: Activate block version
      description: >-
        Makes the given published version the block's active one. This is what
        agent DRAFTS and previews resolve to; published agent versions keep
        their pin until they are republished (see /rollout).
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: d41a8f6b-9c27-4b13-a5e8-2f60c1d7b394
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                version_number:
                  type: integer
                  example: 2
                version_id:
                  type: string
                  description: Alternative to `version_number` — one or the other.
                  example: 7e2b5a90-3c48-4d61-b9f7-05a8c2e14d6f
      responses:
        '200':
          description: The block, with `active_version_id` moved to the version you named
          content:
            application/json:
              schema:
                type: object
                properties:
                  block:
                    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.
        '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.

````