Contacts

Import contacts

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Contacts/importContacts" target="_blank">Try in sandbox</a><br>Import contacts from the CSV, XLS or XLSX file.

post/api/v2/contacts/import/normalized

Request

Query parameters

columnstring required

Import file column mapping. The string must contain sub-strings of mapping in format columnNumber:field glued by ;. For example: 0:firstName;1:lastName;3:phone;4:email where the value before : is a number of the column in the file, and the value after : is a field of the newly created contact or the ID of a custom field. Numbers of columns begin from zero. Allowed built-in contact fields are: firstName, lastName, phone, email. Existing of phone mapping is required.

listIdinteger

List that ID contacts will be imported to. Ignored if listName is specified.

listNamestring

List name. This list will be created during import. If such name is already taken, an ordinal (1, 2, ...) will be added to the end. Ignored if listId is specified.

Request body multipart/form-data

filestring binary required

File containing contacts in csv or xls(x) formats.

Response

Returned when successful.

idinteger required

Resource ID.

hrefstring required

A link to this resource. If you want to fetch it, just GET this address.

Example response

{
  "id": 515,
  "href": "/api/v2/entity_name/1"
}

Changes

No recorded changes to this operation across all 4 revisions of this API.