> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# POST Import Contacts

> Import contacts from CSV or Excel files.

## Import Contacts

`POST /api/contacts/import`

Import contacts in bulk via CSV or Excel file upload. This endpoint accepts `multipart/form-data` with a file upload.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/contacts/import \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -F "file=@contacts.csv" \
  -F "tags=imported,2026"
```

### Form fields

**file** `string` *required*

CSV or Excel (.xlsx) file.

**groupId** `integer`

Add imported contacts to this group.

**tags** `string`

Comma-separated tags to apply.

### Expected CSV columns

The CSV file should contain these columns (headers required):

| Column | Required | Example |
| - | - | - |
| `name` | No | John Doe |
| `phone` | Yes | 919876543210 |
| `email` | No | [john@example.com](mailto:john@example.com) |

### Example CSV

```csv theme={null}
name,phone,email
John Doe,919876543210,john@example.com
Jane Smith,919876543211,jane@example.com
Bob Wilson,919876543212,bob@example.com
```

```json Response theme={null}
{
  "success": true,
  "message": "Import completed",
  "data": {
    "total": 100,
    "imported": 95,
    "skipped": 3,
    "errors": 2,
    "errorDetails": [
      { "row": 15, "phone": "invalid", "error": "Invalid phone number format" },
      { "row": 42, "phone": "", "error": "Phone number is required" }
    ]
  }
}
```

> [!NOTE]
>
> Requires `contacts:create` permission and an active subscription. Maximum file size is 10MB.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.