Menú

Referencia de la API · CRM

Plantillas de importación

crm · import_templates · 4 operaciones

GET/v1/crm/import-templates

List saved import templates

crm.import_templates.list

LecturaIdempotenteDesde 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.

Alcance
crm:read
Permiso
Ver el módulo
Tool del MCP
crm_import_templates_listEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.import_templates.list".

Costo declarado: hasta 51 lecturas y 0 escrituras por llamada (cuentan en el cupo diario).

Parámetros

limitintegerqueryopcional

How many items this page brings at most (see the maximum and the default in the schema).

Por defecto: 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.

Respuesta

dataarray<object>
has_moreboolean
next_cursorstring

Errores

Ejemplo

curl "https://api.mb-suite.com/v1/crm/import-templates" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes 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

EscrituraDesde 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.

Alcance
crm:write
Permiso
Editar en el módulo · Acción del CRM: import_data
Tool del MCP
crm_import_templates_createEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.import_templates.create".

Costo declarado: hasta 0 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

namestringcuerporequerido

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

destinationenumcuerporequerido

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

Valores: deal, prospect, person, company

field_mappingobjectcuerporequerido

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_idstringcuerpoopcional

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

default_currencystringcuerpoopcional

ISO 4217 code of values without a currency column.

dedup_strategyenumcuerpoopcional

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

behaviorobjectcuerpoopcional

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

Respuesta

template_idstring

Errores

Ejemplo

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": {}
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes 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

EscrituraIdempotenteDesde 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.

Alcance
crm:write
Permiso
Editar en el módulo · Acción del CRM: import_data
Tool del MCP
crm_import_templates_updateEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.import_templates.update".

Costo declarado: hasta 1 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

template_idstringrutarequerido

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

namestringcuerpoopcional

Name shown in the import wizard.

destinationenumcuerpoopcional

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

Valores: deal, prospect, person, company

default_pipeline_idstring | nullcuerpoopcional

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

default_currencystring | nullcuerpoopcional

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

dedup_strategyenumcuerpoopcional

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

behaviorobjectcuerpoopcional

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

field_mappingobjectcuerpoopcional

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.

Respuesta

template_idstring

Errores

Ejemplo

curl -X PATCH "https://api.mb-suite.com/v1/crm/import-templates/{template_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes 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

IrreversibleDesde 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.

Pide confirmación: primero dry_run: true (vista previa y confirm_token, que vale 10 minutos y una sola vez), después el mismo cuerpo con confirm_token. En unas pocas, solo con ciertos datos: la descripción dice cuándo. Por qué y cómo: Vista previa y confirmación.

Alcance
crm:write y «Permitir eliminar» (crm:delete en OAuth)
Permiso
Editar en el módulo · Acción del CRM: import_data
Tool del MCP
crm_import_templates_deleteEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.import_templates.delete".

Costo declarado: hasta 1 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

template_idstringrutarequerido

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

Respuesta

template_idstring
oktrue

Errores

Ejemplo

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
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes 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
}'