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

# Assign Tag

> Assign a tag value to a library entity. An entity carries at most one value per group, so this replaces any value it already had in that group. The tag's group must be for the same entity type.



## OpenAPI

````yaml post /api/v2/tag/assign
openapi: 3.0.0
info:
  version: 5.4.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/tag/assign:
    post:
      tags:
        - Tag
      summary: Assign Tag
      description: >-
        Assign a tag value to a library entity. An entity carries at most one
        value per group, so this replaces any value it already had in that
        group. The tag's group must be for the same entity type.
      operationId: assignTag
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                entityType:
                  type: string
                  enum:
                    - segment
                    - persona
                    - use_case
                    - proof_point
                    - reference
                    - competitor
                    - alternative
                    - buying_trigger
                    - objection
                    - product
                    - service
                    - solution
                    - core_feature
                  description: >-
                    The library entity type a tag group applies to. Its values
                    can only be assigned to entities of this type.
                  example: use_case
                entityOId:
                  type: string
                  minLength: 1
                  description: OId of the library entity to tag
                  example: uu_1234
                tagOId:
                  type: string
                  minLength: 1
                  description: Tag OId to assign
                  example: tag_1234
              required:
                - entityType
                - entityOId
                - tagOId
      responses:
        '200':
          description: Assign Tag response
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    type: object
                    properties:
                      entityType:
                        type: string
                        enum:
                          - segment
                          - persona
                          - use_case
                          - proof_point
                          - reference
                          - competitor
                          - alternative
                          - buying_trigger
                          - objection
                          - product
                          - service
                          - solution
                          - core_feature
                        description: >-
                          The library entity type a tag group applies to. Its
                          values can only be assigned to entities of this type.
                        example: use_case
                      entityOId:
                        type: string
                      tagOId:
                        type: string
                      success:
                        type: boolean
                    required:
                      - entityType
                      - entityOId
                      - tagOId
                      - success
                required:
                  - _metadata
                  - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
        '404':
          description: Tag group, tag or entity not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          example: 0
          description: API usage
        requestId:
          type: string
          example: requestId
          description: Request ID
        message:
          type: string
          example: message
          description: Message
        timestamp:
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: Timestamp
      required:
        - requestId
        - timestamp
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````