Base URL
The Anchor API is accessible at your self-hosted instance:APP_URL.
API Prefix
All API endpoints are prefixed with/api:
Content Type
All requests must useapplication/json content type for request bodies:
Request Validation
The API uses strict validation:- Required fields must be present
- Extra fields not defined in the schema are rejected
- Field types are enforced (strings, booleans, arrays, etc.)
- Whitespace is automatically trimmed where appropriate
Rate Limiting
Anchor does not currently implement rate limiting. Consider implementing rate limiting at the reverse proxy level for production deployments.Error Responses
All errors follow a consistent format:Common Error Codes
Invalid request body or parameters
Missing or invalid authentication token
Insufficient permissions or feature disabled
Resource does not exist or user lacks access
Resource already exists (e.g., duplicate email)
Unexpected server error
Response Formats
Success Response
Successful requests return appropriate status codes:200 OK- Successful GET, PATCH, DELETE201 Created- Successful POST (resource creation)
Empty Responses
Some endpoints return no content:204 No Content- Successful deletion with no body- Empty object
{}for operations with no return value
Data Types
Timestamps
All timestamps use ISO 8601 format:UUIDs
All resource IDs are UUIDs v4:Enums
The API uses specific enum values for state management: NoteStateactive- Normal note statetrashed- Soft-deleted, in trashdeleted- Permanently deleted
viewer- Read-only accesseditor- Read and write access
active- Active user accountpending- Awaiting admin approval
disabled- No new registrationsenabled- Open registrationreview- Registration requires admin approval
Next Steps
Authentication
Learn how to authenticate API requests
Notes
Manage notes with full CRUD operations
Tags
Organize notes with tags
Sharing
Share notes with other users
Health Check
Check API Health
Health check endpoint to verify the API is running and responsive.
This endpoint is used by monitoring tools and health checks in Docker/Kubernetes deployments. It does not check database connectivity - it only confirms the API server is running.