CENTRAL COAST BUSINESS IT

A small, consistent
application API.

JSON endpoints used by the website and installed web app.

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

MethodEndpointPurpose
GET/api/healthCurrent website and database checks
GET/api/incidentsPublished incidents
GET/api/careersPublished vacancies
POST/api/contactA consented enquiry with FAQ context
POST/api/applicationsApply 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.

Need a hand?