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

# Allocations

> Book time slots on spaces and search for available capacity.

An allocation is a booked time window on a space (or planning resource), usually linked to an event.

Base path: `/api/v1/accounts/{account_id}/planning/allocations`

## List allocations

Pass a time window (used by the planning grid):

```bash theme={null}
curl "https://app.rookoo.ai/api/v1/accounts/1/planning/allocations?start_at=2026-11-01T00:00:00Z&end_at=2026-11-30T23:59:59Z" \
  -H "api_access_token: YOUR_ACCESS_TOKEN"
```

## Find available slots

```bash theme={null}
curl -X POST https://app.rookoo.ai/api/v1/accounts/1/planning/allocations/find_available_slots \
  -H "api_access_token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "duration_minutes": 120,
    "start_date": "2026-11-10",
    "end_date": "2026-11-14",
    "start_time": "09:00",
    "end_time": "18:00",
    "space_ids": ["SPACE_UUID"],
    "attendees_count": 40,
    "max_results": 20
  }'
```

Returns candidate windows that fit the duration and capacity constraints.

## Create an allocation

```bash theme={null}
curl -X POST https://app.rookoo.ai/api/v1/accounts/1/planning/allocations \
  -H "api_access_token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "allocation": {
      "space_id": "SPACE_UUID",
      "event_id": "EVENT_UUID",
      "start_at": "2026-11-10T09:00:00Z",
      "end_at": "2026-11-10T12:00:00Z",
      "title": "Main hall",
      "buffer_before_min": 30,
      "buffer_after_min": 60,
      "status": "tentative"
    }
  }'
```

| Field | Notes |
| - | - |
| `space_id` or `resource_id` | Required target |
| `event_id` | Links the slot to an event (also updates the event’s `allocation_ids`) |
| `start_at` / `end_at` | ISO 8601 timestamps |
| `buffer_before_min` / `buffer_after_min` | Setup / teardown buffers |
| `title`, `description`, `category`, `status`, `stage`, `sequence` | Optional |
| `metadata` | Free-form JSON |

## Show / update / delete

```bash theme={null}
curl https://app.rookoo.ai/api/v1/accounts/1/planning/allocations/ALLOCATION_UUID \
  -H "api_access_token: YOUR_ACCESS_TOKEN"

curl -X PATCH https://app.rookoo.ai/api/v1/accounts/1/planning/allocations/ALLOCATION_UUID \
  -H "api_access_token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "allocation": { "end_at": "2026-11-10T13:00:00Z", "status": "confirmed" } }'

curl -X DELETE https://app.rookoo.ai/api/v1/accounts/1/planning/allocations/ALLOCATION_UUID \
  -H "api_access_token: YOUR_ACCESS_TOKEN"
```

## Validate before booking

```bash theme={null}
curl -X POST https://app.rookoo.ai/api/v1/accounts/1/planning/allocations/validate \
  -H "api_access_token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "resource_id": "SPACE_UUID",
    "start_at": "2026-11-10T09:00:00Z",
    "end_at": "2026-11-10T12:00:00Z",
    "buffer_before_min": 30,
    "buffer_after_min": 30
  }'
```

To create an event and slots together, use [create with allocations](/events/events#create-event-with-allocations).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.