Developer API
Push drafts into your board from scripts and AI agents.
New to Legate? Start with the getting-started guide — setup plus agent connection for Claude Code, Hermes, and other MCP clients.
Authentication
Create a key in Team → API keys, then send it as a Bearer token. Each key is scoped to one workspace and revocable. Keys are prefixed legate_sk_ so secret scanners can flag a leak.
Authorization: Bearer legate_sk_...REST
Base URL https://legate.social
# Create a draft — lands in the scratch inbox
curl -X POST https://legate.social/api/v1/drafts \
-H "Authorization: Bearer legate_sk_..." \
-H "Content-Type: application/json" \
-d '{"body":"my draft"}'
# ...or straight into a board column
curl -X POST https://legate.social/api/v1/drafts \
-H "Authorization: Bearer legate_sk_..." \
-H "Content-Type: application/json" \
-d '{"body":"my draft","account":"xBartega","campaign":"Kamino Learn Launch"}'
# Discover valid targets
curl https://legate.social/api/v1/accounts -H "Authorization: Bearer legate_sk_..."
curl https://legate.social/api/v1/campaigns -H "Authorization: Bearer legate_sk_..."Fields: body (or thread for a 2+ post thread), and optional account (key or @handle), campaign (name or id), template, notes. Omit account + campaign to land in the scratch inbox; provide both to drop into that board column.
MCP — Claude Code, Codex, and other agents
The same API, exposed as MCP tools: create_draft, list_accounts, list_campaigns. Hosted, no install:
claude mcp add --transport http legate https://legate.social/api/mcp \
--header "Authorization: Bearer legate_sk_..."Or the stdio package, for clients without remote-HTTP support:
{
"mcpServers": {
"legate": {
"command": "npx",
"args": ["-y", "legate-mcp"],
"env": { "LEGATE_API_KEY": "legate_sk_..." }
}
}
}Good to know
Nothing is ever posted publicly — the API only creates draft cards on your board. Don’t invent live figures or URLs; leave a placeholder like <TBD> and fill it before posting.