Skip to main content
Two auth methods are supported. Use Bearer Tokens for user-context operations; use API Keys for all automation, server-to-server, and long-running integrations.
Issued on login. Carries full user-level permissions within the organization — suited for frontend apps and dashboard interactions.
curl -X POST https://app.autoposting.ai/api-proxy/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "your-password"}'
# Response: { "data": { "token": "eyJhbGci..." } }
Session tokens expire. For long-running server processes, use API keys instead.

Permission Scopes

Requests outside granted scopes return 403 Forbidden. Grant only what your integration needs.
ScopeAccess
posts:readList and retrieve posts, drafts, publish results
posts:writeCreate, update, delete, publish, schedule, retry posts
brands:readList brands and retrieve brand details
brands:writeCreate, update, delete, and reorder brands
clips:readList clip jobs, retrieve results and download URLs
clips:writeUpload videos, trigger scene detection and clip generation
carousels:readList and retrieve carousel drafts
carousels:writeCreate, generate, refine, and publish carousels
kb:readSearch and read knowledge base documents
kb:writeUpload, ingest, and delete knowledge base content
agents:readList agents, view run history and outputs
agents:writeCreate, update, toggle, and run agents
webhooks:readList webhook endpoints
webhooks:writeCreate, update, and delete webhook endpoints

Rate Limiting

Limits are enforced per API key and per user session. Exceeding the limit returns 429 Too Many Requests. Implement exponential backoff — start at 1 second, double on each retry, cap at 60 seconds.
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait before retrying

Error Reference

StatusMeaning
401 UnauthorizedMissing, invalid, or expired token / API key
402 Payment RequiredInsufficient credits for the requested operation
403 ForbiddenValid credentials but insufficient scope
429 Too Many RequestsRate limit exceeded

Best Practices

Never embed session tokens in scripts or CI/CD pipelines. Session tokens are user-bound and expire — API keys are designed for programmatic access and don’t expire unless revoked.
A key that only needs posts:read should not have posts:write. Reducing scope limits blast radius if a key is compromised.
Use environment variables, AWS Secrets Manager, 1Password Secrets Automation, or Doppler. Never commit a key to source control — even in a private repo.
Revoke and recreate API keys periodically. Revoke immediately if a key is ever exposed — revocation is instant and permanent.

Quickstart

Create your first API key and publish a post in 5 minutes.

API Reference

Full endpoint reference with auth examples on every request.

API Keys endpoint

Create, list, update, and revoke keys programmatically.

MCP Server

Use Autoposting from Claude with automatic auth handling.