OverviewAuthentication

Authentication

API Key authentication for Ctxfy API.

Overview

External API access uses API Key only. Include the key in every request:

Authorization: Bearer <api_key>

Create and manage API keys in the Ctxfy dashboard or via the API. Each key grants full access to all resources of the key owner (all spaces, collections, sources).

Creating an API key

Create API keys in the Ctxfy dashboard. The raw key is shown only once at creation — store it securely. Optional: set a name and expiration date.

The raw api_key value is returned only on creation. If lost, revoke the key and create a new one.

Using an API key

curl https://api.ctxfy.com/v1/spaces \
  -H "Authorization: Bearer YOUR_API_KEY"

Managing keys

MethodPathDescription
POST/v1/api-keysCreate key
GET/v1/api-keysList keys (no secrets returned)
DELETE/v1/api-keys/:keyIdRevoke key

Public endpoints

No authentication required:

  • GET /health — service and dependency health
  • GET /metrics — Prometheus metrics

Common issues