Charter Boats
Charter Boats API

API Reference

Complete endpoint reference for the Charter Boats platform

The Charter Boats API is organized by who's calling:

  • Discovery API (/api/ai/*) — public, no key. Conversational search for guests, AI assistants, and agents (also via MCP / Custom GPT).
  • Agent API (/api/agent/*) — for approved charter agents. Reveals platform, deeplinks, and per-week activity the public search hides. Needs a logged-in agent session.
  • Operator API — for owners and partners managing their own listings (boats, pricing, fees, calendar). Writes need a key.
  • Places & Data — public reference data anyone can read (locations, POIs, passages, sea routing, conditions).

Base URL

https://charter.boats/api

Authentication

The Discovery API and all read endpoints are open to server-side callers — no key needed for curl or a backend. Only the two write actions (POST /import/boat, DELETE /boats/:id) require your key in the X-API-Key header:

curl -X POST "https://charter.boats/api/import/boat" \
  -H "X-API-Key: cb_live_your_api_key_here" \
  -d '{ ... }'

Generate your key from Dashboard → Settings → API. See Authentication for the full rules (including the cross-origin browser case).

Response Format

Endpoints return data directly as JSON. Error responses include a status code and message:

{
  "statusCode": 400,
  "message": "Error description"
}

The boat import endpoint (POST /import/boat) is an exception -- it wraps its response in {"success": true, "boat": {...}}.

Discovery API · guests & agents

Public, no key. Compact, fuzzy-matched results tuned for conversation. See the overview.

Agent API · approved agents

Agent-authenticated search that reveals source platform, per-yacht deeplinks, per-week availability/options, and a commission preview. Requires a logged-in agent session — see the overview.

MethodEndpointDescription
GET/agent/boatsDense agent search with platform, deeplinks, and activity

Operator API · owners & partners

Manage your own listings.

Boats

MethodEndpointDescription
GET/boatsList boats with filters and search
GET/boats/:idGet boat details
GET/boats/defaultsGet smart defaults for boat forms
POST/import/boatImport a new boat listing
DELETE/boats/:idDelete a boat

Editing an existing listing's details, prices, fees, and availability is done in the dashboard -- those actions are tied to your logged-in session and aren't exposed as keyed API endpoints. The API covers import, delete, and read.

Pricing & Fees

MethodEndpointDescription
GET/boats/:id/pricingResolve effective price per day for a date range
GET/boats/:id/pricesList seasonal pricing rules
GET/boats/:id/feesList boat fees

Calendar

MethodEndpointDescription
GET/calendar/:boatId/export.icsExport one boat's calendar as iCal
GET/calendar/company/:companyId/export.icsExport a whole company's calendar as iCal

Places & Data · public reference

Read-only catalog data anyone can use to build on the platform.

Locations & POIs

MethodEndpointDescription
GET/locationsList locations with optional filters
GET/locations/searchSearch locations by name or coordinates
GET/locations/:idGet location details with nearby POIs
GET/pois/searchSearch points of interest
GET/pois/:idGet POI details
GET/pois/categoriesList available POI categories

Passages & Sea Routing

MethodEndpointDescription
GET/passagesList sailing passages
GET/passages/:slugGet passage details
GET/passages/by-location/:idGet passages from a location
GET/searoute/routeCalculate sea route between two points

Conditions

MethodEndpointDescription
Sailing conditions / wind (no first-party endpoint yet)

Looking for booking or content endpoints?

  • Booking a boat (reserve + pay) runs through the charter.boats checkout UI, not a public API -- it needs a logged-in guest session and Stripe Elements on the page.
  • Articles & FAQs are searchable via the Discovery API's /ai/content.

HTTP Status Codes

CodeDescription
200Success
400Bad Request -- invalid parameters
401Unauthorized -- missing or invalid API key
403Forbidden -- key not allowed to touch this resource
404Not Found
409Conflict -- duplicate resource
500Server Error