Authentication and requests
Call GET /api/session first. It returns the current user, a CSRF token and available integration features. Send the token in X-CSRF-Token for every request that changes data. Sessions use secure HTTP-only cookies. All requests remain on the same origin.
Successful responses include ok: true. Error responses include ok: false, a human-readable error and a machine-readable code. Treat non-success HTTP responses as failures; never infer successful delivery from a submitted form alone.
Public endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/health | Current website and database checks |
| GET | /api/incidents | Published incidents |
| GET | /api/careers | Published vacancies |
| POST | /api/contact | A consented enquiry with FAQ context |
| POST | /api/applications | Apply for a published vacancy |
Account endpoints
Registration, sign-in, sign-out, email verification, password recovery and authenticator setup use the /api/auth/ routes. The signed-in customer can read or update their profile at /api/account, manage support conversations at /api/tickets, and view /api/services, /api/invoices and /api/notifications.
Notification settings use /api/preferences. Browser push subscriptions use /api/push. Account endpoints require a valid session; individual resources are checked for ownership.
Administration and staff
The /api/admin/ routes require administrator permissions and two-factor authentication. Staff routes require an authorised staff or administrator account. Role changes cannot be requested through registration or profile editing.
External API access
This release does not issue public API keys or offer a third-party integration API. The documented endpoints support the first-party website and installed web app. Service credentials are stored on the Worker and must never be included in frontend code.
