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

# Post space workersallocation

> Allocate workers to a space



## OpenAPI

````yaml /schema.json post /space_workers/allocation
openapi: 3.1.0
info:
  version: 01KVQG1C20MKD0B8FDPE4RHEDH
  title: Alumio API
  description: Access Alumio through OpenAPI v3.1.
servers:
  - url: /api/v1
security: []
paths:
  /space_workers/allocation:
    post:
      tags:
        - Spaces
      description: Allocate workers to a space
      operationId: postSpaceWorkerAllocation
      parameters:
        - name: space
          in: query
          description: Space Identifier
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceWorkerAllocationRequest'
      responses:
        '201':
          description: A list of spaces and their workers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceWorkerAllocationResult'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SpaceWorkerAllocationRequest:
      type: object
      properties:
        spaceWorkers:
          type: array
          items:
            $ref: '#/components/schemas/SpaceWorkerAllocation'
    SpaceWorkerAllocationResult:
      type: object
      properties:
        workers:
          type: integer
          title: Workers
          description: The number of workers that is available.
        workersPerSpace:
          type: integer
          title: Workers per space
          description: The number of workers that is available per space.
        spaceWorkers:
          type: array
          items:
            $ref: '#/components/schemas/SpaceWorkerAllocation'
    Error:
      type: object
      properties:
        status:
          type: string
        context:
          type: object
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        violations:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              propertyPath:
                type: string
              type:
                type: string
    SpaceWorkerAllocation:
      type: object
      properties:
        spaceIdentifier:
          title: Space identifier
          description: The identifier of the space
          type: string
          pattern: ^[a-z0-9-]+$
          maxLength: 255
        workers:
          title: Workers
          description: Number of workers for the space
          type: integer
          min: 0

````