---
title: "Create Contact Import"
method: POST
path: "/v1/contacts/imports"
tags: ["Contacts"]
---

# Create Contact Import

`POST /v1/contacts/imports`

## Request

- Base URL: `https://api.migma.ai`
- URL: `https://api.migma.ai/v1/contacts/imports`
- Auth: API key in header `Authorization`

Import contacts from a CSV, sent either as an uploaded file (multipart) or as CSV text in a JSON body (`csvContent`). The CSV is stored and processed in the background; poll `GET /v1/contacts/imports/{id}` for status and counts. Requires API key with audience:write.

## Request body

- CreateContactImportJsonRequest
  - `csvContent` string, required: Full CSV text including the header row. Same 200MB limit as a file.
  - `fileName` string: Name shown for the import.
  - `projectId` string, required: Project ID
  - `columnMap` object, required: Maps subscriber fields to CSV header names. Only `email` is required. Supported keys: `email`, `firstName`, `lastName`, `name`, `phone`, `country`, `language`, and `customFields` (an object mapping each custom field key to its CSV header).
  - `onConflict` 'skip' | 'upsert': How to handle rows whose email already exists.
  - `delimiter` string: CSV field delimiter.
  - `tags` string[]: Tag names or existing tag IDs to apply to every imported contact. Unknown names create tags.

## Response `200`

Import accepted for background processing

- ApiResponseContactImport
  - `success` boolean, required
  - `data` object, nullable
    - `object` string
    - `id` string: Import job ID. Poll GET /v1/contacts/imports/{id} for status.
    - `status` string
  - `error` string, nullable

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden - Missing required permissions or access denied

## Changes

- **2026-10-24** `2ce0e1e4d856`: 1 info
  - added the media type `application/json` to the request body

[Operation history](https://skmtc.dev/migma/apis/migma-ai-api-v1/changes/v1/contacts/imports/post.md)

---

[API](https://skmtc.dev/migma/apis/migma-ai-api-v1.md) - [All operations](https://skmtc.dev/migma/apis/migma-ai-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/migma/apis/migma-ai-api-v1/revisions/2ce0e1e4d856?raw)
