API reference
Skiff Public API v1
Base URL https://binranoynwqpydttvgbs.supabase.co/functions/v1/public-api. Every request carries Authorization: Bearer sk_live_…. All data is scoped to the key owner's account. The machine-readable contract is at /openapi.yaml.
/v1/vesselsread:vesselList the account's vessels with health score and engine hours.
/v1/vessels/{id}read:vesselOne vessel.
/v1/vessels/{id}/dueread:vesselMaintenance due feed: per-task status ok | due_soon | overdue with due_date and due_hours.
Anchored on the last matching service entry, or the task baseline before any service.
/v1/vessels/{id}/logbookread:vesselService entries and engine-hour logs, newest first (200 each).
/v1/vessels/{id}/inspectionsread:vesselInspection history for a vessel (last 50).
/v1/inspections/{id}read:vesselOne inspection with its items and verdicts (operational | attention | non_operational).
/v1/vessels/{id}/service-logwrite:logCreate a service entry.
Body: title (required), done_at, engine_hours, cost, currency, route ('diy' | 'supplier'), note, task_id. Returns 201.
/v1/vessels/{id}/hourswrite:logLog engine hours and update the vessel meter.
Body: hours (required, must not be below the current meter), litres, fuel_cost, currency, logged_at. Returns 201.
Errors
401 {"error":"invalid_key"} key missing, malformed, or revoked
403 {"error":"missing_scope"} key lacks the required scope
404 {"error":"not_found"} unknown route or a vessel you do not own
422 {"error":"hours_below_current"} hours may not go backwards
429 {"error":"rate_limited"} over 60 requests/minute
503 {"error":"api_disabled"} the API is switched off platform-wideAuditability
Every write made with a key lands in the owner's audit trail, attributed to the owner, exactly like a write from the app.