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

# Create a workspace group

> Create a new workspace group for the specified organization. Only STATIC type workspace groups are currently supported. Returns the created workspace group ID upon successful creation.



## OpenAPI

````yaml /en/api-reference/openapi.en-v2.json post /v2/organizations/{organization_id}/workspace-groups
openapi: 3.0.3
info:
  title: API Publica Portal
  version: 2.0.0
  description: Public REST API for portal
servers:
  - url: https://api.flexxible.net
    description: Portal API (production)
security:
  - bearerAuth: []
tags:
  - name: Digital activity
    description: Creation of core process groups by organization
  - name: Roles
    description: Endpoint de creacion de roles de organizacion
  - name: Usuarios
    description: Endpoint de creacion de usuarios de organizacion
  - name: Grupos de workspaces
    description: Endpoints de gestión de grupos de workspaces
  - name: Workspaces
    description: Endpoint de eliminacion de workspaces de la organizacion
  - name: Aplicaciones instaladas
    description: Endpoint de detalle de aplicación instalada de la organización
  - name: Autenticación
    description: Endpoints de autenticación y contexto de sesión
  - name: Microservicios
    description: Detalle de microservicios por organizacion
  - name: Operaciones
    description: Consulta de detalle de operaciones por organización
  - name: Organización
    description: Operaciones de organización
  - name: Objetivos de política de parches
    description: Endpoints de gestión de objetivos de política de parches
  - name: Configuraciones de producto
    description: Endpoints de gestión de configuraciones de producto
  - name: Grupos de reporte
    description: Operaciones sobre grupos de reporte
  - name: Sesiones
    description: Endpoint de detalle de sesion de la organizacion
  - name: Tenants
    description: Endpoints de gestión de tenants
paths:
  /v2/organizations/{organization_id}/workspace-groups:
    post:
      tags:
        - Workspace groups
      summary: Create a workspace group
      description: >-
        Create a new workspace group for the specified organization. Only STATIC
        type workspace groups are currently supported. Returns the created
        workspace group ID upon successful creation.
      operationId: createWorkspaceGroup
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: The unique identifier of the organization
          example: 507f1f77bcf86cd799439011
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspacegroupsCreateRequestV2'
            examples:
              create-static-workspace-group:
                summary: Create a workspace group with minimal required fields
                value:
                  name: Grupo de Workspaces de producción
              create-workspace-group-with-description:
                summary: Create a workspace group with description
                value:
                  name: Grupo de Workspaces de desarrollo
                  description: Grupo de workspaces para entornos de desarrollo
                  type: static
              create-workspace-group-with-location:
                summary: Create a workspace group with location information
                value:
                  name: Grupo de Workspaces de la oficina de Madrid
                  description: Grupo de workspaces para la oficina de Madrid
                  type: static
                  location:
                    latitude: 40.4168
                    longitude: -3.7038
                    address: Madrid, España
                    description: Ubicación de la oficina principal
      responses:
        '201':
          description: >-
            Workspace group successfully created. The response contains the
            created resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceGroupDetailResponseV2'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            Bad Request. Common Causes: - Missing required fields - Invalid
            field values - Invalid type value (only STATIC allowed) - Invalid
            location structure
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: Unauthorized - authentication required
        '404':
          $ref: '#/components/responses/NotFound'
          description: Organization not found
        '409':
          $ref: '#/components/responses/Conflict'
          description: 'Conflict: a workspace group with the same name already exists'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    WorkspacegroupsCreateRequestV2:
      type: object
      properties:
        name:
          type: string
          maxLength: 512
        description:
          type: string
          maxLength: 512
        type:
          type: string
          enum:
            - static
          default: static
        location:
          $ref: '#/components/schemas/WorkspaceGroupBaseUpdateLocationInputV2'
      required:
        - name
    WorkspaceGroupDetailResponseV2:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          description: ID of the workspace group
        name:
          type: string
          description: Name of the workspace group
        description:
          type: string
          nullable: true
          description: Description of the workspace group
        organization_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          description: Organization identifier
        created_by:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          description: ID of the user who created the workspace group
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        type:
          type: string
          nullable: true
          enum:
            - static
            - dynamic
            - entra_id
          description: Type of workspace group
        filter:
          type: string
          nullable: true
          description: Filter string for dynamic workspace groups
        location:
          $ref: '#/components/schemas/WorkspaceLocationV2'
          nullable: true
          description: Location information of the workspace group
        entra_id_source:
          $ref: '#/components/schemas/WorkspaceGroupEntraIdSourceV2'
          nullable: true
          description: Entra ID source information for the workspace group
      required:
        - id
        - name
        - organization_id
        - created_at
    WorkspaceGroupBaseUpdateLocationInputV2:
      type: object
      properties:
        latitude:
          type: number
        longitude:
          type: number
        address:
          type: string
          maxLength: 512
        description:
          type: string
          maxLength: 512
      required:
        - latitude
        - longitude
        - address
    WorkspaceLocationV2:
      type: object
      properties:
        latitude:
          type: number
          description: Latitude coordinate
        longitude:
          type: number
          description: Longitude coordinate
        address:
          type: string
          description: Address string
        description:
          type: string
          nullable: true
          description: Location description
      required:
        - latitude
        - longitude
        - address
    WorkspaceGroupEntraIdSourceV2:
      type: object
      properties:
        resource_id:
          type: string
          description: Entra ID resource ID
        resource_type:
          type: string
          enum:
            - group
            - administrative_unit
          description: Entra ID resource type
        resource_name:
          type: string
          description: Entra ID resource name
      required:
        - resource_id
        - resource_type
        - resource_name
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````