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

# Create Contact Import

> Batch import contacts in bulk into your workspace.

Import an array of contacts or a CSV/JSON payload. Contacts will be created or updated automatically via the Mailofly API.

### Body Parameters

**contacts** `array` *required*

List of contact objects to import.

**properties**

**email** `string` *required*

The contact's email address.

**firstName** `string`

First name.

**lastName** `string`

Last name.

**properties** `object`

Custom key-value properties.

**segmentId** `string`

Optional segment ID to automatically add all imported contacts to.

### Response

**data** `object`

**id** `string`

Unique import job ID.

**status** `string`

Status of the import (`processing`, `completed`, `failed`).

**total** `number`

Total records to import.

**imported** `number`

Number of successfully imported contacts.

**failed** `number`

Number of failed records.

```bash cURL theme={null}
curl -X POST https://api.mailofly.com/contact-imports \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      { "email": "user1@example.com", "firstName": "Alice" },
      { "email": "user2@example.com", "firstName": "Bob" }
    ]
  }'
```

```json 201 Created theme={null}
{
  "data": {
    "id": "imp_123",
    "status": "completed",
    "total": 2,
    "imported": 2,
    "failed": 0
  }
}
```


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