ChatofyDevelopers
REST APIMCP Server (AI)New
API KeysWebhooks
Chatofy API
/
Getting Started
API Resources
API v1.0 Live
Developer APIContactsCSV Import Pre-flight Preview

CSV Import Pre-flight Preview

Pre-flight dry-run validation for CSV imports reporting new, updated, duplicate, and invalid rows before commitment.

POST/api/v1/contacts/import/preview

Request Body Schema

application/json
rowsarray<object>required

Raw rows parsed from CSV

mappingobjectrequired

Field mapping dictionary (target field -> CSV header)

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/preview" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"rows":[{"Mobile":"+919876543210","Name":"Aarav"}],"mapping":{"phone_number":"Mobile","first_name":"Name"}}'

Was this endpoint guide helpful?

Previous Endpoint
Merge Duplicate Contacts
Next Endpoint
Commit CSV Import
© 2026 Chatofy Cloud Platform. All rights reserved.
1curl -X POST "https://app.chatofy.in/api/v1/contacts/import/preview" \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"rows":[{"Mobile":"+919876543210","Name":"Aarav"}],"mapping":{"phone_number":"Mobile","first_name":"Name"}}'
200 OKapplication/json
1{
2 "success": true,
3 "data": {
4 "summary": {
5 "total": 1,
6 "new_count": 1,
7 "updated_count": 0,
8 "duplicate_count": 0,
9 "invalid_count": 0
10 },
11 "sample_rows": [
12 {
13 "row_number": 1,
14 "status": "new",
15 "phone": "919876543210",
16 "mapped_data": {
17 "phone_number": "+919876543210",
18 "first_name": "Aarav"
19 }
20 }
21 ]
22 },
23 "message": "CSV import dry-run preview generated successfully"
24}