DraftLift API
The DraftLift API gives you programmatic access to content generation, memories, templates, and content management. Available on Business and Agency plans.Base URL
Authentication
All requests require a Bearer token. Create an API key from Settings > API Keys in your dashboard.Scopes
Every API key carries a set of scopes that control which operations it can perform. Scopes are picked when the key is created (in Settings > API Keys) and cannot be changed afterward — re-issue a new key to change scopes.| Scope | Grants |
|---|---|
read | List and fetch resources (templates, memories, contents, references, voice profiles, usage). Always present. |
write | Create, update, and delete resources. Required for generate, repurpose, score, and any POST/PUT/PATCH/DELETE endpoint. |
['read', 'write']. Uncheck Write at creation time to mint a read-only key — useful for analytics dashboards or audit tools that should never mutate data.
Errors. Calling a write endpoint with a read-only key returns 403 with a structured detail body:
InsufficientScopeError (exit code 2) with the upgrade URL on its own line.
Workspace binding
API keys can optionally be bound to a single workspace at creation time. Binding scopes the key to that workspace for any workspace-aware operation (references, contents, conversions, knowledge graph, workspace listing).| Key type | Workspace resolution |
|---|---|
| Bound (one workspace) | All workspace-scoped requests auto-target the bound workspace. Passing workspace_id is optional; passing a different workspace returns 403. |
| Unbound (all workspaces) | Workspace-scoped requests must include workspace_id (body, query, or path). The CLI’s --workspace global flag plumbs this through. |
workspace_id that doesn’t match the key’s binding returns 403:
What’s not in the API
A few surfaces are intentionally web-session-only and reject API keys with401. These require interactive browser auth:
- Billing mutations —
POST /billing/checkout-session,/billing/portal-session,/billing/cancel-subscription,/billing/refund-request. Stripe checkout and refund flows are interactive by design. - Account mutations —
POST /register,PUT /me/settings,PUT /learning-preferences. Account-level changes belong in the dashboard. - API key management —
POST/PUT/DELETE /api-keys. Managing keys with a key would be a bootstrap footgun. The one exception isGET /api-keys/current, which lets a key introspect its own metadata (used bydl whoami). - Admin routes — the entire
/admin/*namespace stays JWT-only. - Workspace mutations — workspace create/update/delete is web-only; reads (
GET /workspaces,GET /workspaces/:id) are available via API key.
v1 stability commitment
The/api/v1 surface follows strict semver:
- Additive changes only. New endpoints, new optional request fields, and new response fields can ship without notice.
- No breaking changes. Removing endpoints, removing response fields, renaming fields, tightening validation, or changing status codes for existing flows are breaking changes and will not happen on
/api/v1. - Breaking changes ship under
/api/v2. When v2 mounts, v1 continues to work for a documented deprecation window. - Stability tags. Endpoints are tagged
stableorbetain the OpenAPI spec. Beta endpoints follow the same v1 contract but may iterate faster on response shape until promoted to stable. Internal-only endpoints (CLI device-flow auth, dev tools) are not documented and not part of the v1 contract.
Quickstart: generate in one call
The generate endpoint is the core of the API. Pass a template and your direction — DraftLift handles everything else.1. Get your API key
Create one at Settings > API Keys. Copy it immediately — it’s only shown once.2. Pick a template
id of the template you want (e.g. a LinkedIn Post template).
3. Generate
content_id needed — the API creates one automatically and returns it in the response.
4. Review and finalize
After editing, finalize the content to trigger learning analysis:Headless agent workflow
The API is designed for AI agents operating headlessly. A typical loop:Generate with context
Passmemory_ids to inject your voice and knowledge into the generation:
reference_material_ids for source material the AI should draw from.
Rate limits
| Plan | Requests/min | Requests/hour |
|---|---|---|
| Business | 100 | 1,000 |
| Agency | 300 | 5,000 |
X-RateLimit-Limit— Maximum requests per windowX-RateLimit-Remaining— Requests remainingX-RateLimit-Reset— Unix timestamp when the window resets
Error handling
All errors return adetail field:
| Status | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Your plan doesn’t include API access |
404 | Resource not found |
422 | Validation error (check request body) |
429 | Rate limit exceeded — see Retry-After header |