Documentation
Connect Alterion Labs to your AI tools over MCP, or call the REST APIs directly. One brand key, every marketing agent.
Introduction
Alterion Labs gives your AI tools and your code direct access to every marketing agent. Connect over the Model Context Protocol (MCP) to let your AI coding tool apply marketing-grade changes, or call the REST APIs to publish content and run the Content Agent from your own stack. This reference covers both.
All REST requests are made to:
https://api.alterionlabs.com/v1Authentication
Every request authenticates with your brand API key, sent as a bearer token. Find your key in your Alterion Labs dashboard under Settings → API keys. Keep it server-side — it grants full access to your brand's agents.
curl https://api.alterionlabs.com/v1/posts \
-H "Authorization: Bearer $ALTERION_API_KEY"The MCP server uses the same key. Pass it as the token in your mcp-config.json (see Connect).
Errors
Alterion Labs uses conventional HTTP status codes. Codes in the 2xx range indicate success, 4xx indicate a problem with the request, and 5xx indicate a server error. Every error returns a JSON body:
{
"error": {
"type": "invalid_request",
"code": "missing_field",
"message": "Field 'title' is required."
}
}400invalid_requestThe request was malformed or missing a required field.
401authentication_errorNo valid API key was provided.
403permission_errorThe key is valid but lacks access to this resource.
404not_foundThe requested resource does not exist.
429rate_limit_exceededToo many requests. Back off and retry.
500api_errorSomething went wrong on our end.
Rate limits
Requests are rate limited per brand. Current limits and remaining quota are returned on every response:
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 598
X-RateLimit-Reset: 1717977600Exceeding the limit returns 429 rate_limit_exceeded. Back off until the Unix timestamp in X-RateLimit-Reset, then retry.
MCP Server
Connect your AI tool to every agent
The MCP server exposes each marketing agent as a callable tool. Your AI coding tool calls them; Alterion Labs returns structured, ready-to-apply changes — so you ship marketing-grade code without writing it.
Connect
Add Alterion Labs to any MCP-compatible tool — Cursor, Claude Code, Windsurf, VS Code + Copilot, JetBrains AI — with one config block. On connection, the server authenticates your token and exposes the tools below.
{
"mcpServers": {
"alterion-marketing": {
"url": "https://mcp.alterionlabs.com",
"token": "your_brand_token"
}
}
}Tools
Each tool maps to an agent capability. Inputs and outputs are JSON.
audit_marketingtoolRun a full marketing audit for a URL. Returns scored findings across SEO, content, GEO, analytics, and retention.
get_seo_fixestoolReturn prioritized, ready-to-apply SEO fixes — meta tags, schema, headings, internal links.
get_content_plantoolReturn a content calendar and article briefs based on keyword gaps.
get_geo_recommendationstoolReturn structure and schema changes that surface your content in AI search engines.
get_tracking_setuptoolReturn analytics and conversion tracking scripts to install.
get_retention_actionstoolReturn retention logic and cancel-flow changes to reduce churn.
Example — calling get_seo_fixes:
// Input
{ "url": "https://yourapp.com" }
// Output
{
"fixes": [
{
"id": "meta-description-missing",
"priority": "high",
"page": "/pricing",
"change": "Add a 155-character meta description.",
"snippet": "<meta name=\"description\" content=\"...\">"
}
]
}Blog API
Publish and manage content
A REST API for the Content Marketing Agent's blog engine. Create and update posts, pull feeds, read engagement, and manage newsletter subscribers — programmatically.
The Post object
idstringUnique identifier, prefixed post_.
titlestringPost title.
slugstringURL slug. Generated from the title if omitted.
statusenumOne of draft, scheduled, or published.
bodystringPost content in Markdown.
excerptstringShort summary. Auto-generated if omitted.
tagsstring[]Topic tags.
authorobject{ name, url }.
seoobject{ title, description } for search and social.
published_attimestampISO 8601 publish time. Null for drafts.
created_attimestampISO 8601 creation time.
updated_attimestampISO 8601 last-update time.
Endpoints
/v1/postsCreate a post. Returns the created Post object.
curl https://api.alterionlabs.com/v1/posts \
-H "Authorization: Bearer $ALTERION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "How we cut churn 30%",
"body": "## The problem\n...",
"tags": ["retention", "saas"],
"status": "published"
}'/v1/postsList posts. Filter with status and tag; paginate with limit and starting_after. Returns { data, has_more }.
curl "https://api.alterionlabs.com/v1/posts?status=published&limit=20" \
-H "Authorization: Bearer $ALTERION_API_KEY"/v1/posts/{id}Retrieve a single post by id.
curl https://api.alterionlabs.com/v1/posts/post_8fk2 \
-H "Authorization: Bearer $ALTERION_API_KEY"/v1/posts/{id}Update a post. Send only the fields you want to change.
curl -X PATCH https://api.alterionlabs.com/v1/posts/post_8fk2 \
-H "Authorization: Bearer $ALTERION_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "draft" }'/v1/posts/{id}Delete a post. Returns { id, deleted: true }.
curl -X DELETE https://api.alterionlabs.com/v1/posts/post_8fk2 \
-H "Authorization: Bearer $ALTERION_API_KEY"/v1/feedPull the published feed. Set format to rss or json.
curl "https://api.alterionlabs.com/v1/feed?format=json" \
-H "Authorization: Bearer $ALTERION_API_KEY"/v1/posts/{id}/metricsRead engagement. Returns { views, unique_visitors, comments, avg_read_time }.
curl https://api.alterionlabs.com/v1/posts/post_8fk2/metrics \
-H "Authorization: Bearer $ALTERION_API_KEY"/v1/newsletter/subscribersAdd a subscriber to your newsletter. Returns the subscriber object.
curl https://api.alterionlabs.com/v1/newsletter/subscribers \
-H "Authorization: Bearer $ALTERION_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "email": "reader@example.com", "name": "Alex" }'Content Agent API
Run the agent from your stack
Call the AI Content Marketing Agent directly. Generation runs asynchronously: you create a job, poll until it completes, then schedule or publish the resulting post.
The Job object
idstringUnique identifier, prefixed job_.
statusenumOne of queued, processing, completed, or failed.
typestringThe job type, e.g. generate.
resultobject{ post_id } when completed; null otherwise.
errorobjectError detail when failed; null otherwise.
created_attimestampISO 8601 creation time.
completed_attimestampISO 8601 completion time. Null until finished.
Endpoints
/v1/content/generateGenerate a draft from a topic. tone defaults to professional, length to medium. Returns a Job with status queued.
curl https://api.alterionlabs.com/v1/content/generate \
-H "Authorization: Bearer $ALTERION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"topic": "Reducing SaaS churn with onboarding",
"keywords": ["saas churn", "user onboarding"],
"tone": "professional",
"length": "medium",
"target_url": "https://yourapp.com"
}'/v1/content/jobs/{id}Retrieve a job. Poll until status is completed, then read result.post_id.
curl https://api.alterionlabs.com/v1/content/jobs/job_q1z9 \
-H "Authorization: Bearer $ALTERION_API_KEY"/v1/content/scheduleSchedule a post for publication at a future time.
curl https://api.alterionlabs.com/v1/content/schedule \
-H "Authorization: Bearer $ALTERION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post_id": "post_8fk2",
"publish_at": "2026-07-01T09:00:00Z"
}'/v1/content/publishPublish a post now to a destination. destination.type is one of blog, webhook, or cms.
curl https://api.alterionlabs.com/v1/content/publish \
-H "Authorization: Bearer $ALTERION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post_id": "post_8fk2",
"destination": { "type": "webhook", "url": "https://yourapp.com/hooks/blog" }
}'/v1/content/calendarList scheduled content. Filter by month (YYYY-MM). Returns { data: [{ post_id, title, publish_at, status }] }.
curl "https://api.alterionlabs.com/v1/content/calendar?month=2026-07" \
-H "Authorization: Bearer $ALTERION_API_KEY"