Skip to main content

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

https://draftliftai.com/api/v1

Authentication

All requests require a Bearer token. Create an API key from Settings > API Keys in your dashboard.
curl -H "Authorization: Bearer dl_live_your_key_here" \
  https://draftliftai.com/api/v1/templates
See Authentication for details on creating and managing API keys.

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

curl -s https://draftliftai.com/api/v1/templates \
  -H "Authorization: Bearer dl_live_your_key_here"
Note the id of the template you want (e.g. a LinkedIn Post template).

3. Generate

curl -X POST https://draftliftai.com/api/v1/generate \
  -H "Authorization: Bearer dl_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1,
    "user_direction": "Write about why most B2B companies waste money on generic SEO content instead of opinion-driven thought leadership"
  }'
No 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:
curl -X POST https://draftliftai.com/api/v1/finalizeContent \
  -H "Authorization: Bearer dl_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "content_id": 789,
    "finalized_content": "Your edited final version here..."
  }'

Headless agent workflow

The API is designed for AI agents operating headlessly. A typical loop:
# 1. Generate
result = requests.post(f"{BASE}/generate", headers=headers, json={
    "template_id": TEMPLATE_ID,
    "user_direction": direction,
    "memory_ids": [1, 5],
}).json()

content_id = result["content_id"]
generated = result["generated_content"]

# 2. Review / edit (your agent logic here)
final_content = agent_review_and_edit(generated)

# 3. Finalize
requests.post(f"{BASE}/finalizeContent", headers=headers, json={
    "content_id": content_id,
    "finalized_content": final_content,
})
Three calls: generate, review in your environment, finalize. No content creation step needed.

Generate with context

Pass memory_ids to inject your voice and knowledge into the generation:
curl -X POST https://draftliftai.com/api/v1/generate \
  -H "Authorization: Bearer dl_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1,
    "user_direction": "Write a LinkedIn post about content-led growth",
    "memory_ids": [1, 5, 12]
  }'
You can also pass reference_material_ids for source material the AI should draw from.

Rate limits

PlanRequests/minRequests/hour
Business1001,000
Agency3005,000
Rate limit headers are included in every response:
  • X-RateLimit-Limit — Maximum requests per window
  • X-RateLimit-Remaining — Requests remaining
  • X-RateLimit-Reset — Unix timestamp when the window resets

Error handling

All errors return a detail field:
{
  "detail": "Description of the error"
}
StatusMeaning
401Missing or invalid API key
403Your plan doesn’t include API access
404Resource not found
422Validation error (check request body)
429Rate limit exceeded — see Retry-After header