Authentication
The DraftLift API uses API keys for authentication. Keys carry scopes (what they can do) and an optional workspace binding (which workspace they operate against). Both are chosen at creation time and cannot be changed after issue — re-issue the key to change them.Creating an API key
- Navigate to Settings → API Keys in your DraftLift dashboard.
- Click Create API Key and give it a descriptive name.
- Pick scopes (Read is always included; Write is on by default).
- Pick a workspace binding (or leave it as All workspaces).
- Pick an expiration: 30 days, 90 days (default), 365 days, or Never.
- Copy the key immediately — it is only shown once.
API key format
dl_live_ for easy identification.
Using your key
Include the key in theAuthorization header:
DRAFTLIFT_API_KEY in your environment — the CLI prefers it over the saved credentials file:
Scopes
| Scope | What it allows |
|---|---|
read | Every GET endpoint (list, get, search). |
write | Everything read allows, plus create, update, delete, and generate. |
["read", "write"]. The admin scope is reserved in the schema but is not surfaced in v1; admin endpoints stay JWT-only.
A scope-gated mutation called with a read-only key returns:
upgrade_action URL on its own line.
Workspace binding
Workspaces partition references, memories, content calendars, and generated drafts. When you create a key, you choose one of two postures:| Posture | When to use |
|---|---|
| All workspaces | Multi-workspace agents, CLI on a laptop, anything that operates across workspaces. |
| Bound to a workspace | Per-client keys, scoped CI tokens, or any key you want to silently lock to one workspace’s data. |
Behavior at request time
| Request | Outcome |
|---|---|
Unbound key, no workspace_id | Endpoints that require a workspace return 400 (or operate on the default). |
Unbound key, explicit workspace_id | Operates on the requested workspace. |
Bound key, no workspace_id | Server injects the bound workspace automatically. |
Bound key, workspace_id matches the binding | 200 OK. |
Bound key, workspace_id differs from the binding | 403 workspace_mismatch — the server never silently overrides. |
Mismatch errors
Introspecting a key
name, scopes, workspace_id, expires_at, and last_used_at. This is the only /api-keys/* endpoint that accepts API keys — every other key-management operation requires a web session.
Endpoints not callable with API keys (denylist)
Some operations require an interactive web session and cannot be performed with adl_live_ key:
POST /api-keys,DELETE /api-keys/:id,PUT /api-keys/:id— creating, revoking, or renaming keys./billing/*mutations — checkout, portal sessions, refunds, cancel subscription./admin/*— every admin endpoint.PUT /me/settings,PUT /learning-preferences, account/profile mutations.- Auth flows:
/auth/login,/cli-auth/*, OAuth callbacks.
401 Unauthorized. Use the dashboard for these operations.
Stability and versioning
Endpoints are tagged in the OpenAPI spec:stable— Stable. Breaking changes will require a/api/v2/...mount.beta— Functional but the response shape may evolve. New fields are additive; we will not remove or rename fields without a deprecation cycle.internal— Excluded from public docs. Do not depend on these.
/templates, /generate, /finalizeContent, /thesis, /mcp) ship as beta until they have ~30 days of stable use without schema changes.
Key management
- Revoke a key from Settings → API Keys — takes effect within seconds.
- Rename keys to keep them organized.
- Monitor usage per key from the Settings page.
- Rotate by creating a replacement, rolling it into your config, then revoking the old key.