Menú

Referencia de la API · CRM

Exportaciones

crm · exports · 1 operación

POST/v1/crm/exports

Export deals, persons, companies or prospects to a CSV file (background job)

crm.exports.create

EscrituraDesde 2026-11-01

Starts a background job that writes a CSV of the chosen entity with the same filters as its list: deals (pipeline_id, status open/won/lost/all — default all —, owner_id; not both pipeline_id and owner_id), persons and companies (include_archived), prospects (prospect_status active/archived/converted/all). Merged-away duplicates never appear and archived records only when asked; a seller with restricted scope only exports what they see. Up to 50000 rows (max_rows). Returns job_id at once: poll platform.jobs.get (GET /v1/jobs/{job_id}) until status is done, then download result.url (a signed link valid 24 hours; ask again for a fresh one), or subscribe a webhook to job.completed. The columns are the same as the screen's export: deals with readable pipeline, stage, owner, company and contact names, one column per custom field, labels, and the ids at the end; persons, companies and prospects with the CRM's internal field names as column headers (the names crm.persons.get uses inside, before the API turns them into snake_case), the owner by id and by name. Persons and companies also carry every email and phone, the label names, do-not-contact, the unsubscribe and bounce dates (persons) and, after those, one column per custom field (header cf:<slug>, the id crm.imports.create takes; options by their label, members by name); the columns of before keep their place. Deals, persons and companies take headers labels: the header row has readable names in your language (the deal table's for deals), yes/no replaces true/false and the deal status comes in your language (for a spreadsheet, not for a program). Dates in ISO 8601 (UTC). A cell a spreadsheet would run as a formula (starting with =, +, - or @) goes with an apostrophe in front; numbers and phones go as they are. To import the file back, send its rows with mappings to field ids (crm.imports.create). Requires the export_data permission of the CRM (owners, admins, CRM admins and sales managers). The rows read count against the organization's daily quota as the job runs. At most 5 jobs in progress per organization (409 limit_reached, details.resource jobs).

Instrucciones para agentes

Tell the person the export is running and check the job until it is done; then share result.url and say it works for 24 hours.

Alcance
crm:write
Permiso
Ver el módulo · Acción del CRM: export_data
Tool del MCP
crm_exports_createEn la superficie completa; en la compacta, mb_execute_operation con id: "crm.exports.create".
Eventos que puede emitir
job.completed

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

Parámetros

entityenumcuerporequerido

What to export: deals, persons, companies or prospects.

Valores: deals, persons, companies, prospects

pipeline_idstringcuerpoopcional

Deals: only this pipeline's (crm.pipelines.list); not together with owner_id.

statusenumcuerpoopcional

Deals: open, won, lost or all (default).

Valores: open, won, lost, all

owner_idstringcuerpoopcional

Deals: only this owner's (a user_id of crm.team.list); not together with pipeline_id.

prospect_statusenumcuerpoopcional

Prospects: active (new and reviewing, default), archived, converted or all.

Valores: active, archived, converted, all

include_archivedbooleancuerpoopcional

Deals, persons and companies: include the archived ones (default false).

max_rowsintegercuerpoopcional

Most rows to export, up to 50000 (the default).

headersenumcuerpoopcional

Deals, persons and companies: the header row with the internal column names (keys, the default, what a program reads) or with readable names in your language for a spreadsheet (labels; yes/no instead of true/false too, and the deal status in your language).

Valores: keys, labels

Respuesta

job_idstring
status"queued"

Errores

Ejemplo

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

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/exports" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "entity": "deals"
}'