Base URL
All API requests are made to:API Versioning
The API is versioned through the URL path. The current version isv1. All endpoints are prefixed with /api/v1.
Authentication
BunShip supports two authentication methods:Bearer Token (JWT)
Used for user-facing requests. Obtain a token pair by calling the login endpoint, then include the access token in theAuthorization header:
API Key
Used for server-to-server integrations. Include the key in theX-API-Key header:
Request Format
All request bodies must be JSON with theContent-Type: application/json header.
Response Format
All responses return JSON. Successful responses vary by endpoint. Error responses follow a consistent structure:Status Codes
Rate Limiting
Authentication endpoints are limited to 20 requests per minute per IP address. When exceeded, the API returns a429 status code. Rate limit headers are included in every response:
API key requests can have per-key rate limits configured at creation time.
Pagination
List endpoints return paginated results:page and pageSize query parameters to navigate results. The default page size is 20, and the maximum is 100.
OpenAPI / Swagger
Auto-generated interactive documentation is available at:- Production:
https://api.bunship.com/docs - Local:
http://localhost:3000/docs

