> ## 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.

# Create Tag Group

> Create a reporting tag group (a faceted dimension) for one library entity type, optionally with its initial values. Set `isInferable` to have Octave auto-infer a value for new entities of the type, and `backfill` to also queue inference for existing ones.



## OpenAPI

````yaml post /api/v2/tag-group/create
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-group/create:
    post:
      tags:
        - Tag Group
      summary: Create Tag Group
      description: >-
        Create a reporting tag group (a faceted dimension) for one library
        entity type, optionally with its initial values. Set `isInferable` to
        have Octave auto-infer a value for new entities of the type, and
        `backfill` to also queue inference for existing ones.
      operationId: createTagGroup
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  description: Tag group name
                  example: Imperative
                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 this group tags. Defaults to
                    segment.
                  example: use_case
                description:
                  type: string
                  nullable: true
                  description: What this dimension captures
                values:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  description: >-
                    Initial tag values, mutually exclusive — an entity carries
                    at most one per group
                  example:
                    - Spend Control
                    - Procurement Efficiency
                isInferable:
                  type: boolean
                  description: >-
                    Auto-infer a value for each new entity of the type. Defaults
                    to false (values assigned by hand).
                backfill:
                  type: boolean
                  description: >-
                    When true, queue inference for existing entities not yet in
                    the group right after saving. Requires the group to be
                    auto-infer and to have at least one value. Costs one LLM
                    call per queued entity. Defaults to false.
              required:
                - name
      responses:
        '200':
          description: Create Tag Group response
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    $ref: '#/components/schemas/TagGroupWithBackfill'
                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
    TagGroupWithBackfill:
      allOf:
        - $ref: '#/components/schemas/TagGroup'
        - type: object
          properties:
            backfill:
              type: object
              nullable: true
              properties:
                queuedCount:
                  type: integer
                remainingCount:
                  type: integer
              required:
                - queuedCount
                - remainingCount
              description: >-
                What the backfill queued (inference runs asynchronously); null
                when no backfill was requested
          required:
            - backfill
    TagGroup:
      type: object
      properties:
        oId:
          type: string
          description: Tag group OId
          example: tg_1234
        name:
          type: string
          description: Tag group name
        description:
          type: string
          nullable: true
        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
        isInferable:
          type: boolean
          description: >-
            Auto-infer: when true, Octave infers and assigns a value from this
            group whenever a new entity of the group's type is created
        createdAt:
          type: string
          nullable: true
          format: date-time
        updatedAt:
          type: string
          nullable: true
          format: date-time
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
      required:
        - oId
        - name
        - entityType
        - isInferable
        - createdAt
        - updatedAt
        - tags
    Tag:
      type: object
      properties:
        oId:
          type: string
          description: Tag OId
          example: tag_1234
        name:
          type: string
          description: Tag value name
        position:
          type: integer
          nullable: true
          description: Display order within the group (0 first)
        createdAt:
          type: string
          nullable: true
          format: date-time
        updatedAt:
          type: string
          nullable: true
          format: date-time
      required:
        - oId
        - name
        - createdAt
        - updatedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````