This section provides guidance for using CodeLibra public REST API endpoints.
For endpoint lists, parameters, and schemas use the OpenAPI reference: https://api.codelibra.io/docs.
You can explore how to use the API by using browser developer tools to observe the web app, which interfaces the CodeLibra servers through the API. Note: Do not use the internal (undocumented) API endpoints as they may change without notice.
The API uses namespaced versions (for example, /v1). Backwards-compatible additions may appear within a version; breaking changes come with a new version.
All public API endpoints require authentication via an API key.
X-API-Key: <your_key>The API provides dedicated test endpoints to help you verify connectivity and authentication setup:
GET /v1/test/hello — Public test endpoint that requires no authentication. Use this to verify basic API connectivity and that the service is responding correctly.
curl https://api.codelibra.io/v1/test/hello
Returns: "Hello world!" with 200 OK status.
GET /v1/test/auth-hello — Authenticated test endpoint that requires a valid API key. Use this to verify that your authentication credentials are working correctly.
curl -H "X-API-Key: <your_key>" https://api.codelibra.io/v1/test/auth-hello
Returns: "Hello {User}!" with 200 OK status if authenticated, or 401 Unauthorized if the API key is missing or invalid.
GET /v1/test/elevated-auth-hello — Elevated authentication test endpoint that requires a valid elevated API key. Use this endpoint to verify that elevated security is properly configured and your elevated credentials are valid.
curl -H "X-API-Key: <your_elevated_key>" https://api.codelibra.io/v1/test/elevated-auth-hello
Returns: "Hello {User} (elevated)!" with 200 OK status if authenticated with an elevated key, 401 Unauthorized if the API key is missing or invalid, or 403 Forbidden if the API key is not elevated.
These endpoints are useful for integration testing, health monitoring, and debugging authentication issues.
lowerCamelCase as specified in the OpenAPI schemas.Some endpoints use offset/limit pagination and return the total count in a response header.
from (int, default 0): zero-based offset of the first item to returnlimit (int): maximum number of items to return; a per-endpoint maximum (usually 100 items) appliesorder (string): a sortable field name supported by that endpointascending (bool): sort direction; true for ascending, false for descendingX-Total-Count: total number of items matching the request (before pagination)query (string): space-separated search terms; items match when all tokens are found in searchable fields (depending on endpoint)exclude (string): space-separated tokens to exclude from results (only identifying fields are used like id, slug, etc.)Notes:
limit is 0, endpoints return an empty list, but still include X-Total-Count.To maintain reliability and fairness, requests are rate-limited.
429 Too Many Requests and includes an X-RateLimit-Reset response header with a UNIX timestamp indicating when the window resets.X-RateLimit-Reset before retrying.title (string): short summary derived from the HTTP status, e.g., "BadRequest"status (number): HTTP status code, e.g., 400detail (string): human-readable explanationcode (number): stable machine-readable error code; see the complete list hereinstance is omitted when not set, and type is typically omitted (defaults to about:blank).{
"title": "BadRequest",
"status": 400,
"detail": "Only the invited user can accept this invitation.",
"code": 400010
}
401/403 by refreshing credentials or correcting permissions, and handle 409/422 by adjusting your request data.