Menu

Referência da API · CRM

Cotações

crm · quotes · 13 operações

GET/v1/crm/quotes/config

Get the quote configuration

crm.quotes.config.get

LeituraIdempotenteDesde 2026-11-01

Returns the quote configuration of the CRM: the templates (layout, accent color, intro text, attached pages, which one is the default), the number prefix and the next number, the default validity in days, the number format and decimals, the issuer data printed on the document and the three footer texts. Never empty: an organization that never saved a template gets the synthetic template named 'Estándar' (id __default) with its brand color, and it stays when another template is created.

Escopo
crm:read
Permissão
Ver o módulo
Tool do MCP
crm_quotes_config_getNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.config.get".

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

Parâmetros

Sem parâmetros.

Resposta

templatesarray<object>
number_prefixstring
next_numbernumber

Next correlative number the first emission of a deal takes.

number_paddingnumber

Digits of the number (4 → 0042).

default_validity_daysnumber
number_formatenum | null

Valores: auto, dot_comma, comma_dot

decimalsnumber | null
issuerobject | null

Issuer data printed on the document; legal_name is printed as issuer.name in crm.quotes.export.

footer_leftstring | null
footer_centerstring | null
footer_rightstring | null
updated_atnumber | null

Last change of the stored configuration, epoch ms (absent while nothing was ever saved).

updated_by_idstring | null

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/quotes/config" \
  -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/crm/quotes/config" \
  -H "Authorization: Bearer $MB_TEST_KEY"
PATCH/v1/crm/quotes/config

Update the quote numbering, issuer and footer

crm.quotes.config.update

EscritaIdempotenteDesde 2026-11-01

Updates any of: the number prefix, the next number (it never goes back: the stored one wins if it is higher, so numbers already emitted are never reused), the default validity in days, the number format (auto, dot_comma, comma_dot) and decimals (0 or 2), the issuer data (replaced as a whole) and the three footer texts (an empty string leaves that position blank; {{numero}} prints the quote number). Fields not sent are kept. Returns the next number in force. Templates are managed with crm.quotes.templates.*. Requires manage_quote_config (managers and admins).

Escopo
crm:write
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_config_updateNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.config.update".

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

Parâmetros

number_prefixstringcorpoopcional

Printed prefix of the quote number, up to 24 characters (for example 'COT-2026-').

next_numberintegercorpoopcional

Next correlative number; it never goes back: the stored one wins if it is higher.

default_validity_daysintegercorpoopcional

Default validity of a quote in days (1 to 365); each emission can change it.

number_formatenumcorpoopcional

Thousands and decimal separators of the amounts: auto (by the document language), dot_comma (1.234,56) or comma_dot (1,234.56).

Valores: auto, dot_comma, comma_dot

decimals0 | 2corpoopcional

Decimals of the amounts: 0 or 2.

issuerobjectcorpoopcional

The issuer printed on the document, replaced as a whole (fields not sent are left empty).

footer_leftstringcorpoopcional

Left footer text; an empty string leaves it blank; {{numero}} prints the quote number.

footer_centerstringcorpoopcional

Center footer text; an empty string leaves it blank; {{numero}} prints the quote number.

footer_rightstringcorpoopcional

Right footer text; an empty string leaves it blank; {{numero}} prints the quote number.

Resposta

next_numbernumber

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/crm/quotes/config" \
  -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 PATCH "https://api.mb-suite.com/v1/crm/quotes/config" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/crm/quotes/templates

Create or replace a quote template

crm.quotes.templates.save

EscritaDesde 2026-11-01

