Overview
What the Media Ops API and MCP server do, and how they relate to the web app.
Media Ops is Infotráfego's Meta Ads campaign creator. Everything the team does in the web app — picking the client/Business Manager/ad account, looking up audiences, building and publishing campaigns, extending campaigns and ad sets, retrying failures, creating engagement audiences, managing targeting templates, clients, balances and users — can also be done through:
| Channel | For | Authentication |
|---|---|---|
REST API (/api/v1) | Automations and systems (n8n, scripts, backends) | API key or OAuth 2.1 token |
MCP server (/api/mcp) | AI assistants (Claude, ChatGPT, Cursor, Claude Code) | OAuth 2.1 (or API key) |
| Web app | Media buyers | Login (session) |
Restricted to the teamThe documentation is public, but the API is not: every call needs the credentials of a user registered in Media Ops. Accounts are created by administrators only.
One rule set, three channels
Business rules live only on the server. The web app, the API and MCP call the same services, so:
- campaign validation is the same everywhere (required fields, allowed conversion objectives, call-to-action buttons per objective, UTM confirmation, carousel limits, etc.);
- the client/BM/ad account selection is always re-checked on the server: an archived client, an account from another BM, or an account that was disabled manually or is inactive on Meta is refused with
403; - the creation pipeline (campaign → ad sets → media → creatives → ads), the audience pre-flight, the automatic wait when Meta throttles the account and the smart retry are identical;
- everything is created PAUSED. Activation still happens in Meta Ads Manager.
Endpoints
| Item | URL |
|---|---|
| API base URL | https://media.ops.infotrafego.com.br/api/v1 |
| OpenAPI 3.1 specification | https://media.ops.infotrafego.com.br/api/v1/openapi.json?lang=en |
| MCP server | https://media.ops.infotrafego.com.br/api/mcp |
| API keys and authorized apps | Web app → Integrações (Integrations) |
Asynchronous model
Creating a campaign takes from a few seconds to several minutes (video uploads, Meta rate limits). That is why:
POST /campaignsanswers202with ajob_id;- the server runs the creation in the background — closing the connection stops nothing;
- poll
GET /executions/{job_id}/progressuntil the status issuccess,partialorerror.
The same applies to POST /audiences/engagement and POST /executions/{job_id}/retry.
Conventions
- JSON bodies and responses (UTF-8). Field names are in English; messages are in Brazilian Portuguese (
user_message), ready to show to end users. - Budgets in Brazilian reais (
50= R$ 50.00). - Schedule dates in São Paulo time, format
YYYY-MM-DDTHH:mm. - Meta IDs are numeric strings;
ad_account_idis accepted with or without theact_prefix. - Every response carries the
x-request-idheader — include it when reporting a problem.
Where to go next
Create a key and make your first call in a few minutes.
API keys, OAuth 2.1 and the scopes of each operation.
From the client to the published (paused) ad, step by step.
Use Media Ops inside Claude, ChatGPT, Cursor or n8n.
Updated about 23 hours ago

