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

# Create a new tag for the company

> Create a new tag for the authenticated user's company.
The auto_assign flag determines if the tag can be automatically assigned by the system (True)
or only manually (False).
Requires tag creation permission.



## OpenAPI

````yaml /api-reference/api-console.yaml post /api/v3/tags
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.9.0 (v1)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://api.lighton.ai
security: []
tags:
  - name: Ask
    description: >-
      Retrieval-augmented generation: search your indexed corpus and generate an
      LLM answer grounded in the retrieved passages. Supports streaming (SSE)
      and synchronous modes.
  - name: Search
    description: >-
      Hybrid vector + text retrieval over your indexed corpus. Returns ranked
      passages with provenance (file, page range, workspace). Optional reranking
      and vision mode.
  - name: Files
    description: Upload, list, fetch, and delete documents indexed in your workspaces.
  - name: Facets
    description: >-
      Organise documents with hierarchical content types and custom attributes
      per file. Start from starter templates or build your own classification
      schema from scratch.
  - name: Tags
    description: >-
      Manage flat, company-wide labels used to scope search and group content
      across workspaces.
  - name: Workspaces
    description: >-
      Create and manage workspaces — the access-controlled containers your
      documents live in.
  - name: Parse
    description: >-
      Convert documents into structured Markdown — PDFs, images, Office files,
      and HTML. Synchronous endpoint capped at 20 MB / 15 pages.
  - name: Extract
    description: >-
      Pull typed fields out of documents using a JSON Schema you provide. Sync
      mode for small documents (≤20 MB / 15 pages); async mode for larger jobs
      (≤100 MB / 1000 pages) with polling on a job ID.
  - name: API Keys
    description: >-
      Provision and revoke API keys used to authenticate against the Console
      API.
  - name: Models
    description: >-
      List, register, update, and delete custom ML models scoped to your
      company.
paths:
  /api/v3/tags:
    post:
      tags:
        - Tags
      summary: Create a new tag for the company
      description: >-
        Create a new tag for the authenticated user's company.

        The auto_assign flag determines if the tag can be automatically assigned
        by the system (True)

        or only manually (False).

        Requires tag creation permission.
      operationId: api_v3_tags_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagCreateRequestSerializerV3'
            examples:
              CreateTagRequest:
                value:
                  name: Project Alpha
                  description: >-
                    Documents related to the development and release of Project
                    Alpha
                  auto_assign: true
                summary: Create tag request
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TagCreateRequestSerializerV3'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TagCreateRequestSerializerV3'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagListResponseSerializerV3'
              examples:
                CreatedTag:
                  value:
                    id: 3
                    created_at: '2024-01-16T11:00:00Z'
                    updated_at: '2024-01-16T11:00:00Z'
                    name: Project Alpha
                    description: >-
                      Documents related to the development and release of
                      Project Alpha
                    auto_assign: true
                    document_count: 0
                  summary: Created tag
          description: Tag created successfully
        '400':
          description: Bad request - missing required fields or invalid data
        '401':
          description: Authentication failed - missing or invalid API key
        '403':
          description: Permission denied - user lacks tag creation permission
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    TagCreateRequestSerializerV3:
      type: object
      description: Serializer for creating a tag.
      properties:
        name:
          type: string
          description: Tag name
        description:
          type: string
        auto_assign:
          type: boolean
          default: true
          description: >-
            If True, this tag can be automatically assigned by the system. If
            False, it can only be assigned by a user.
      required:
        - description
        - name
    TagListResponseSerializerV3:
      type: object
      description: Serializer for listing tags.
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: Tag name
        description:
          type: string
          readOnly: true
          description: Description of the tag (max 500 characters).
        auto_assign:
          type: boolean
          readOnly: true
          description: >-
            If True, this tag can be automatically assigned by the system. If
            False, it can only be assigned by a user.
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when the tag was created.
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when the tag was last updated.
        document_count:
          type: integer
          readOnly: true
          description: Number of visible documents with this tag
      required:
        - auto_assign
        - created_at
        - description
        - document_count
        - id
        - name
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````