Creates a quote template (without template.id) or replaces the whole template with that id (fields not sent, like intro_text, are left empty; an id that does not exist answers quote_template_not_found): name, layout (classic, modern or compact), accent color (#rrggbb), optional intro text, the ordered ids of the attached pages (from crm.quotes.pages.list, up to 20; one that does not exist answers quote_page_not_found) and whether it is the default (marking it unmarks the others; one template is always the default). In an organization that never saved a template the synthetic 'Estándar' (id __default) stays next to the new one. Returns the template id. A template is the design every quote uses: a deal's quote (its lines and totals) is built with crm.deals.update_quote and emitted with crm.quotes.emit. Requires manage_quote_config.

Escopo
crm:write
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_templates_saveNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.templates.save".

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

Parâmetros

templateobjectcorpoobrigatório

The whole template: a replace overwrites every field (what is not sent is left empty).

Resposta

template_idstring

Erros

Exemplo

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

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/crm/quotes/templates" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "template": {}
}'
POST/v1/crm/quotes/templates/{template_id}/delete

Delete a quote template

crm.quotes.templates.delete

IrreversívelDesde 2026-11-01

Deletes a quote template for good: templates have no trash, so it cannot be restored (quotes already emitted keep their PDF and their snapshot). If it was the default, the first remaining template becomes the default; when none remains, the synthetic 'Estándar' (id __default) comes back, and that one alone cannot be deleted (quote_template_last). The dry run names the template and which one becomes the default. Confirm with the user first. Requires manage_quote_config.

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
crm:write e «Permitir exclusões» (crm:delete no OAuth)
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_templates_deleteNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.templates.delete".

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

Parâmetros

template_idstringrotaobrigatório

The template's id, from crm.quotes.config.get (templates[].id); __default is the synthetic 'Estándar' template.

Resposta

oktrue

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/quotes/templates/{template_id}/delete" \
  -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 POST "https://api.mb-suite.com/v1/crm/quotes/templates/{template_id}/delete" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
POST/v1/crm/quotes/templates/{template_id}/default

Make a quote template the default

crm.quotes.templates.set_default

EscritaIdempotenteDesde 2026-11-01

Marks a template as the default one (the others stop being default): it is the template a new emission uses when none is chosen; also the synthetic 'Estándar' (id __default). Idempotent. Requires manage_quote_config.

Escopo
crm:write
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_templates_set_defaultNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.templates.set_default".

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

Parâmetros

template_idstringrotaobrigatório

The template's id, from crm.quotes.config.get (templates[].id); __default is the synthetic 'Estándar' template.

Resposta

oktrue

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/quotes/templates/{template_id}/default" \
  -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/crm/quotes/templates/{template_id}/default" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/crm/quotes/templates/{template_id}/duplicate

Duplicate a quote template

crm.quotes.templates.duplicate

EscritaDesde 2026-11-01

Copies a template with all its settings and pages under the name '<name> (copia)', never as the default, and returns the id of the copy. Requires manage_quote_config.

Escopo
crm:write
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_templates_duplicateNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.templates.duplicate".

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

Parâmetros

template_idstringrotaobrigatório

The template's id, from crm.quotes.config.get (templates[].id); __default is the synthetic 'Estándar' template.

Resposta

template_idstring

Id of the copy.

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/quotes/templates/{template_id}/duplicate" \
  -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/crm/quotes/templates/{template_id}/duplicate" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/crm/quotes/pages

List the quote attachment pages

crm.quotes.pages.list

LeituraIdempotenteDesde 2026-11-01

Lists the attachment pages that templates can append at the end of a quote (terms of sale, payment methods…), ordered by title, with their size; with include_content, also their sanitized HTML. Paginated by cursor (limit up to 50). Templates reference them by id in page_ids.

Escopo
crm:read
Permissão
Ver o módulo
Tool do MCP
crm_quotes_pages_listNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.pages.list".

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

Parâmetros

limitintegerqueryopcional

Pages per call, 1 to 50 (default 20).

Padrão: 20

cursorstringqueryopcional

next_cursor of the previous page.

include_contentbooleanqueryopcional

Include each page's sanitized HTML in content_html (default false: only title, size and dates).

Padrão: false

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/quotes/pages" \
  -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/crm/quotes/pages" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/crm/quotes/pages

Create a quote attachment page

crm.quotes.pages.create

EscritaDesde 2026-11-01

