# Creating a new Workspace Allocation

Creates a workspace allocation for a resource.

Bulk Create

This endpoint supports bulk creating up to 200 objects. In the request body, set the top-level key to its plural form and place the objects in an array. Example:


{
  "workspace_allocations": [
    {
      "resource_id": 123,
      "start_date": "2025-03-03",
      "end_date": "2025-03-07",
      "minutes": 2100
    },
    {
      "resource_id": 123,
      "start_date": "2025-04-07",
      "end_date": "2025-07-11",
      "minutes": 2100
    }
  ]
}



This endpoint returns structured Workspace Allocation objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspace_allocations top-level JSON key.
Please see our Response Format section for more information.

Endpoint: POST /workspace_allocations
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- creator (User)
- external_references (ExternalReference) - Includes references to external integrations for this object.
- updater (User)
- workspace (Workspace) - The workspace that the resource is allocated in.
- workspace_resource (WorkspaceResource).

## Request fields (application/json):

  - `workspace_allocation` (object)

  - `workspace_allocation.resource_id` (integer, required)
    The id of the workspace resource that the allocation will be associated with.

  - `workspace_allocation.start_date` (string, required)
    The date the allocation starts on. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `workspace_allocation.end_date` (string, required)
    The date the allocation ends on. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `workspace_allocation.minutes` (integer, required)
    Total minutes the resource is allocated over the date range.

  - `workspace_allocation.hard` (boolean)
    Indicates if the allocation is a Hard Allocation (“true”) or Soft (“false”).

  - `workspace_allocation.notes` (string)
    User entered notes about the allocation.

  - `workspace_allocation.external_reference` (object)
    Typically populated programmatically by a third party system via an integration, this is an optional
object that holds data from an external system. It connects objects in an external system with objects in
Kantata OX (for example, to connect a Jira issue to a Kantata OX Project).

  - `workspace_allocation.external_reference.service_name` (string, required)
    The provider name of the integration. If you are adding multiple external references to the same object, the service_name must be unique.

  - `workspace_allocation.external_reference.service_model` (string, required)
    The object type of the external object this external reference belongs to.

  - `workspace_allocation.external_reference.service_model_ref` (string, required)
    The object ID of the external object this external reference belongs to.

  - `workspace_allocation.external_reference.status` (string)
    The status of the integration. Options are successful, pending,  or failed.

  - `workspace_allocation.external_reference.external_message` (string)
    The message on the external object.

  - `workspace_allocation.external_reference.external_link` (string)
    The link to the external object.

  - `workspace_allocation.external_reference.external_status` (string)
    The status of the external object in the external system.

  - `workspace_allocation.external_reference.locked` (boolean)
    Whether the subject is locked.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `workspace_allocations` (object)

  - `external_references` (object)

  - `workspace_resources` (object)

  - `workspaces` (object)

  - `users` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


