REST API
Every MCP tool is also a plain HTTP endpoint under https://adflitz.com/api/v1. JSON in, JSON out, same keys and permissions.
Basics
curl https://adflitz.com/api/v1/overview \ -H "Authorization: Bearer apk_YOUR_KEY"
GET endpoints take query parameters, POST endpoints a JSON body. Errors return { "error": { "code", "message" } } with 400, 401, 402 (not enough credits), 403, 404, 409 or 429. The machine-readable spec is at /api/v1/openapi.json.
Endpoints
| GET /api/v1/overview | Workspace overview |
| GET /api/v1/projects | List projects |
| GET /api/v1/connections | Platform connection status |
| GET /api/v1/accounts | List ad accounts |
| GET /api/v1/campaigns | List campaigns |
| GET /api/v1/ad-groups | List ad groups / ad sets |
| GET /api/v1/ads | List ads |
| GET /api/v1/reports | Performance report |
| GET /api/v1/platform-options | Platform options for drafts |
| POST /api/v1/accounts/:ad_account_id/sync | Sync an ad account now |
| GET /api/v1/drafts | List drafts |
| GET /api/v1/drafts/:draft_id | Get a draft |
| POST /api/v1/drafts | Create a change draft |
| POST /api/v1/drafts/:draft_id/approve | Approve a draft |
| POST /api/v1/drafts/:draft_id/publish | Publish a draft |
| POST /api/v1/drafts/:draft_id/reject | Reject a draft |
| GET /api/v1/library | Search the ads library |
| GET /api/v1/competitors | List tracked competitors |
| POST /api/v1/competitors | Track a competitor |
| DELETE /api/v1/competitors/:competitor_id | Stop tracking a competitor |
| GET /api/v1/boards | List swipe-file boards |
| GET /api/v1/saved-ads | List saved ads |
| POST /api/v1/saved-ads | Save an ad to the swipe file |
| GET /api/v1/activity | Activity feed |
| GET /api/v1/autopilot/rules | List autopilot rules |
| POST /api/v1/autopilot/run | Run autopilot now |
| GET /api/v1/credits | AI credit balance |
| POST /api/v1/ai/copy | Generate ad copy (uses credits) |
| POST /api/v1/studio/static-ad | Render a static ad (uses credits) |
| POST /api/v1/ai/audit | Audit performance (uses credits) |
Currencies
Budgets, spend, revenue and bids always use the ad account's own currency (a EUR account reports euros, a daily budget of 25 means €25.00). Every campaign, ad set and report carries a currency field, and reports never add up accounts that bill in different currencies: pass currency to pick one, and read currencies for what is available. Only Adflitz's own plans and credit packs are priced in USD.
Create a draft
curl -X POST https://adflitz.com/api/v1/drafts \
-H "Authorization: Bearer apk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Scale retargeting","operations":[{"type":"campaign.update","campaign_id":"…","changes":{"daily_budget":120}}]}'