Creates an attachment page (title up to 160 characters and its rich-text HTML, sanitized when saved: scripts and event attributes are removed) that templates can append at the end of a quote; add its id to a template with crm.quotes.templates.save. Returns the page id. It is not the quote itself: a deal's quote (its lines and totals) is built with crm.deals.update_quote and its PDF is emitted with crm.quotes.emit. Requires manage_quote_config.

Escopo
crm:write
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_pages_createNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.pages.create".

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

Parâmetros

titlestringcorpoobrigatório

Page title, up to 160 characters.

content_htmlstringcorpoobrigatório

Rich-text HTML of the page; it is sanitized when saved (scripts and event attributes are removed).

Resposta

page_idstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/quotes/pages" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "title": "TITLE",
  "content_html": "CONTENT_HTML"
}'

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/crm/quotes/pages" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "title": "TITLE",
  "content_html": "CONTENT_HTML"
}'
PATCH/v1/crm/quotes/pages/{page_id}

Update a quote attachment page

crm.quotes.pages.update

EscritaIdempotenteDesde 2026-11-01

Changes the title and/or the HTML content (sanitized when saved) of an attachment page; with neither it answers no_changes. Quotes already emitted keep the PDF they were issued with. Requires manage_quote_config.

Escopo
crm:write
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_pages_updateNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.pages.update".

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

Parâmetros

page_idstringrotaobrigatório

An attachment page's id, from crm.quotes.pages.list.

titlestringcorpoopcional

New title, up to 160 characters.

content_htmlstringcorpoopcional

New rich-text HTML; it is sanitized when saved.

Resposta

oktrue

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/crm/quotes/pages/{page_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 PATCH "https://api.mb-suite.com/v1/crm/quotes/pages/{page_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/crm/quotes/pages/{page_id}/delete

Delete a quote attachment page

crm.quotes.pages.delete

IrreversívelDesde 2026-11-01

Deletes an attachment page for good and removes it from every template that used it: pages have no trash, so it cannot be restored (quotes already emitted keep their PDF). The dry run names the page and the templates it leaves. Confirm with the user first. Requires manage_quote_config.

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
crm:write e «Permitir exclusões» (crm:delete no OAuth)
Permissão
Editar no módulo · Ação do CRM: manage_quote_config
Tool do MCP
crm_quotes_pages_deleteNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.pages.delete".

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

Parâmetros

page_idstringrotaobrigatório

An attachment page's id, from crm.quotes.pages.list.

Resposta

oktrue

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/quotes/pages/{page_id}/delete" \
  -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 POST "https://api.mb-suite.com/v1/crm/quotes/pages/{page_id}/delete" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
POST/v1/crm/deals/{deal_id}/quote/emit

Emit the quote PDF of a deal

crm.quotes.emit

EscritaDesde 2026-11-01

Emits the deal's quote as a PDF (rendered by MB Suite's PDF service) and returns its download URL and number. The first emission reserves the next number for the deal; later emissions of the same deal reuse it and add a new row to its history (crm.quotes.emissions.list). Options: template (one that does not exist answers quote_template_not_found), which of its pages to include (only among the template's: quote_page_not_in_template otherwise), document language (es, en, pt-BR), number format and decimals, validity in days and a note for this emission. The deal must have line items (crm.deals.update_quote); see the document first with crm.quotes.export. When the PDF service is not available it answers pdf_unavailable (503) and nothing is emitted: retry in a few seconds. Not idempotent. Requires edit_deal on the deal.

Escopo
crm:write
Permissão
Editar no módulo
Tool do MCP
crm_quotes_emitNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.emit".

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

Parâmetros

deal_idstringrotaobrigatório

The deal's id, from crm.deals.list.

localeenumcorpoobrigatório

Language of the document: es, en or pt-BR.

Valores: es, en, pt-BR

validity_daysintegercorpoobrigatório

Validity of this quote in days (1 to 365); crm.quotes.config.get has the default.

template_idstringcorpoopcional

Template to use (default: the default one). The template's id, from crm.quotes.config.get (templates[].id); __default is the synthetic 'Estándar' template.

include_page_idsarray<string>corpoopcional

Which of the template's attachment pages to include (ids from the template's page_ids); omit it for all of them. A page the template does not have answers quote_page_not_in_template.

