Developers
Developers/Authentication
START / API V1

Authentication

Use workspace-scoped API keys safely.

Workspace-scoped machine credentials

API keys authenticate scripts and servers to one Caelario workspace. Jobs, schedules, results, exports and credit usage are always isolated to that workspace.

RecommendedX-API-KeyX-API-Key: sda_...
Also acceptedBearerAuthorization: Bearer sda_...

Send a key with every request

Every response includes X-Request-ID. Record it with failed requests so support can correlate the report with server logs without seeing your credentials.

JavaScript
const response = await fetch("https://api.caelario.com/v1/account", {
  headers: {
    "X-API-Key": process.env.CAELARIO_API_KEY,
  },
});

if (!response.ok) {
  const requestId = response.headers.get("x-request-id");
  throw new Error(`Caelario request failed: ${response.status} [${requestId}]`);
}
Response200 OKcontent-type: application/json
JSON
{
  "organization_id": "workspace_01H...",
  "organization_name": "Acme data team",
  "monthly_quota": 10000,
  "rate_limit_per_minute": 60,
  "max_result_limit": 200,
  "max_active_jobs": 10,
  "authenticated_key_id": "key_01H...",
  "auth_type": "api_key",
  "role": "owner",
  "user": null,
  "workspaces": []
}

Rotation and revocation

  1. 1
    Create a replacement key

    Use a name that identifies its environment or service.

  2. 2
    Deploy the replacement

    Confirm it can call GET /v1/account.

  3. 3
    Revoke the old key

    Revocation is immediate and does not sign browser users out.