ChatofyDevelopers
REST APIMCP Server (AI)New
API KeysWebhooks
Chatofy API
/
Getting Started
API Resources
API v1.0 Live
Developer APIContactsCommit CSV Import

Commit CSV Import

Executes CSV import commit, records batch history in crm_import_batches, optionally creates sales deals, and provides downloadable error report.

POST/api/v1/contacts/import/commit

Request Body Schema

application/json
filenamestringrequired

Original filename

Example:leads_october.csv
rowsarray<object>required

CSV rows

mappingobjectrequired

Header mapping dictionary

optionsobjectoptional

Import options (create_deals, deal_stage_id, prefer_incoming)

Response Payload

200 OKapplication/json
statusstring

"1" = Success, "0" = Failure.

messageobject

The response data payload.

Code Snippets & Examples

1curl -X POST "https://app.chatofy.in/api/v1/contacts/import/commit" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"filename":"leads.csv","rows":[{"Mobile":"+919876543210"}],"mapping":{"phone_number":"Mobile"}}'

Was this endpoint guide helpful?

Previous Endpoint
CSV Import Pre-flight Preview
Next Endpoint
Get Contact Activity Timeline
© 2026 Chatofy Cloud Platform. All rights reserved.
1curl -X POST "https://app.chatofy.in/api/v1/contacts/import/commit" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"filename":"leads.csv","rows":[{"Mobile":"+919876543210"}],"mapping":{"phone_number":"Mobile"}}'
200 OKapplication/json
1{
2 "success": true,
3 "data": {
4 "batch_id": "b1111111-2222-3333-4444-555555555555",
5 "total_rows": 1,
6 "created_count": 1,
7 "updated_count": 0,
8 "duplicate_count": 0,
9 "error_count": 0,
10 "errors_download_url": "/api/v1/contacts/import/batches/b1111111-2222-3333-4444-555555555555/errors"
11 },
12 "message": "CSV import committed successfully"
13}