Menu

Referência da API · Media Planner

Compartilhamentos

media_planner · shares · 6 operações

POST/v1/media-planner/plans/{plan_id}/shares

Email a media plan

media_planner.shares.send

EscritaDesde 2026-11-01

SENDS an email (Amazon SES) with a media plan: its window, budget by currency and by platform and, in campaigns mode, the campaign table; with format pdf the plan's PDF is attached too. One email to everyone (to and cc, up to 50 recipients in total), with an optional personal_note and the subject given. sender_id picks the From among the senders this person can use (an item of senders in branding.email_domain.get: the organization's verified domain or its agency's; none or __system__ = MB Suite), and the email carries that sender's branding; 403 sender_not_allowed otherwise. locale (es, en, pt-BR) for the email and the PDF. The send is recorded in the plan's share history (media_planner.shares.list) and fires media_planner.plan.shared. It reaches real inboxes: outside the app it needs a dry run (it says the recipients, the From, the subject and the format, with the same sender check) and its confirm_token; media_planner.shares.preview gives the HTML. Errors: 503 pdf_unavailable when the PDF service is not available (nothing was sent: retry, or send format html); when Amazon SES does not send it, 429 external_rate_limited, 409 external_rejected, 503 external_unavailable (it surely did not go out) or 409 external_outcome_unknown (SES did not answer: the email may have gone out, check before sending it again). Requires full access to the Media Planner. 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 (the permissions guide lists what each platform allows).

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

Escopo
media_planner:write
Permissão
Editar no módulo
Tool do MCP
media_planner_shares_sendNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.shares.send".
Eventos que pode emitir
media_planner.plan.shared

Custo declarado: até 503 leituras e 1 escritas por chamada (contam na cota diária). Usa uma plataforma externa (ses): conta na cota de operações externas.

Parâmetros

plan_idstringrotaobrigatório

Media plan id (from media_planner.plans.list).

formatenumcorpoobrigatório

html: the plan in the email body; pdf: the email plus the plan's PDF attached.

Valores: pdf, html

toarray<string>corpoobrigatório

Recipient addresses (up to 50 with cc).

subjectstringcorpoobrigatório

The email's subject.

ccarray<string>corpoopcional

Copy (CC) addresses.

personal_notestringcorpoopcional

A note shown at the top of the email.

sender_idstringcorpoopcional

From: the id of a sender this person may use (an item of senders in branding.email_domain.get: the organization's verified domain or its agency's); none or __system__ = MB Suite.

localeenumcorpoopcional

Language of the email and the PDF (es, en or pt-BR).

Valores: es, en, pt-BR

Resposta

share_idstring

The record of this send (media_planner.shares.list).

email_idstring

The email provider's message id, for support.

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/media-planner/plans/{plan_id}/shares" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "format": "pdf",
  "to": [
    "TO"
  ],
  "subject": "SUBJECT",
  "dry_run": true
}'

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. Na prática esta operação não é simulada (usa outra plataforma): responde 409 sandbox_external_unavailable.

GET/v1/media-planner/plans/{plan_id}/shares/preview

Preview a media plan email

media_planner.shares.preview

LeituraIdempotenteDesde 2026-11-01

Builds, without sending anything, the HTML of the email media_planner.shares.send would send for a plan, with the branding of the sender it would use (sender_id), the personal note and the locale (default: the person's language). The PDF is not generated. Returns html: the whole email, often 50,000 to 100,000 characters (a big plan, more); ask for it only to show or check the email itself (media_planner.plans.get has the plan's data). Requires access to the Media Planner and a role other than viewer (403 role_required). Through the API and the MCP it depends on the terms of LinkedIn: where they do not allow it, it answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Escopo
media_planner:read
Permissão
Ver o módulo
Tool do MCP
media_planner_shares_previewNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.shares.preview".

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

Parâmetros

plan_idstringrotaobrigatório

Media plan id (from media_planner.plans.list).

formatenumqueryopcional

html (default: the plan in the body) or pdf (the email that goes with the PDF).

Valores: pdf, html · Padrão: "html"

personal_notestringqueryopcional

A note shown at the top of the email.

localeenumqueryopcional

Language of the email.

Valores: es, en, pt-BR

sender_idstringqueryopcional

The sender whose branding the email carries (an item of senders in branding.email_domain.get); none = MB Suite.

Resposta

htmlstring

The email's HTML.

Erros

Exemplo

