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

# Create a line

> Creates a new line (queue) within a location.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/locations/{id}/lines
openapi: 3.1.0
info:
  title: Qminder API
  version: '1.0'
  description: >-
    The Qminder API allows you to integrate queue management into your own
    applications.
servers:
  - url: https://api.qminder.com
security:
  - sec0: []
tags:
  - name: Locations
    description: Manage physical service locations
  - name: Lines
    description: Manage virtual queues within locations
  - name: Input Fields
    description: Manage custom data fields for locations
  - name: Tickets
    description: Manage visitor queue entries
  - name: Appointments
    description: Manage scheduled appointments
  - name: Users
    description: Manage user accounts and permissions
  - name: Webhooks
    description: Manage webhook subscriptions
paths:
  /v1/locations/{id}/lines:
    post:
      tags:
        - Lines
      summary: Create a line
      description: Creates a new line (queue) within a location.
      operationId: create-line
      parameters:
        - name: id
          in: path
          description: ID of a Location
          schema:
            type: integer
            format: int32
            default: 123
          required: true
        - name: X-Qminder-API-Version
          in: header
          description: API version. Must be set to `2020-09-01`.
          required: true
          schema:
            type: string
            enum:
              - '2020-09-01'
            default: '2020-09-01'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - color
              properties:
                name:
                  type: string
                  maxLength: 30
                  description: Line name (max 30 characters).
                color:
                  type: string
                  enum:
                    - VIOLET
                    - LAVENDER
                    - MARSHMALLOW
                    - TEAL
                    - MINT
                    - CORAL
                    - YELLOW
                    - ROSE
                    - INDIGO
                    - BLUE
                  description: Line color.
                disabled:
                  type: boolean
                  description: 'Whether the line starts disabled. Default: false.'
                translations:
                  type: array
                  description: Name translations for multi-language support.
                  items:
                    type: object
                    required:
                      - languageCode
                    properties:
                      languageCode:
                        type: string
                        description: Language code (e.g. "et", "fi", "de").
                      name:
                        type: string
                        maxLength: 30
                        description: Translated line name (max 30 characters).
                appointmentSettings:
                  type: object
                  description: Appointment configuration for this line.
                  required:
                    - enabled
                    - duration
                  properties:
                    enabled:
                      type: boolean
                      description: Whether appointments are enabled for this line.
                    duration:
                      type: integer
                      enum:
                        - 15
                        - 30
                        - 45
                        - 60
                        - 90
                        - 120
                        - 180
                      description: Default appointment duration in minutes.
            example:
              name: Customer Support
              color: TEAL
              translations:
                - languageCode: fr
                  name: Service client
              appointmentSettings:
                enabled: true
                duration: 30
      responses:
        '201':
          description: Line created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the created line.
                    example: '12345'
              example:
                id: '12345'
        '400':
          description: Validation error - invalid input data
        '409':
          description: A line with the same name already exists in this location
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: X-Qminder-REST-API-Key
      x-default: yourbusinessapikey

````