number_formatenumcorpoopcional

Separators for this emission (default: the configuration's).

Valores: auto, dot_comma, comma_dot

decimals0 | 2corpoopcional

Decimals for this emission, 0 or 2 (default: the configuration's).

notestringcorpoopcional

A note printed on this emission only, up to 1000 characters.

Resposta

emission_idstring
pdf_urlstring

Download link of the PDF.

number_formattedstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/deals/{deal_id}/quote/emit" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "locale": "es",
  "validity_days": 1
}'

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/crm/deals/{deal_id}/quote/emissions

List the quote emissions of a deal

crm.quotes.emissions.list

LeituraIdempotenteDesde 2026-11-01

Returns the emissions of the deal's quote, newest first, paginated by cursor (limit up to 50, default 20): number, language, validity, totals, currency, the template used, who emitted it and a fresh download URL of its PDF; with include_content, also the frozen content (issuer, client, line items, intro and footer). deal_not_found when the deal does not exist or the seller's scope hides it.

Escopo
crm:read
Permissão
Ver o módulo
Tool do MCP
crm_quotes_emissions_listNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.emissions.list".

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

Parâmetros

deal_idstringrotaobrigatório

The deal's id, from crm.deals.list.

limitintegerqueryopcional

Emissions per call, 1 to 50 (default 20), newest first.

Padrão: 20

cursorstringqueryopcional

next_cursor of the previous page.

include_contentbooleanqueryopcional

Include each emission's frozen content (issuer, client, line_items, intro_text, footer); default false: number, dates, template, totals and the PDF link.

Padrão: false

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/deals/{deal_id}/quote/emissions" \
  -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/crm/deals/{deal_id}/quote/emissions" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/crm/deals/{deal_id}/quote

Get the quote document of a deal

crm.quotes.export

LeituraIdempotenteDesde 2026-11-01

Builds the deal's quote document from its current state, exactly what the emission preview shows: issuer (name is the configuration's legal_name, the logo as an absolute URL), client (company and primary person), line items and totals, currency, the number it has (or the next one, is_preview_number), validity, template layout and color, the attached pages (sanitized HTML) and the footer. Optional template (quote_template_not_found when it does not exist), pages (only among the template's: quote_page_not_in_template otherwise) and language. It writes nothing and does not reserve a number: use crm.quotes.emit for the PDF. Not found if the deal does not exist or the seller's scope hides it.

Escopo
crm:read
Permissão
Ver o módulo
Tool do MCP
crm_quotes_exportNa superfície completa; na compacta, mb_execute_operation com id: "crm.quotes.export".

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

Parâmetros

deal_idstringrotaobrigatório

The deal's id, from crm.deals.list.

template_idstringqueryopcional

Template to build it with (default: the default one). The template's id, from crm.quotes.config.get (templates[].id); __default is the synthetic 'Estándar' template.

include_page_idsarray<string>queryopcional

Which of the template's attachment pages to include (ids from the template's page_ids); omit it for all of them. A page the template does not have answers quote_page_not_in_template.

localeenumqueryopcional

Language of the document: es (default), en or pt-BR.

Valores: es, en, pt-BR

Resposta

localestring
number_formattedstring
is_preview_numberboolean

true when the deal has no number yet: the one shown is the next one, reserved only by crm.quotes.emit.

issue_datenumber
validity_daysnumber
valid_untilnumber
issuerobject
clientobject | null
line_itemsarray<object>
totalsobject
currencystring
template_idstring
layoutstring
accent_colorstring
pagesarray<object>
footerobject
number_formatenum | null

Valores: auto, dot_comma, comma_dot

decimalsnumber | null
intro_textstring | null
notestring | null

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/deals/{deal_id}/quote" \
  -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/crm/deals/{deal_id}/quote" \
  -H "Authorization: Bearer $MB_TEST_KEY"