Export deals, persons, companies or prospects to a CSV file (background job)
crm.exports.create
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).
Instruções 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.
- Escopo
crm:write- Permissão
- Ver o módulo · Ação do CRM:
export_data - Tool do MCP
crm_exports_createNa superfície completa; na compacta,mb_execute_operationcomid: "crm.exports.create".- Eventos que pode emitir
- job.completed
Custo declarado: até 21 leituras e 2 escritas por chamada (contam na cota diária).
Parâmetros
entityenumcorpoWhat to export: deals, persons, companies or prospects.
Valores: deals, persons, companies, prospects
pipeline_idstringcorpoopcionalDeals: only this pipeline's (crm.pipelines.list); not together with owner_id.
statusenumcorpoopcionalDeals: open, won, lost or all (default).
Valores: open, won, lost, all
owner_idstringcorpoopcionalDeals: only this owner's (a user_id of crm.team.list); not together with pipeline_id.
prospect_statusenumcorpoopcionalProspects: active (new and reviewing, default), archived, converted or all.
Valores: active, archived, converted, all
include_archivedbooleancorpoopcionalDeals, persons and companies: include the archived ones (default false).
max_rowsintegercorpoopcionalMost rows to export, up to 50000 (the default).
headersenumcorpoopcionalDeals, 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
Resposta
job_idstringstatus"queued"Erros
Exemplo
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"
}'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/exports" \
-H "Authorization: Bearer $MB_TEST_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"entity": "deals"
}'