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

# Create tag

> Creates a tag for grouping customers.



## OpenAPI

````yaml /openapi.yaml post /v1/tags
openapi: 3.1.0
info:
  title: Quentli REST API
  version: 1.0.0
  description: OpenAPI spec for Quentli REST endpoints.
servers:
  - url: https://api.quentli.com
    description: Production API
  - url: https://api.staging.quentli.com
    description: Staging API for production-like validation
security:
  - organizationApiKey: []
  - oauthAccessToken: []
tags:
  - name: Auth
  - name: Management
  - name: Billing
  - name: Catalog
  - name: Customers
  - name: Invoices
  - name: Payment Methods
  - name: Payment Sessions
  - name: Payments
  - name: Subscriptions
  - name: Tax Invoices
  - name: Webhooks
  - name: Messaging
paths:
  /v1/tags:
    post:
      tags:
        - Customers
      summary: Create tag
      description: Creates a tag for grouping customers.
      operationId: tags_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTagArgs'
      responses:
        '200':
          description: Tag created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagPayload'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
components:
  schemas:
    CreateTagArgs:
      type: object
      properties:
        input:
          type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 190
            description:
              type: string
              minLength: 1
              maxLength: 190
          required:
            - name
      required:
        - input
      description: Request body for creating a tag.
    TagPayload:
      type: object
      properties:
        tag:
          $ref: '#/components/schemas/Tag'
      required:
        - tag
      description: The created or updated tag.
    UserError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
      additionalProperties: false
      description: Standard user-facing error response envelope.
    Tag:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the tag.
          example: tg_1234567890abcdefghij
        createdAt:
          type: string
          format: date-time
          description: When the tag was created.
        updatedAt:
          type: string
          format: date-time
          description: When the tag was last updated.
        organizationId:
          type:
            - string
            - 'null'
          description: Organization that owns the tag.
        name:
          type: string
          description: Name of the tag.
          example: VIP
        description:
          type:
            - string
            - 'null'
          description: Optional description of the tag.
          example: null
        createdById:
          type:
            - string
            - 'null'
          description: User who created the tag.
        updatedById:
          type:
            - string
            - 'null'
          description: User who last updated the tag.
      required:
        - id
        - createdAt
        - updatedAt
        - organizationId
        - name
        - description
        - createdById
        - updatedById
      description: A label used to group customers.
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: 'Organization API key using `Authorization: Bearer sk_...`.'
    oauthAccessToken:
      type: http
      scheme: bearer
      bearerFormat: OAuth 2.1
      description: 'OAuth access token using `Authorization: Bearer qoa_at_...`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.