Skip to main content
POST
Import contacts from file

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
fileId
string
required

Id (numeric string) of a previously uploaded CSV/XLSX file to import.

Pattern: ^\d+$
channel
enum<string>
required

Channel to attach imported contacts to.

Available options:
omnichannel,
webchat,
messenger,
whatsapp,
zalo,
smtp,
telegram,
instagram,
threads,
tiktok,
api
inboxId
string
required

Inbox id (numeric string) to import contacts into. Get it from inboxes.list.

Pattern: ^\d+$
timezone
string

IANA timezone applied to imported contacts, e.g. America/New_York.

Required string length: 1 - 255
countryCode
string

Default country code used to normalize imported phone numbers.

Pattern: ^\+\d{1,4}$
phoneNumber
string

Column name in the file that holds the contact's phone number.

Maximum string length: 255
contactId
string

Column name in the file that holds a channel-specific user id.

Maximum string length: 255
sourceUserId
string

Column name in the file that holds the WhatsApp Business-Scoped User ID. Only used for whatsapp imports.

Maximum string length: 255
email
string

Column name in the file that holds the contact's email.

Maximum string length: 255
firstName
string

Column name in the file that holds the contact's first name.

Maximum string length: 255
lastName
string

Column name in the file that holds the contact's last name.

Maximum string length: 255
tagId
string

Tag id (numeric string) to apply to every imported contact.

Pattern: ^\d+$
fieldMapping
object[]

Column-to-custom-field mappings, up to 10.

Maximum array length: 10

Response

OK

importId
string
required

Id of the background import job. The import runs asynchronously; imported contacts appear in contacts.list once it finishes.