Authentication

The public API supports two authentication strategies. Both use the Authorization: Bearer <token> header.

StrategyUse caseToken source
JWTFirst-party clients (web app, mobile app) acting as a signed-in userIssued by /auth/login; expires; refreshable
API keyServer-to-server integrations and CLI toolsCreated in Workspace settings → API keys

API key requests

Set N24M_API_KEY in your shell to your workspace API key (from Workspace settings → API keys) before running the examples below.

curl --request GET \
  --url 'https://api.not24get.me/api/v1/me' \
  --header "Authorization: Bearer ${N24M_API_KEY}"

API keys are scoped to a single workspace. For workspace-scoped operations (anything under /workspaces/...), include the workspace ID:

curl --request GET \
  --url 'https://api.not24get.me/workspaces/WORKSPACE_ID/folders' \
  --header "Authorization: Bearer ${N24M_API_KEY}" \
  --header 'X-Workspace-ID: WORKSPACE_ID'

If X-Workspace-ID is missing on a workspace-scoped endpoint, the server uses the key's default workspace. If the key has no default and the header is missing, the request fails with validation_error.

JWT requests

JWTs are issued by /auth/login. Pass the access token in Authorization: Bearer .... Refresh it before it expires by calling /auth/refresh.

JWTs already encode the active tenant and account; you do not pass X-Workspace-ID. To switch workspace context within the session, call the workspace-switch endpoint and re-issue the token.

Common headers

HeaderDirectionPurpose
Authorization: Bearer <token>RequestRequired on every authenticated endpoint
Content-Type: application/jsonRequestRequired for POST/PATCH with a body
X-Workspace-IDRequestSelects the workspace for API key requests
X-Correlation-IDRequestOptional; if present, echoed back so you can correlate logs
X-RateLimit-LimitResponseRequests allowed per window. See Rate limits
X-RateLimit-RemainingResponseRequests left in the current window
X-RateLimit-ResetResponseEpoch seconds when the window resets
X-Correlation-IDResponseAlways present; copy it into bug reports

Security expectations

  • API keys are hashed at rest. Once the secret leaves the Create key dialog, it cannot be retrieved — only revoked and reissued.
  • Use the principle of least privilege: scope keys to a single workspace, set short expiries, and revoke promptly.
  • Rotate keys at least quarterly. Use separate keys for separate integrations so revocations are surgical.