---
title: "Add/update contacts from external file"
method: POST
path: "/api/v1/contacts/upload"
tags: ["Contacts"]
---

# Add/update contacts from external file

`POST /api/v1/contacts/upload`

The method is used to import or update the contacts from an external file. The method creates new contacts and updates existing ones.

## Request body

- FileContactsBulkUpdate
  - `dedupeOn` 'email' | 'sms' | 'email_or_sms' | 'id', required — The property for determining the contact uniqueness.
  - `link` string, required — The link to a file in an external repository.</br> <b>File Requirements:</b><br/> Not empty<br/> Delimiters - ","<br/> Maximum size 100 MB <br/> <b>Requirement for column naming:</b><br/> First name. The following rules apply to character usage:<br/> - Max length: 40 symbols. <br>- Letters from any alphabet are allowed (Unicode characters). <br>- Three words longer than 3 characters and three words with a maximum of 3 characters are allowed. <br>- Up to 3 digits are allowed. <br>- Special characters are not allowed, except for: <br>-- Apostrophes ''ʼ`´ʹʻʽʾʿˈˊˮʹ΄՚᾽᾿'‛′‵Ꞌꞌ＇ (only inside words) <br>-- Hyphen - (only inside words) <br>-- One dot at the end of words having max 3 characters. Example: Jr. <br>- Names consisting only of numbers and special characters are not allowed <br> Last name. The following rules apply to character usage:<br/> - Max length: 40 symbols. <br>- Letters from any alphabet are allowed (Unicode characters). <br>- Three words longer than 3 characters and three words with a maximum of 3 characters are allowed. <br>- Up to 3 digits are allowed. <br>- Special characters are not allowed, except for: <br>-- Apostrophes ''ʼ`´ʹʻʽʾʿˈˊˮʹ΄՚᾽᾿'‛′‵Ꞌꞌ＇ (only inside words) <br>-- Hyphen - (only inside words) <br>-- One dot at the end of words having max 3 characters. Example: Jr. <br>- Names consisting only of numbers and special characters are not allowed <br> Address<br/> Country<br/> Region<br/> City<br/> Postcode<br/> Email<br/> SMS<br/> Language code<br/> Timezone<br/> Contact ID<br/> Additional info<br/> The columns containing additional contact fields in a file shall be named: KEY_PROFILE.KEY_CUSTOMFIELD<br/> The fields that are not found in the system remain empty (not updated).
  - `groupNames` string[] — The list of segment names where new/updated contacts will be added to.
  - `groupNamesExclude` string[] — The list of segment names where new/updated contacts will be excluded from.
  - `restoreDeleted` boolean — Add previously deleted contacts.
  - `eventKeyForNewContacts` string — Event type identification key. An event of corresponding type is generated for each contact. <br> If the system does not have an event type with such a key, a new event type is created. <br> All characters are allowed, except < ; ’ \ / | " ` ' ^ ? ! , > <br> Max length: 100 symbols

## Response `200`

---

[API](https://skmtc.net/esputnik/apis/esputnik-com.md) · [All operations](https://skmtc.net/esputnik/apis/esputnik-com/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esputnik/esputnik-com/versions/1c4afd7ba72a/schema)
