Skip to main content

Upload and parse a contact list file

POST 

/api/partner-gateway/v1/contacts/upload

Uploads a tabular file and imports its rows as contacts into your account. Supported file formats include CSV (.csv), Microsoft Excel (.xls, .xlsx), and other delimited text files. The file format is detected from the fileName extension. The file must be sent as multipart/form-data with the file in the 'file' field and the original filename in the 'fileName' field. Set removeHead=true if the first row of the file contains column headers that should not be imported as a contact record. The limit parameter controls how many parsed rows are returned in the response preview (defaults to 10) but does not limit the actual number of contacts imported. The import runs in CREATE_UPDATE mode: new contacts are created, and existing contacts (matched by phone number) are updated with the new data. If a listId is provided, all successfully imported contacts are automatically added to that contact list. Column mapping is performed automatically based on recognized header names (e.g., firstName, lastName, phoneNumber, email). Returns 400 if the file type is not supported, the file is corrupted, or the file cannot be parsed. Returns 500 if an unexpected server error occurs during import processing.

Request

Responses

File parsed successfully