Authentication
Learn how to authenticate with the Charter Boats API
API Key Authentication
The Charter Boats API uses API keys to authenticate requests. Include your API key in the X-API-Key header with every request.
Getting an API Key
Boat owners can generate their own API key directly from the dashboard:
- Log in to charter.boats
- Go to Dashboard → Settings → API Access
- Click Generate API Key
- Copy and save your key (it's only shown once)
Your API key will look like: cb_live_ followed by 32 characters.
API keys are only available for boat owners. List at least one boat to get access.
Regenerating Your Key
If your key is compromised, you can regenerate it from the same settings page. This will immediately invalidate your old key.
Security Best Practices
Never expose your API key in client-side code, public repositories, or anywhere it could be accessed by unauthorized parties.
Recommendations
| Do | Don't |
|---|---|
| Store API keys in environment variables | Commit API keys to version control |
| Use server-side code to make API calls | Include keys in client-side JavaScript |
| Rotate keys periodically | Share keys across different applications |
| Use different keys for dev and production |
Rate Limits
| Endpoint | Rate Limit |
|---|---|
| Boat Import | 100 requests/hour |
| Boat List | 1000 requests/hour |
| Calendar Export | Unlimited |
If you need higher limits, contact us at api@charter.boats.
Error Responses
401 Unauthorized
Missing or invalid API key:
429 Too Many Requests
Rate limit exceeded: