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

# Create Location Group



## OpenAPI

````yaml POST /api/v1/mgt/workspaces/{workspaceId}/location-groups
openapi: 3.1.0
info:
  title: Xenia Team API - Create Location Group
  version: 1.0.0
  description: Create a new group of locations for a specific workspace.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/workspaces/{workspaceId}/location-groups:
    post:
      tags:
        - Location Groups
      summary: Create Location Group
      description: >-
        Creates a location group by name, optional description, and a list of
        location IDs. Requires permission `CAN_MANAGE_LOCATIONS`.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: The name of the location group.
                description:
                  type: string
                  nullable: true
                  description: Optional description for the group.
                Locations:
                  type: array
                  description: Array of location UUIDs to be grouped.
                  items:
                    type: string
                    format: uuid
            example:
              name: location test group
              description: location test group name
              Locations:
                - a13ddb59-3e5c-4bdd-8673-fc913b93b9db
                - 1d5ceb29-ab86-4138-ad7f-b8290b1771f5
                - 32e77f06-6cb1-4657-9310-1f4dcd902850
      responses:
        '200':
          description: Location group created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Created location group with full details
                  meta:
                    type: object
        '400':
          description: Validation error or missing fields
        '401':
          description: Unauthorized access
        '404':
          description: Invalid location IDs
        '500':
          description: Internal server error
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````