Menu

Referência da API · CRM

Modelos de importação

crm · import_templates · 4 operações

GET/v1/crm/import-templates

List saved import templates

crm.import_templates.list

LeituraIdempotenteDesde 2026-11-01

Lists the saved import templates of the organization (most recently updated first, paginated by cursor): name, destination (person, company, prospect, deal), the column → field mapping, the duplicates handling (behavior.deduplication, also in dedup_strategy), the cascade behavior and the default pipeline and currency. Use one with crm.imports.create (template_id) to import rows keyed by the same column names as the file the template was made for.

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

Custo declarado: até 51 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.

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

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

Save an import template

crm.import_templates.create

EscritaDesde 2026-11-01

Saves an import template: a name, the destination (person, company, prospect, deal), the column → field mapping (field_mapping: {"Email": "person.email", …}), the cascade and duplicates behavior (behavior; dedup_strategy is the same as behavior.deduplication, kept for older clients: send one of the two) and an optional default pipeline and currency. Requires the import_data permission of the CRM.

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

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

Parâmetros

namestringcorpoobrigatório

Name shown in the import wizard, up to 120 characters.

destinationenumcorpoobrigatório

What the rows become: person, company, prospect or deal.

Valores: deal, prospect, person, company

field_mappingobjectcorpoobrigatório

Column of the file → field (person.email, person.first_name, company.name, deal.title, cf:<custom field slug>…), up to 100; the column names are kept as written.

default_pipeline_idstringcorpoopcional

Deals: the pipeline of rows without one (crm.pipelines.list).

default_currencystringcorpoopcional

ISO 4217 code of values without a currency column.

dedup_strategyenumcorpoopcional

Kept for older clients: the same as behavior.deduplication, which is what the import uses. Send one of the two; both must agree (import_template_dedup_mismatch).

Valores: merge, create_activity, notify, skip

behaviorobjectcorpoopcional

Companies, unmatched persons and duplicates (crm.imports.create explains each); without it, the destination's defaults.

Resposta

template_idstring

Erros

Exemplo

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

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/import-templates" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "destination": "deal",
  "field_mapping": {}
}'
PATCH/v1/crm/import-templates/{template_id}

Edit an import template

crm.import_templates.update

EscritaIdempotenteDesde 2026-11-01

Changes the name, destination, mapping (field_mapping replaces the whole mapping), duplicates strategy, behavior, default pipeline or default currency of a saved import template; only what you send changes, and null clears the default pipeline or currency. Imports already done do not change. Requires the import_data permission of the CRM.

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

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

Parâmetros

template_idstringrotaobrigatório

The template's id, from crm.import_templates.list.

namestringcorpoopcional

Name shown in the import wizard.

destinationenumcorpoopcional

What the rows become: person, company, prospect or deal.

Valores: deal, prospect, person, company

default_pipeline_idstring | nullcorpoopcional

Deals: the pipeline of rows without one; null clears it.

default_currencystring | nullcorpoopcional

ISO 4217 code of values without a currency column; null clears it.

dedup_strategyenumcorpoopcional

Kept for older clients: the same as behavior.deduplication, which is what the import uses. Send one of the two; both must agree (import_template_dedup_mismatch).

Valores: merge, create_activity, notify, skip

behaviorobjectcorpoopcional

Companies, unmatched persons and duplicates; replaces the saved one.

field_mappingobjectcorpoopcional

Column of the file → field (person.email, person.first_name, company.name, deal.title, cf:<custom field slug>…), up to 100; the column names are kept as written.

Resposta

template_idstring

Erros

Exemplo

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

Delete an import template

crm.import_templates.delete

IrreversívelDesde 2026-11-01

Deletes a saved import template (the column mapping); imports already done do not change. A template is a saved setting, not a customer record: it does not go to the trash and cannot be undone, so outside the screen it requires a dry run and a confirm_token. Requires the import_data permission of the CRM.

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: import_data
Tool do MCP
crm_import_templates_deleteNa superfície completa; na compacta, mb_execute_operation com id: "crm.import_templates.delete".

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

Parâmetros

template_idstringrotaobrigatório

The template's id, from crm.import_templates.list.

Resposta

template_idstring
oktrue

Erros

Exemplo

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