Base URL
The default API server runs on:HATCH_HTTP_ADDR environment variable.
Authentication
All API endpoints require authentication using an API key. The API key is verified against a Better Auth instance. You can provide your API key in one of two ways:Bearer Token (Recommended)
X-API-Key Header
Response Format
All responses are JSON-encoded. Successful responses return the requested data with appropriate HTTP status codes.Success Response Example
Error Responses
Errors return a JSON object with anerror field:
HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 201 | Created (for POST requests) |
| 400 | Bad Request - invalid parameters |
| 401 | Unauthorized - missing or invalid API key |
| 404 | Not Found - resource doesn’t exist |
| 405 | Method Not Allowed |
| 409 | Conflict - resource already exists |
| 500 | Internal Server Error |