Authentication
The public API supports two authentication strategies. Both use the Authorization: Bearer <token> header.
| Strategy | Use case | Token source |
|---|---|---|
| JWT | First-party clients (web app, mobile app) acting as a signed-in user | Issued by /auth/login; expires; refreshable |
| API key | Server-to-server integrations and CLI tools | Created in Workspace settings → API keys |
Choose API keys for automation and JWTs for interactive sessions. Do not embed long-lived keys in front-end bundles.
Prerequisites
- For API keys: create one in the product (Create an API key) and store it securely.
- For JWTs: ability to call
/auth/loginand/auth/refresh. - Base URL
https://api.not24get.me(or your configured environment).
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
| Header | Direction | Purpose |
|---|---|---|
Authorization: Bearer <token> | Request | Required on every authenticated endpoint |
Content-Type: application/json | Request | Required for POST/PATCH with a body |
X-Workspace-ID | Request | Selects the workspace for API key requests |
X-Correlation-ID | Request | Optional; if present, echoed back so you can correlate logs |
X-RateLimit-Limit | Response | Requests allowed per window. See Rate limits |
X-RateLimit-Remaining | Response | Requests left in the current window |
X-RateLimit-Reset | Response | Epoch seconds when the window resets |
X-Correlation-ID | Response | Always 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.
Troubleshooting
- 401 unauthorized — missing Bearer token, expired JWT, or revoked API key. Refresh the JWT or create a new key.
- validation_error mentioning workspace — add
X-Workspace-IDor set a default workspace on the key. - 403 forbidden — credentials work but the account lacks permission; check tenant roles in the product.
- Works in curl, fails in browser JS — call from a backend; browsers are subject to CORS. Use docs Try it for interactive checks.
- Hit 429 on login — auth endpoints have stricter IP limits; see Rate limits.