Menu

Referência da API · Campaign Manager

Rascunhos

campaign_manager · drafts · 5 operações

GET/v1/campaign-manager/drafts

List campaign drafts

campaign_manager.drafts.list

LeituraIdempotenteDesde 2026-11-01

Lists the organization's campaign drafts, last edited first: the plans built with MIA in Campaign Manager's builder (or saved through the API) before their campaigns are created. Each draft has its status (draft, creating, created, partial, failed), campaign_count and campaign_names, and created_entities (the platform ids the builder created, per campaign); the plan itself (the blueprint) comes with campaign_manager.drafts.get. By default created drafts are left out; pass statuses to choose. Requires view access to Campaign Manager. With Google Ads, LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted, and their fields are left out of the response (the permissions guide lists what each platform allows).

Escopo
campaign_manager:read
Permissão
Ver o módulo
Tool do MCP
campaign_manager_drafts_listNa superfície completa; na compacta, mb_execute_operation com id: "campaign_manager.drafts.list".

Custo declarado: até 202 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

limitintegerqueryopcional

How many items this page brings at most (see the maximum and the default in the schema).

Padrão: 50

cursorstringqueryopcional

The next_cursor of the previous page, exactly as it came (only for the same list and filters); without it, the first page.

statusesarray<enum>queryopcional

Only drafts in these statuses (default: draft, creating, partial and failed; created drafts are left out).

Valores: draft, creating, created, partial, failed

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/campaign-manager/drafts" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl "https://api.mb-suite.com/v1/campaign-manager/drafts" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/campaign-manager/drafts/{draft_id}

Get a campaign draft

campaign_manager.drafts.get

LeituraIdempotenteDesde 2026-11-01

Returns one campaign draft with its full blueprint (campaigns with platform, name, currency and their google, meta, tiktok or linkedin block, which keeps the builder's own key names as stored; assumptions, clarifying_questions, refinement_questions and detected_gates), status and created_entities. 404 campaign_draft_not_found if it is not in this organization. Requires view access to Campaign Manager. With Google Ads, LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted, and their fields are left out of the response (the permissions guide lists what each platform allows).

Escopo
campaign_manager:read
Permissão
Ver o módulo
Tool do MCP
campaign_manager_drafts_getNa superfície completa; na compacta, mb_execute_operation com id: "campaign_manager.drafts.get".

Custo declarado: até 1 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

draft_idstringrotaobrigatório

Campaign draft id (from campaign_manager.drafts.list).

Resposta

idstring

Draft id.

org_idstring

The organization.

statusenum

draft, creating, created, partial or failed.

Valores: draft, creating, created, partial, failed

created_by_idstring | null

Who created it (uid).

source_strategy_idstring | null

The AI strategy it comes from.

conversation_idstring | null

The MIA conversation it comes from.

created_entitiesarray<object>

What the builder created, per campaign (empty until it runs).

campaign_countnumber

Campaigns in the plan.

campaign_namesarray<string>

Their names.

created_atnumber | null

Epoch ms.

updated_atnumber | null

Last edit (epoch ms).

blueprintobject

The campaign plan in the builder's format (the shape MIA proposes): campaigns with platform (google_ads, meta_ads, tiktok_ads, linkedin_ads), name, currency and the platform block (google, meta, tiktok or linkedin, whose keys are the builder's own and travel as they are), plus assumptions and questions. It is stored as is (up to 50 campaigns and 512 KB); the builder validates it against the ad account when the campaigns are created, at most 20 per run.

Erros

Exemplo

curl "https://api.mb-suite.com/v1/campaign-manager/drafts/{draft_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl "https://api.mb-suite.com/v1/campaign-manager/drafts/{draft_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/campaign-manager/drafts

Save a new campaign draft

campaign_manager.drafts.create

EscritaDesde 2026-11-01

Saves a campaign plan as a new draft (status draft, revision 1) so a person can review, edit and create it in Campaign Manager's builder or from MIA's plan card. Send the blueprint in the builder's format (campaigns with platform, name, currency and the platform block, whose keys are the builder's own and travel as they are; assumptions and the questions with the names of the schema; up to 50 campaigns and 512 KB, and the builder creates at most 20 per run) and, optionally, the AI strategy it comes from. Ids of files already uploaded to a platform (asset resource names, image hashes of carousel cards, video and document URNs) are dropped: only the creation sets them, after the person picks the files. Nothing is created on the ad platforms: campaigns are created only by a person (the builder, or the «Crear en pausa» button of MIA's plan card), where the plan is validated against the ad account. Returns draft_id and the draft. Requires full access to Campaign Manager. With Google Ads, LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted, and their fields are left out of the response (the permissions guide lists what each platform allows).

Escopo
campaign_manager:write
Permissão
Editar no módulo
Tool do MCP
campaign_manager_drafts_createNa superfície completa; na compacta, mb_execute_operation com id: "campaign_manager.drafts.create".

Custo declarado: até 0 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

blueprintobjectcorpoobrigatório

The campaign plan in the builder's format (the shape MIA proposes): campaigns with platform (google_ads, meta_ads, tiktok_ads, linkedin_ads), name, currency and the platform block (google, meta, tiktok or linkedin, whose keys are the builder's own and travel as they are), plus assumptions and questions. It is stored as is (up to 50 campaigns and 512 KB); the builder validates it against the ad account when the campaigns are created, at most 20 per run.

