Skip to content

API reference

Overview

Complete reference for the FlexiScheduler REST API. Conventions, authentication, errors, and per-resource endpoint documentation.

Key points

  • REST over HTTPS, JSON in and out, camelCase everywhere
  • Authenticated with Bearer JWT plus an x-organization-id header on every request
  • Errors return a consistent envelope with statusCode, message, and timestamp
  • List endpoints accept limit and offset for pagination

Base URLs

Pick the base URL matching your environment:

# Production
https://api.flexischeduler.com

# Staging
https://staging-api.flexischeduler.com

# Local development (when running the engine yourself)
http://localhost:3000

All endpoints are mounted under /api/v1. The current API version is v1; future major versions will be published at /api/v2 with a deprecation window for v1.

Authentication

Every authenticated request requires two headers:

  • Authorization: Bearer <JWT> — issued by your organization’s identity provider
  • x-organization-id: <UUID> — picks which organization the request operates against

Some endpoints additionally require x-template-id (when the operation is scoped to a specific template) or x-user-id (when the engine needs to attribute the action to a specific user for audit). These are called out per-endpoint.

See Authentication for the full auth model.

Conventions

Field naming

All field names use camelCase consistently — startTime, primaryEntityId, eventType. There is no snake_case anywhere in the API.

Identifiers

Most identifiers are UUIDs (e.g. a1b2c3d4-e5f6-7890-abcd-ef1234567890). A few resources use prefixed IDs that are easier to recognize at a glance — events use evt_, resources use res_. Both formats are stable identifiers; treat them as opaque strings on the client.

Dates and times

All timestamps are ISO 8601 with timezone, typically UTC: 2026-04-26T15:30:00Z. The engine accepts other timezones in inputs but normalizes to UTC for storage. Date-only fields (no time component) use YYYY-MM-DD.

Errors

Every error response follows the same envelope:

{
  "statusCode": 409,
  "message": "Scheduling conflict detected",
  "error": "Conflict",
  "details": {
    "conflictType": "resource_double_booking",
    "affectedResourceId": "res_van_2",
    "conflictingEventId": "evt_a8f4..."
  },
  "timestamp": "2026-04-26T15:30:00Z",
  "path": "/api/v1/events"
}

The fields:

  • statusCode — matches the HTTP status
  • message — human-readable summary
  • error — short error class name
  • details — structured context specific to the error type (only on some errors; check before reading)
  • timestamp — when the error occurred
  • path — the request path that errored

Common status codes

  • 200 OK — successful read
  • 201 Created — successful create
  • 204 No Content — successful delete or successful action with no response body
  • 400 Bad Request — request body or parameters failed validation
  • 401 Unauthorized — missing, malformed, or expired JWT
  • 403 Forbidden — JWT valid, but lacks access to the requested organization
  • 404 Not Found — resource doesn’t exist (or doesn’t exist within the requested organization)
  • 409 Conflict — scheduling conflict detected, or resource state prevents the operation
  • 422 Unprocessable Entity — request was structurally valid but failed a business rule
  • 500 Internal Server Error — unhandled error; the timestamp + path are useful for support requests

Treat 409 as expected, not exceptional

Conflict responses are part of normal scheduling — they happen when a constraint blocks a booking. Read the details object on a 409 to find out which constraint failed and use that to surface a useful message to your end user.

Pagination

List endpoints accept limit (default 20, max 100) and offset (default 0) query parameters. Responses include total alongside the items so clients can render “showing X of Y” affordances:

# Request
GET /api/v1/events?limit=20&offset=0

# Response
{
  "items": [...],
  "total": 247,
  "limit": 20,
  "offset": 0
}

For very large result sets, prefer narrowing with filters (entity, date range, status) over deep offsets. Most list endpoints expose filters that match the indexes the engine uses.

Resources

The API is organized into 14 resource groups. Available pages are linked; remaining pages are being written and will appear in the sidebar as they ship:

Health

Service health checks. Verify connectivity and individual subsystem health.

1 ops

Organizations

Multi-tenant organization management. Create, list, update, and deactivate organizations.

5 ops

Entities

CRUD for the things the engine schedules — participants, staff, vehicles, rooms. Includes bulk operations and relationship management.

13 ops

Templates

Template authoring, versioning, and effective-resolution lookups across the four-tier inheritance chain.

10 ops

Availability

Recurring availability patterns and one-off windows for entities. Read and write access.

6 ops

Bookings

Find optimal slots and create bookings. The high-level API for the most common scheduling flow.

2 ops

Events

Direct event lifecycle management. Lower-level than Bookings; use when you need precise control.

11 ops

Conflicts

Detect, list, and resolve scheduling conflicts. Surfaces structured conflict objects with remediation suggestions.

6 ops

Suggestions

Get ranked alternative slots when a preferred time doesn&rsquo;t work, or bulk-suggest across many requests.

3 ops

Waitlist

Add entities to a waitlist with priority ordering. Auto-promote on cancellation; trigger fulfillment manually.

7 ops

Data Source

Configure replication from external systems (CRMs, calendars, GPS). The replication framework that powers external data.

21 ops

Webhooks

Inbound webhook intake from external systems. Configure sources, verify signatures, ingest events.

2 ops

Audit Logs

Read-only audit trail. Query by entity, by actor, or across the full organization.

3 ops

Confirmations

Two-way appointment confirmations through SMS, email, or other channels.

2 ops