Menu

Referência da API · CRM

Exportações

crm · exports · 1 operação

POST/v1/crm/exports

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

crm.exports.create

EscritaDesde 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).

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_operation com id: "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

entityenumcorpoobrigatório

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

Valores: deals, persons, companies, prospects

pipeline_idstringcorpoopcional

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

statusenumcorpoopcional

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

Valores: open, won, lost, all

owner_idstringcorpoopcional

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

prospect_statusenumcorpoopcional

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

Valores: active, archived, converted, all

include_archivedbooleancorpoopcional

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

max_rowsintegercorpoopcional

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

headersenumcorpoopcional

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

Resposta

job_idstring
status"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"
}'