curl "https://api.mb-suite.com/v1/media-planner/plans/{plan_id}/shares/preview" \
  -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/media-planner/plans/{plan_id}/shares/preview" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/media-planner/plans/{plan_id}/shares

List the emails sent with a media plan

media_planner.shares.list

LeituraIdempotenteDesde 2026-11-01

Lists the emails sent with a media plan, newest first, paginated by cursor: format, recipients (to, cc), subject, personal note, sender and who sent it, and whether a PDF (has_pdf) and an HTML copy (has_html) are stored (12 months). Get them with media_planner.shares.pdf_url and media_planner.shares.html. Requires access to the Media Planner and a role other than viewer (viewers do not see who received the plan: 403 role_required).

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

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

Parâmetros

plan_idstringrotaobrigatório

Media plan id (from media_planner.plans.list).

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.

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/media-planner/plans/{plan_id}/shares" \
  -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/media-planner/plans/{plan_id}/shares" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/media-planner/plans/{plan_id}/shares/{share_id}/pdf-url

Get a download link for the PDF of a sent email

media_planner.shares.pdf_url

LeituraIdempotenteDesde 2026-11-01

Returns a signed download link for the PDF stored with a sent email of the plan (valid 1 hour for an API key or an app; 7 days in the app) and when it expires. 409 share_pdf_unavailable if that email had no PDF (html format, or sent before February 21, 2026) and share_pdf_expired if it is older than 12 months. Anyone with the link can download the file until it expires: do not post it in public places. Requires access to the Media Planner and a role other than viewer. Through the API and the MCP it depends on the terms of LinkedIn: where they do not allow it, it answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Escopo
media_planner:read
Permissão
Ver o módulo
Tool do MCP
media_planner_shares_pdf_urlNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.shares.pdf_url".

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

Parâmetros

plan_idstringrotaobrigatório

Media plan id (from media_planner.plans.list).

share_idstringrotaobrigatório

Id of a sent email of the plan (from media_planner.shares.list).

Resposta

urlstring

Signed link to the PDF.

expires_atnumber

When the link stops working (epoch ms).

Erros

Exemplo

curl "https://api.mb-suite.com/v1/media-planner/plans/{plan_id}/shares/{share_id}/pdf-url" \
  -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/media-planner/plans/{plan_id}/shares/{share_id}/pdf-url" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/media-planner/plans/{plan_id}/shares/{share_id}/html

Get the HTML of a sent email

media_planner.shares.html

LeituraIdempotenteDesde 2026-11-01

Returns the HTML of an email exactly as it was sent with the plan (the copy stored for 12 months): the whole email, often 50,000 to 100,000 characters; ask for it only to show or check the email itself (media_planner.shares.list has who got it and when). 409 share_html_unavailable for emails sent before February 21, 2026, and share_html_expired after 12 months. Requires access to the Media Planner and a role other than viewer. Through the API and the MCP it depends on the terms of LinkedIn: where they do not allow it, it answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Escopo
media_planner:read
Permissão
Ver o módulo
Tool do MCP
media_planner_shares_htmlNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.shares.html".

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

Parâmetros

plan_idstringrotaobrigatório

Media plan id (from media_planner.plans.list).

share_idstringrotaobrigatório

Id of a sent email of the plan (from media_planner.shares.list).

Resposta

htmlstring

The email's HTML.

Erros

Exemplo

curl "https://api.mb-suite.com/v1/media-planner/plans/{plan_id}/shares/{share_id}/html" \
  -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/media-planner/plans/{plan_id}/shares/{share_id}/html" \
  -H "Authorization: Bearer $MB_TEST_KEY"
DELETE/v1/media-planner/plans/{plan_id}/shares/{share_id}

Delete the record of a sent email

media_planner.shares.delete

IrreversívelDesde 2026-11-01

Deletes the record of an email sent with the plan and its stored PDF and HTML copies. The email itself was already delivered and is not recalled. It does not go to the trash. Only owners and admins. Outside the app it needs a dry run and a confirm_token. Requires full access to the Media Planner.

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

Escopo
media_planner:write e «Permitir exclusões» (media_planner:delete no OAuth)
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
media_planner_shares_deleteNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.shares.delete".

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

Parâmetros

plan_idstringrotaobrigatório

Media plan id (from media_planner.plans.list).

share_idstringrotaobrigatório

Id of a sent email of the plan (from media_planner.shares.list).

Resposta

oktrue

Always true.

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/media-planner/plans/{plan_id}/shares/{share_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'

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/media-planner/plans/{plan_id}/shares/{share_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'