Import contacts

Import WhatsApp, Facebook Messenger, Instagram and Telegram contacts to Inbox. Assumes that Opt-in was given outside of system. Triggers no follow-up flows.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
string
required
Body Params

File part

The request part with file is required. It has to be uploaded as file part in form-data. filename parameter must be
specified (request part header example: Content-Disposition: form-data; name="file"; filename="contacts.csv"). File
must have .csv or .txt extension and has to have a valid CSV format with size smaller than 32MB.

Every contact in the file must be in a separate line. The simplest file has just one column with header(messenger_id)
and value for new conversation in every line.

Example:

messenger_id
4eefc52e-d001-481a-8fcf-d683ef82ee9b
daf93c3e-832c-4866-bbd3-e19d14205824

If the contact with the specific messenger_id already exists and the file has more than one column, conversation will
be updated with the values from file.

Columns

column nameformatrequireddescription
messenger_idstringRdefines the new conversation messenger id
signed_updatetime in ISO 9075Odefines the date of contact's opt-in, defaults to now
marketing_opted_indatetime in ISO 9075Odefines the date of contact's marketing opt-in, defaults to null (no marketing)
marketing_opted_outdatetime in ISO 9075Odefines the date of contact's marketing opt-out, defaults to null
labelssemicolon separated stringsOadd labels to newly created conversation
phoneintegerOset phone to newly created conversation
emailstringOset email to newly created conversation
namestringOset name to newly created conversation, if set, system will not use the name provided by messenger
*stringOset attribute with custom key in newly created conversation

Upload context as additional data

As a separate form-data part, the additional payload can be defined in payload part (request part header must
be: Content-Disposition: form-data; name="payload"). It has to contain a string with valid json in format defined
in payload field in scheme section.

If the additional data contains field labels, those labels will be added to every imported contact. It means, that
every contact will have default labels, labels from labels column from file (if provided) and labels from additional
data payload.

If the additional data contains field dry_run set to true, no changes will be applied. The imported file will be
just validated. Use it to check your file before upload.

Note: duplicated labels are ignored, and added just once to the contact.

Examples:

Full file example:

messenger_id,signed_up,marketing_opted_in,marketing_opted_out,labels,phone,email,name,attr1,attr2
4eefc52e-d001-481a-8fcf-d683ef82ee9b,2020-01-01T12:00:00Z,2020-01-01T12:00:00Z,2020-01-01T12:00:00Z,l1;l2,49678678676,[email protected],New Existing 3,a11,a12
daf93c3e-832c-4866-bbd3-e19d14205824,,,,,,,,,
607cf377-b787-403e-8aac-1acdffefc200,2020-01-01T12:00:00Z,2020-01-01T12:00:00Z,2020-01-01T12:00:00Z,l1;l2,49678678677,[email protected],New 1,a21,a22

Payload example:

{
  "labels": [
    "label-1",
    "label-2",
    "label-1"
  ]
}
file

.csv/.txt file with CSV format

payload
object

string with json object in defined scheme

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json