Menú

Referencia de la API · CRM

Archivado en cascada

crm · archive_cascade · 3 operaciones

POST/v1/crm/archive-cascade/preview

Preview an archive with linked records

crm.archive_cascade.preview

LecturaIdempotenteDesde 2026-11-01

Dry run of crm.archive_cascade.execute for a prospect, person, company or deal (root: { type, id }, or entity_type + entity_id as crm.delete_cascade takes them): returns the root, the linked persons and companies that can be archived with it (archivable: no other active deal or prospect uses them) and the ones that must stay (kept, with the reason: shared_active_deals, shared_active_prospects or too_large). Nothing is written. Pass the ids you choose from archivable as also_archive. Requires the archive permission of the root type (archive_prospect, or edit_deal / edit_person / edit_company).

Alcance
crm:read
Permiso
Editar en el módulo
Tool del MCP
crm_archive_cascade_previewEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.archive_cascade.preview".

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

Parámetros

rootobjectcuerpoopcional

The record to archive (the root): { type, id }. Send this or entity_type + entity_id, not both.

entity_typeenumcuerpoopcional

The kind of the root record, as crm.delete_cascade takes it (with entity_id).

Valores: prospect, person, company, deal

entity_idstringcuerpoopcional

The root record, by id (with entity_type).

Respuesta

rootobject
archivablearray<object>
keptarray<object>

Errores

Ejemplo

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

Archive a record with chosen linked records

crm.archive_cascade.execute

EscrituraDesde 2026-11-01

Archives a prospect, person, company or deal (root: { type, id }, or entity_type + entity_id) and, optionally, the linked persons and companies listed in also_archive. The plan is rebuilt right before writing: anything not archivable at that moment (not linked to the root, or used by another active deal or prospect) is skipped and counted in skipped. Archiving is a state, not the trash: archived records leave lists, forecasts and reports and come back by unarchiving; nothing is deleted. reason is saved only on a prospect root. It does not emit webhook events. Requires the archive permission of the root type (archive_prospect, or edit_deal / edit_person / edit_company).

Alcance
crm:write
Permiso
Editar en el módulo
Tool del MCP
crm_archive_cascade_executeEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.archive_cascade.execute".

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

Parámetros

rootobjectcuerpoopcional

The record to archive (the root): { type, id }. Send this or entity_type + entity_id, not both.

entity_typeenumcuerpoopcional

The kind of the root record, as crm.delete_cascade takes it (with entity_id).

Valores: prospect, person, company, deal

entity_idstringcuerpoopcional

The root record, by id (with entity_type).

also_archivearray<object>cuerpoopcional

The linked persons and companies to archive too, chosen from archivable of crm.archive_cascade.preview (up to 500).

Por defecto: []

reasonstringcuerpoopcional

Why: saved only when the root is a prospect.

Respuesta

archivednumber
skippednumber

Errores

Ejemplo

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

Archive many records with their linked records

crm.archive_cascade.bulk

EscrituraMasiva · hasta 500Desde 2026-11-01

Archives up to 500 roots of one type (prospects, persons, companies or deals: root_type + root_ids, or entity_type + entity_ids) and, with also_archive_persons / also_archive_companies, the persons and companies linked to them that no active record outside the batch uses (computed on the server; linked ids are never sent). A Manager archives any root; a seller only their own and the unassigned ones (one foreign id rejects the whole batch); ids that do not exist are skipped. Archiving is a state, not the trash. It does not emit webhook events. Bulk: outside the screen it requires a dry run (which returns the counts) and a confirm_token.

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
Permiso
Editar en el módulo
Tool del MCP
crm_archive_cascade_bulkEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.archive_cascade.bulk".

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

Parámetros

root_typeenumcuerpoopcional

The kind of the root records (with root_ids). Send root_type + root_ids, or entity_type + entity_ids.

Valores: prospect, person, company, deal

root_idsarray<string>cuerpoopcional

The root records, by id.

entity_typeenumcuerpoopcional

The same as root_type, by the name crm.delete_cascade uses.

Valores: prospect, person, company, deal

entity_idsarray<string>cuerpoopcional

The same as root_ids, by the name crm.delete_cascade uses.

also_archive_personsbooleancuerpoopcional

Also archive the linked persons that no active record outside the batch uses.

Por defecto: false

also_archive_companiesbooleancuerpoopcional

Also archive the linked companies that no active record outside the batch uses.

Por defecto: false

reasonstringcuerpoopcional

Why: saved only on prospect roots.

Respuesta

archivednumber
skippednumber

Errores

Ejemplo

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