---
title: "Import contacts"
method: POST
path: "/contacts/import"
tags: ["Contacts"]
---

# Import contacts

`POST /contacts/import`

It returns the background process ID which on completion calls the notify URL that you have set in the input.

**Note**:
- Any contact attribute that doesn't exist in your account will be ignored at import end.

## Request body

- RequestContactImport
  - `fileUrl` string, url — Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json
  - `fileBody` string — Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files.
  - `jsonBody` RequestContactImportJsonBody[] — **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files.
    - `email` string
    - `attributes` object — List of attributes to be imported
  - `listIds` integer[] — Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7].
  - `notifyUrl` string, url — URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
  - `newList` RequestContactImportNewList — To create a new list and import the contacts into it, pass the listName and an optional folderId.
    - `listName` string — List with listName will be created first and users will be imported in it (Mandatory if listIds is empty).
    - `folderId` integer — Id of the folder where this new list shall be created (Mandatory if listName is not empty).
  - `emailBlacklist` boolean — To blacklist all the contacts for email
  - `disableNotification` boolean — To disable email notification
  - `smsBlacklist` boolean — To blacklist all the contacts for sms
  - `updateExistingContacts` boolean — To facilitate the choice to update the existing contacts
  - `emptyContactsAttributes` boolean — To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true )

## Response `202`

Contact import request has been accepted

- CreatedProcessId
  - `processId` integer, required — Id of the process created

## Other responses

- `400` — bad request

---

[API](https://skmtc.net/getbrevo/apis/brevo-api.md) · [All operations](https://skmtc.net/getbrevo/apis/brevo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbrevo/brevo-api/versions/2aec3cf66501/schema)