source_strategy_idstringcorpoopcional

The AI strategy the plan comes from (Estrategias AI), for traceability.

conversation_idstringcorpoopcional

The MIA conversation the plan comes from.

Resposta

draft_idstring

Draft id.

draftobject

The draft as it is now.

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/campaign-manager/drafts" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "blueprint": {}
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/campaign-manager/drafts" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "blueprint": {}
}'
PATCH/v1/campaign-manager/drafts/{draft_id}

Replace a campaign draft's plan

campaign_manager.drafts.update

EscritaIdempotenteDesde 2026-11-01

Replaces the blueprint of an existing draft (the whole plan, like the builder's autosave) as a new revision and sets it back to status draft: a plan card of MIA for the previous revision stops creating and asks the person to review it again. The same plan again changes nothing (no new revision, nothing audited), except on a failed draft, which goes back to draft as a new revision. A draft whose campaigns were already created (created or partial) is reopened only by a different plan, as a new revision. A failed or partial draft saved by someone who neither created it nor is an owner or admin keeps its status (only they can resume its creation). If another revision was saved meanwhile (another tab or MIA), 409 draft_changed: read it again and resend. Pass expected_rev (the revision you read) to save only over that one: if the draft is at another revision, 409 draft_changed with the current one in details.rev and nothing is written; retrying a save that already went in (the same plan, the draft one revision ahead and saved by you) returns the draft as it is. A draft whose campaigns are being created right now (by the builder or MIA's plan card) is 409 draft_in_progress. Ids of files already uploaded to a platform are dropped, as in create. 404 campaign_draft_not_found if it is not in this organization. Nothing is created on the ad platforms. Requires full access to Campaign Manager. With Google Ads, LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted, and their fields are left out of the response (the permissions guide lists what each platform allows).

Escopo
campaign_manager:write
Permissão
Editar no módulo
Tool do MCP
campaign_manager_drafts_updateNa superfície completa; na compacta, mb_execute_operation com id: "campaign_manager.drafts.update".

Custo declarado: até 2 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

draft_idstringrotaobrigatório

Campaign draft id (from campaign_manager.drafts.list).

blueprintobjectcorpoobrigatório

The campaign plan in the builder's format (the shape MIA proposes): campaigns with platform (google_ads, meta_ads, tiktok_ads, linkedin_ads), name, currency and the platform block (google, meta, tiktok or linkedin, whose keys are the builder's own and travel as they are), plus assumptions and questions. It is stored as is (up to 50 campaigns and 512 KB); the builder validates it against the ad account when the campaigns are created, at most 20 per run.

source_strategy_idstringcorpoopcional

The AI strategy the plan comes from (Estrategias AI), for traceability.

conversation_idstringcorpoopcional

The MIA conversation the plan comes from.

expected_revintegercorpoopcional

The plan's revision you saw. If the draft is at another revision now (someone saved meanwhile), 409 draft_changed with the current one in details.rev and nothing is written.

Resposta

draft_idstring

Draft id.

draftobject

The draft as it is now.

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/campaign-manager/drafts/{draft_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "blueprint": {}
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X PATCH "https://api.mb-suite.com/v1/campaign-manager/drafts/{draft_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "blueprint": {}
}'
DELETE/v1/campaign-manager/drafts/{draft_id}

Delete a campaign draft

campaign_manager.drafts.delete

IrreversívelDesde 2026-11-01

Deletes a campaign draft; it stays 30 days in the trash (platform.trash.restore brings it back). Campaigns already created from it stay on the ad platforms. A draft whose campaigns are being created right now (by the builder or MIA's plan card) is 409 draft_in_progress. Outside the app: DELETE confirms inline; or dry_run=true for the preview and a confirm_token. Requires full access to Campaign Manager and a credential that allows deletion.

Com uma API key, este DELETE roda direto: o registro fica 30 dias na lixeira e a resposta traz o seu trash_item_id. Com um token OAuth, e pelo MCP, pede dry_run → confirm_token.

Escopo
campaign_manager:write e «Permitir exclusões» (campaign_manager:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
campaign_manager_drafts_deleteNa superfície completa; na compacta, mb_execute_operation com id: "campaign_manager.drafts.delete".

Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

draft_idstringrotaobrigatório

Campaign draft id (from campaign_manager.drafts.list).

Resposta

oktrue
trash_item_idstring

The trash item this deletion left: the item_id of platform.trash.restore (POST /trash/{item_id}/restore). Missing if nothing went to the trash.

trash_item_idsarray<string>

Only when the deletion left more than one copy: all of them, the first being trash_item_id.

trash_expires_atnumber

When the copy leaves the trash for good (epoch ms): 30 days after the deletion.

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/campaign-manager/drafts/{draft_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X DELETE "https://api.mb-suite.com/v1/campaign-manager/drafts/{draft_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"