Menu

Referência da API · Reports

Templates de página

reports · section_templates · 4 operações

GET/v1/reports/section-templates

List saved report pages

reports.section_templates.list

LeituraIdempotenteDesde 2026-11-01

Lists the report pages saved by the organization to reuse in other templates (section templates), newest first, paginated by cursor: name, description, page title and how many blocks it has. Fetch the blocks with reports.section_templates.get. Requires view access to Reports.

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

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

Parâmetros

limitintegerqueryopcional

How many section templates 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.

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/reports/section-templates" \
  -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/section-templates" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/reports/section-templates/{section_template_id}

Get a saved report page

reports.section_templates.get

LeituraIdempotenteDesde 2026-11-01

Returns one saved report page (section template) with its title and all its blocks, ready to add to a template's sections. Not found if it does not exist in the organization. Requires view access to Reports.

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

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

Parâmetros

section_template_idstringrotaobrigatório

The section template id (reports.section_templates.list).

Resposta

idstring

Section template id.

namestring

Name.

sectionobject

The saved page with its blocks.

descriptionstring | null

Description.

created_atnumber | null

Created (epoch ms).

updated_atnumber | null

Last edited (epoch ms).

created_bystring | null

Uid of who saved it.

Erros

Exemplo

curl "https://api.mb-suite.com/v1/reports/section-templates/{section_template_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/reports/section-templates/{section_template_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/reports/section-templates

Save a report page for reuse

reports.section_templates.create

EscritaDesde 2026-11-01

Saves a report page (a section with its blocks, as it is in a template or a report) with a name and an optional description, so it can be added to other templates. Blocks that read a platform must point to a slot or to a data source connected to the organization. Returns its id. Requires edit access to Reports.

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

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

Parâmetros

namestringcorpoobrigatório

Name of the saved page.

sectionobjectcorpoobrigatório

The page as it is in a template or report (title, position and blocks; new block types, metrics and presets are checked).

descriptionstringcorpoopcional

Description.

Resposta

section_template_idstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/reports/section-templates" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "section": {}
}'

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/section-templates" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "section": {}
}'
DELETE/v1/reports/section-templates/{section_template_id}

Delete a saved report page

reports.section_templates.delete

IrreversívelDesde 2026-11-01

Deletes a saved report page; it stays 30 days in the trash. Templates that already used it keep their copy of the page. Requires edit access to Reports. Outside the screen it needs a dry run and a confirm_token, or a key with deletion enabled.

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

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

Parâmetros

section_template_idstringrotaobrigatório

The section template id (reports.section_templates.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/reports/section-templates/{section_template_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/reports/section-templates/{section_template_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"