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).
Instructions for agents
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.
- Scope
crm:write- Permission
- View the module · CRM action:
export_data - MCP tool
crm_exports_createOn the full surface; on the compact one,mb_execute_operationwithid: "crm.exports.create".- Events it can emit
- job.completed
Declared cost: up to 21 reads and 2 writes per call (they count against the daily quota).
Parameters
entityenumbodyWhat to export: deals, persons, companies or prospects.
Values: deals, persons, companies, prospects
pipeline_idstringbodyoptionalDeals: only this pipeline's (crm.pipelines.list); not together with owner_id.
statusenumbodyoptionalDeals: open, won, lost or all (default).
Values: open, won, lost, all
owner_idstringbodyoptionalDeals: only this owner's (a user_id of crm.team.list); not together with pipeline_id.
prospect_statusenumbodyoptionalProspects: active (new and reviewing, default), archived, converted or all.
Values: active, archived, converted, all
include_archivedbooleanbodyoptionalDeals, persons and companies: include the archived ones (default false).
max_rowsintegerbodyoptionalMost rows to export, up to 50000 (the default).
headersenumbodyoptionalDeals, 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).
Values: keys, labels
Response
job_idstringstatus"queued"Errors
Example
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"
}'Try it with your test API key
With a test API key the request always goes to your practice organization: example data you can reset.
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"
}'