> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/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.

### Body Parameters

<ParamField body="contacts" type="array" required>
  List of contact objects to import.

  <Expandable title="properties">
    <ParamField body="email" type="string" required>
      The contact's email address.
    </ParamField>

    <ParamField body="firstName" type="string">
      First name.
    </ParamField>

    <ParamField body="lastName" type="string">
      Last name.
    </ParamField>

    <ParamField body="properties" type="object">
      Custom key-value properties.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="segmentId" type="string">
  Optional segment ID to automatically add all imported contacts to.
</ParamField>

### Response

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">Unique import job ID.</ResponseField>
  <ResponseField name="status" type="string">Status of the import (`processing`, `completed`, `failed`).</ResponseField>
  <ResponseField name="total" type="number">Total records to import.</ResponseField>
  <ResponseField name="imported" type="number">Number of successfully imported contacts.</ResponseField>
  <ResponseField name="failed" type="number">Number of failed records.</ResponseField>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.mailofly.com/api/v1/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" }
      ]
    }'
  ```
</RequestExample>

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


## Related topics

- [List Contact Imports](/api/contact-imports/list-contact-imports.md)
- [Retrieve Contact Import](/api/contact-imports/retrieve-contact-import.md)
- [Create Contact](/api/contacts/create-contact.md)
- [Create Contact Property](/api/contact-properties/create-contact-property.md)
- [MCP Tools Reference](/mcp-server/tools.md)
