Agent Workflow API
Give AI agents the production lane they actually need: choose from a content plan, write a whole draft, check Voice DNA, run section-aware QA, add images, and publish after approval.
wordflowsai.com/api/agent Auth: X-API-Key header (one key, all orgs)What problem does this solve?
AI agents writing content for a business lack persistent organizational context. Every session starts from zero — the agent doesn't know the brand voice, content strategy, existing published posts, or writing style rules.
Wordflows stores project context and exposes a curated workflow API, so agents can stay in the content-production lane instead of choosing among every internal setup and management route.
Endpoints
/api/agent/projects When: First call - discover available projects
Returns: List of projects with id, name, website, and industry
/api/agent/project-context ?organization_id=X&purpose=writeWhen: Need scoped context for writing, review, image, publish, brief, outline, or discovery
Returns: Task-specific markdown context instead of a full project dump
/api/agent/content-plans ?organization_id=XWhen: Choosing what to write next
Returns: Saved content plans for the project
/api/agent/content-plans/{id} ?organization_id=XWhen: Inspecting a plan and selecting the next post
Returns: Plan details and all items; the agent infers the next item
/api/agent/content ?organization_id=XWhen: Creating or revising the full draft before section QA
Returns: Draft content ID, assembled markdown, and preview URL
/api/agent/content/{id}/draft-voice-check ?organization_id=XWhen: Checking the whole draft before sectioning
Returns: Voice DNA violations for the agent to fix in the whole document
/api/agent/content/{id}/quality-pipeline ?organization_id=XWhen: Running later QA after the whole draft is acceptable
Returns: Section-aware status for fact check, AI sanitization, voice review, internal links, and TOC
Legacy Management Endpoints
These lower-level routes still work for admin and setup automations, but they are hidden from default generated schema/tool discovery so normal MCP clients see the smaller workflow surface.
Onboarding
/manage/onboarding/get-started /manage/onboarding/checklist Organization
/manage/org/startup-context /manage/org /manage/org /manage/org/analyze-website /manage/org/rescan-sitemaps /manage/org/sync-blog Offers
/manage/offers /manage/offers /manage/offers/{id} /manage/offers/{id} CTAs
/manage/ctas /manage/ctas /manage/ctas/{id} /manage/ctas/{id} Memories
/manage/memories /manage/memories /manage/memories/{id} /manage/memories/{id} Brand & Style Guides
/manage/brand-guide /manage/brand-guide /manage/style-guide /manage/style-guide Sitemaps
/manage/sitemaps /manage/sitemaps Brain Materials
/manage/materials /manage/materials/from-url /manage/materials/from-text /manage/materials/from-file /manage/materials/{id} Pages
/manage/pages/add-to-brain Task Polling
/manage/tasks/{id} /manage/tasks Knowledge Search
/manage/knowledge/search Voice Tuning
/manage/voice/available /manage/voice /manage/voice/generate /manage/voice Content Plans
/manage/content-plans /manage/content-plans/inventory /manage/content-plans/{id} /manage/content-plans/bulk /manage/content-plans/{id}/items/bulk /manage/content-plans/{id}/items/{item_id}/move /manage/content-plans/{id}/items/{item_id}/content/attach /manage/content-plans/{id}/items/{item_id}/content/move /manage/content-plans/{id}/items/{item_id}/content/replace /manage/content-plans/{id}/items/{item_id}/content /manage/content-plans/{id}/approve Publishing
/manage/publishing/profiles /manage/publishing/content/{id} Example: agent managing org config
# Legacy /manage endpoints remain available for admin/setup automations,
# but they are hidden from default generated tool discovery.
import httpx
headers = {"X-API-Key": "wf_ak_your_key_here"}
base = "https://wordflowsai.com/api/agent"
org_id = 42
# Bootstrap the project and pick a voice first
startup = httpx.get(f"{base}/manage/org/startup-context", headers=headers,
params={"organization_id": org_id}).json()
voice_id = startup["default_voice_id"]
# Add a new offer
httpx.post(f"{base}/manage/offers", headers=headers,
params={"organization_id": org_id},
json={"name": "Pro Plan", "description": "Full access", "offer_type": "product", "price_info": "$49/mo"})
# Update content strategy
httpx.put(f"{base}/manage/org", headers=headers,
params={"organization_id": org_id},
json={"content_strategy": "Focus on developer education and cloud-native tutorials"})
# Add knowledge from a URL
httpx.post(f"{base}/manage/materials/from-url", headers=headers,
params={"organization_id": org_id},
json={"url": "https://acme.com/about", "title": "About Us", "category": "company_info"})
# Save a preference
httpx.post(f"{base}/manage/memories", headers=headers,
params={"organization_id": org_id},
json={"content": "Always mention our free tier in blog posts", "category": "instruction"})
# Inspect the selected voice
voice = httpx.get(f"{base}/manage/voice", headers=headers,
params={"organization_id": org_id, "voice_id": voice_id}).json()
# Save a topical map drafted in ChatGPT/Codex
httpx.post(f"{base}/manage/content-plans/bulk", headers=headers,
params={"organization_id": org_id},
json={
"plan": {"title": "AI Content Strategy Topical Map", "type": "topical_map"},
"source": {"type": "chatgpt", "format": "markdown"},
"items": [{
"client_id": "pillar-1",
"title": "AI Content Operations",
"children": [{"client_id": "cluster-1-1", "title": "How to Build an AI Content Workflow"}]
}]
})
print(voice["status"])Context response format
Context endpoints return scoped JSON. The markdown field contains structured markdown with ## headers — ready for direct prompt injection.
{
"purpose": "write",
"organization_id": 42,
"markdown": "## Writing Voice (DNA)\n[Detailed voice instructions tailored to this organization...]\n\n## Style Rules\nGrammar: american_english\nOxford Comma: Yes\n\n## Brand Constraints\nProhibited Words: synergy, leverage, delve"
}Quick start
Sign up at wordflowsai.com and complete onboarding
Create a Voice DNA profile (from samples or via Voice Genesis)
Generate an API key from the dashboard
Call the API:
# First, list your projects
curl -H "X-API-Key: wf_ak_your_key_here" \
https://wordflowsai.com/api/agent/projects
# Then fetch scoped writing context for a project
curl -H "X-API-Key: wf_ak_your_key_here" \
"https://wordflowsai.com/api/agent/project-context?organization_id=42&purpose=write&topic=ielts%20speaking"Integration patterns
Multi-step agent pipeline
Each stage of content creation calls the endpoint it needs. Minimizes token usage per step.
import httpx
headers = {"X-API-Key": "wf_ak_your_key_here"}
base = "https://wordflowsai.com/api/agent"
# Step 0: Get available projects
projects = httpx.get(f"{base}/projects", headers=headers).json()
org_id = projects[0]["id"]
# Step 1: Inspect plans and choose the next item
plans = httpx.get(f"{base}/content-plans", headers=headers, params={"organization_id": org_id}).json()
plan = httpx.get(f"{base}/content-plans/{plans[0]['id']}", headers=headers, params={"organization_id": org_id}).json()
item = next(i for i in plan["items"] if not i.get("content_id"))
# Step 2: Get scoped writing context
ctx = httpx.get(
f"{base}/project-context",
headers=headers,
params={"organization_id": org_id, "purpose": "write", "topic": item["topic"] or item["title"]}
).json()["markdown"]
# Step 3: After the agent writes a whole draft, save it
content = httpx.post(f"{base}/content", headers=headers,
params={"organization_id": org_id},
json={"title": item["title"], "markdown": draft_markdown, "content_plan_item_id": item["id"]}).json()
# Step 4: Check the whole draft voice, revise with the LLM, and save again if needed
voice_report = httpx.post(f"{base}/content/{content['content_id']}/draft-voice-check",
headers=headers, params={"organization_id": org_id}).json()
# Step 5: Run section-aware QA once the whole draft is acceptable
httpx.post(f"{base}/content/{content['content_id']}/quality-pipeline",
headers=headers, params={"organization_id": org_id}, json={})Image workflow
Image-capable agents can generate or edit images themselves, then import the resulting file refs into Wordflows. Other agents can queue Wordflows image generation.
import httpx
headers = {"X-API-Key": "wf_ak_your_key_here"}
base = "https://wordflowsai.com/api/agent"
# Get project and visual brand kit before image work
projects = httpx.get(f"{base}/projects", headers=headers).json()
org_id = projects[0]["id"]
kit = httpx.get(f"{base}/image-brand-kit", headers=headers, params={"organization_id": org_id}).json()
# If the agent generated an image, import its ChatGPT file refs
httpx.post(f"{base}/content/{content_id}/attach-chatgpt-image",
headers=headers,
params={"organization_id": org_id},
json={
"openaiFileIdRefs": [{"download_link": image_download_link, "mime_type": "image/png"}],
"image_type": "featured",
"alt_text": "Featured image"
})What is Voice DNA?
Voice DNA is a forensic writing profile that captures exactly how a specific author or brand writes. It goes far beyond "be professional" or "use a friendly tone."
What makes it different
How it's created
From existing writing: Upload blog posts or website content. Wordflows runs a two-pass forensic analysis to extract patterns and synthesize instructions.
From scratch (Voice Genesis): Describe the voice you want. Wordflows generates a fictional character, writes as that character, then analyzes the output forensically.
What is the Content Brain?
The Content Brain is the unified organizational knowledge layer served by this API. It includes:
Brand Guide
Tone, personality, messaging, positioning, dos/don'ts
Style Guide
Grammar, headings, content length, SEO rules
Voice DNA
Forensic writing profile and synthesized instructions
Content Strategy
Goals, pillars, guidelines
Offers & CTAs
Products, services, and calls-to-action with placement rules
Blog Inventory
Existing posts for dedup and internal linking
Knowledge Base
Embedded content chunks from website and uploads
Org Memories
Learned preferences from past interactions
Use cases
Machine-readable documentation
For AI agents and automated tools, these files provide optimized documentation: