Menú

Referencia de la API · Organización

Papelera

organizations · trash · 3 operaciones

GET/v1/trash

List items in the trash

platform.trash.list

LecturaIdempotenteDesde 2026-11-01

Lists what was deleted in the last 30 days and can still be restored, from any module (CRM deals, persons, companies, prospects, activities, pipelines, custom fields; tasks, projects, forms, campaigns and every entity whose delete keeps a copy), newest first. Use it to find something deleted by mistake before restoring it with platform.trash.restore. Only owners and admins can see the trash. Expired and already-restored items are not listed. Filter by module (the module that owns the record: crm, task_management, web_forms…) and/or by entity_type to narrow it. A record that lives under another one (a comment, a keyword, a campaign row of a plan, a reply) says whether that parent is still there: parent_trash_item_id when it is in the trash too (restore that one first), restorable: false with not_restorable_reason parent_gone when it is gone for good. Module: Organization (organizations), even though the id starts with platform.; any valid credential can read it. With Google Ads, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted, and their records are left out of the response (the permissions guide lists what each platform allows).

Alcance
organizations:read
Permiso
Ver el módulo · Solo owner, admin
Tool del MCP
platform_trash_listEn la superficie completa; en la compacta, mb_execute_operation con id: "platform.trash.list".

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

Parámetros

modulestringqueryopcional

Module to filter by (crm, task_management, web_forms, …): the module values the list itself returns.

entity_typestringqueryopcional

Entity type to filter by (deal, person, task, report_template, …): the entity_type values the list itself returns.

limitintegerqueryopcional

How many items this page brings at most.

Por defecto: 50

cursorstringqueryopcional

The next_cursor of the previous page, exactly as it came; without it, the first page.

Respuesta

dataarray<object>
has_moreboolean

True when more items follow: ask again with next_cursor.

next_cursorstring

Pass it as cursor to get the next page.

Errores

Ejemplo

curl "https://api.mb-suite.com/v1/trash" \
  -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/trash" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/trash/{item_id}/restore

Restore an item from the trash

platform.trash.restore

EscrituraDesde 2026-11-01

Restores a deleted record from the trash to the place it was deleted from, together with anything a cascade deleted with it. Name it by item_id (the trash_item_id its deletion returned, or the id of platform.trash.list; in REST it goes in the path) or, through the MCP, by entity_type + entity_id (what it was and the id it had: its newest copy in the trash). If the original id is already taken by a newer record, the item is restored with a new id (restored_as_new_id). A person is re-linked to the deals and lists they were removed from, and a label goes back on the records that had it: relinked counts them. When the copy could not keep everything (linked_truncated in platform.trash.list), only part of it comes back and the response says linked_truncated: true. Fails if the item expired, was already restored, or is not restorable (trash_item_not_restorable, details.reason: merged or reference_only), and with 409 before writing anything when bringing it back would clash with what exists now (trash_restore_parent_missing when what it belonged to is gone: details.parent_trash_item_id names the trash item to restore first, and details.parent_restorable: false means it cannot come back, so neither can this one; lead_source_exists when the WhatsApp line of a lead source already has another active source). If the record came back but something after it failed (a linked record or a module side effect), the response says partial: true with how many linked records came back; the item is not reopened and the failure is reported to MB Suite. Owners and admins only; the caller (and the credential) also needs write access to the module the record belongs to. Module: Organization (organizations), even though the id starts with platform.; the credential needs the write scope of the module that owns the record (for example crm:write for a deal). With Google Ads, Google Business Profile, LinkedIn, TikTok or YouTube, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Instrucciones para agentes

After restoring, tell the person the name of what came back and whether it got a new id. Do not try to restore the same item twice.

Alcance
organizations:write
Permiso
Editar en el módulo · Solo owner, admin
Tool del MCP
platform_trash_restoreEn la superficie completa; en la compacta, mb_execute_operation con id: "platform.trash.restore".

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

Parámetros

item_idstringrutarequerido

The trash item id: the trash_item_id a deletion returns, or the id platform.trash.list returns. Or send entity_type and entity_id instead.

entity_typestringcuerpoopcional

Instead of item_id, with entity_id: what was deleted (deal, person, task…, the entity_type of platform.trash.list). Restores the newest copy of that record.

entity_idstringcuerpoopcional

Instead of item_id, with entity_type: the id the record had before it was deleted.

Respuesta

item_idstring

The trash item that was restored.

entity_typestring

What came back (deal, person, task…).

restored_idstring

The id it has now: the original one, or a new one when a newer record had taken it.

restored_as_new_idboolean

True when it came back with a new id.

namestring

Its name.

linked_restorednumber

How many records came back with it or got it back: the linked records its deletion took with it, plus the ones counted in relinked.

relinkednumber

How many records that kept existing got it back: for a person, the deals and static lists it was put back in; for a label or a tag, the records that had it (deals, contacts, tasks, articles, credentials, members…); for a management role, the members who had it. Also counted in linked_restored.

partialboolean

True when the record came back but a linked record or a module side effect failed (reported to MB Suite).

linked_truncatedboolean

Only when true: the trash copy did not keep everything the deletion took or took off (the linked_truncated of platform.trash.list), so only part of it came back.

Errores

Ejemplo

curl -X POST "https://api.mb-suite.com/v1/trash/{item_id}/restore" \
  -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/trash/{item_id}/restore" \
  -H "Authorization: Bearer $MB_TEST_KEY"
DELETE/v1/trash/{item_id}

Permanently remove an item from the trash

platform.trash.purge

IrreversibleDesde 2026-11-01

Deletes the trash copy for good, before the 30-day window ends, together with what the delete had kept aside for the restore (the items and views of a project, the comments of a task, the stored file of a Media Library item, the knowledge files of an AI agent). Use it only for a legal or privacy request (the data must not be recoverable). Irreversible: there is no copy after this. Owners only; the caller and the credential also need write access to the module the record belongs to, and the credential must allow deletion. Outside the screen it requires a dry run and a confirm_token. Module: Organization (organizations), even though the id starts with platform.; the credential needs the write scope of the module that owns the record (for example crm:write for a deal) and permission to delete.

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
organizations:write y «Permitir eliminar» (organizations:delete en OAuth)
Permiso
Editar en el módulo · Solo owner
Tool del MCP
platform_trash_purgeEn la superficie completa; en la compacta, mb_execute_operation con id: "platform.trash.purge".

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

Parámetros

item_idstringrutarequerido

The trash item id, as platform.trash.list returns it (id).

Respuesta

item_idstring

The trash item that was removed for good.

Errores

Ejemplo

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