Menu

Referência da API · Reports

Relatórios ad hoc

reports · adhoc · 4 operações

GET/v1/reports/adhoc

List ad hoc report PDFs

reports.adhoc.list

LeituraIdempotenteDesde 2026-11-01

Lists the ad hoc report PDFs generated in the organization (PDFs made on the spot from a template or an editable report, without a report instance), newest first, paginated by cursor: title, period, account, template and when the file expires (12 months). Get a download link with reports.adhoc.pdf_url. Members and viewers only see the accounts assigned to them; that filter and target_org_id read further until the page is full. Requires view access to Reports.

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

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

Parâmetros

limitintegerqueryopcional

How many ad hoc reports per page (default 50, at most 200).

Padrão: 50

cursorstringqueryopcional

The next_cursor of the previous page, to get the next one; omit it for the first page.

target_org_idstringqueryopcional

Only the ad hoc reports of this account (platform.orgs.list).

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/reports/adhoc" \
  -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/reports/adhoc" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/reports/adhoc/{adhoc_report_id}/refresh-url

Get a fresh download link for an ad hoc PDF

reports.adhoc.refresh_url

EscritaIdempotenteDesde 2026-11-01

Signs a new 7-day download link for the PDF of an ad hoc report and stores it on the record, while the file is still in storage (12 months after it was generated). 409 adhoc_pdf_expired once it expired; 404 adhoc_pdf_missing if the file is gone. Requires view access to Reports. With Google Ads, Google Business Profile, LinkedIn, TikTok or YouTube, 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).

Escopo
reports:write
Permissão
Ver o módulo
Tool do MCP
reports_adhoc_refresh_urlNa superfície completa; na compacta, mb_execute_operation com id: "reports.adhoc.refresh_url".

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

Parâmetros

adhoc_report_idstringrotaobrigatório

The ad hoc report id (reports.adhoc.list).

Resposta

pdf_urlstring
expires_atnumber

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/reports/adhoc/{adhoc_report_id}/refresh-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 -X POST "https://api.mb-suite.com/v1/reports/adhoc/{adhoc_report_id}/refresh-url" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/reports/adhoc/{adhoc_report_id}/pdf-url

Get the download link of an ad hoc report PDF

reports.adhoc.pdf_url

LeituraIdempotenteDesde 2026-11-01

Returns a signed download link (valid one hour) for the PDF of an ad hoc report, while the file is still in storage (12 months after it was generated), without changing anything: a read-only credential can use it. 409 adhoc_pdf_expired once it expired; 404 adhoc_pdf_missing if the file is gone. Requires view access to Reports. With Google Ads, Google Business Profile, LinkedIn, TikTok or YouTube, 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).

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

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

Parâmetros

adhoc_report_idstringrotaobrigatório

The ad hoc report id (reports.adhoc.list).

Resposta

urlstring

Signed download link (expires in one hour).

file_namestring

The PDF's file name.

expires_atnumber

When the link expires (epoch ms).

Erros

Exemplo

curl "https://api.mb-suite.com/v1/reports/adhoc/{adhoc_report_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/reports/adhoc/{adhoc_report_id}/pdf-url" \
  -H "Authorization: Bearer $MB_TEST_KEY"
DELETE/v1/reports/adhoc/{adhoc_report_id}

Delete an ad hoc report PDF

reports.adhoc.delete

IrreversívelDesde 2026-11-01

Deletes an ad hoc report from the history together with its PDF file. It does not go to the trash: the file is removed from storage, so there would be nothing to restore. Owners and admins only. Outside the screen it always needs a dry run and its confirm_token.

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
reports:write e «Permitir exclusões» (reports:delete no OAuth)
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
reports_adhoc_deleteNa superfície completa; na compacta, mb_execute_operation com id: "reports.adhoc.delete".

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

Parâmetros

adhoc_report_idstringrotaobrigatório

The ad hoc report id (reports.adhoc.list).

Resposta

oktrue

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/reports/adhoc/{adhoc_report_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/reports/adhoc/{adhoc_report_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'