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

# Tag a branch as staging

> Tag a branch as staging to deploy it to pre-release. Only direct children of main can be tagged, and one branch holds the staging tag per project.



## OpenAPI

````yaml api-reference/agents/openapi.json PUT /v1/agents/{agentId}/branches/{branchId}/tag
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/tag:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
    put:
      tags:
        - Branches
      summary: Tag a branch as staging
      description: >-
        Tag a branch as staging to deploy it to pre-release. Only direct
        children of main can be tagged, and one branch holds the staging tag per
        project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagBranchPublicBody'
      responses:
        '200':
          description: Branch tagged as staging
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagBranchPublicResponse'
        '404':
          description: >-
            BRANCH_NOT_FOUND: no such branch.
            DEPLOYMENT_SIMPLIFICATION_INACTIVE: the project is not on simplified
            deployment, or main has changes not yet published to live
        '409':
          description: >-
            Another branch already holds the staging tag, or BRANCH_NOT_ACTIVE:
            the branch has been merged or deleted
        '422':
          description: The branch is not a direct child of main
components:
  schemas:
    TagBranchPublicBody:
      type: object
      title: TagBranchPublicBody
      description: Tag a branch as staging to deploy it to pre-release.
      properties:
        tag:
          type: string
          enum:
            - staging
      required:
        - tag
      additionalProperties: false
    TagBranchPublicResponse:
      type: object
      title: TagBranchPublicResponse
      description: Confirmation that a branch was tagged.
      properties:
        branchId:
          type: string
        tag:
          type: string
        message:
          type: string
      required:
        - branchId
        - tag
        - message
      additionalProperties: false
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````