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

# Put Session Tags

> Create or replace tags on a browser session. This overwrites any existing tags
with the provided list. See [Session Tags](/advanced/session-tags).




## OpenAPI

````yaml /openapi.yaml put /v1/sessions/{session_id}/tags
openapi: 3.1.0
info:
  title: AnchorBrowser API
  version: 1.0.0
  description: APIs to manage all browser-related actions and configuration.
servers:
  - url: https://api.anchorbrowser.io
    description: API server
security: []
paths:
  /v1/sessions/{session_id}/tags:
    put:
      tags:
        - Browser Sessions
      summary: Put Session Tags
      description: >
        Create or replace tags on a browser session. This overwrites any
        existing tags

        with the provided list. See [Session Tags](/advanced/session-tags).
      parameters:
        - in: path
          name: session_id
          required: true
          description: The ID of the session to update tags for.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putSessionTags'
      responses:
        '200':
          description: Session tags updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTagsMutationResponse'
        '400':
          description: Invalid request or missing session ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid API Key or unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to update session tags.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api_key_header: []
components:
  schemas:
    putSessionTags:
      type: object
      description: Update/Create Browser Session tags, will overwrite existing tags
      required:
        - tags
      properties:
        tags:
          type: array
          items:
            type: string
          description: Tags to set on the session. Replaces any existing tags.
          example:
            - production
            - scraping
            - customer-123
    SessionTagsMutationResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the tags operation succeeded.
        message:
          type: string
          description: Human-readable result message.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
  securitySchemes:
    api_key_header:
      type: apiKey
      in: header
      name: anchor-api-key
      description: API key passed in the header

````