This function can be used to import subscribers with CSV files.


apiKeystringAPI key previously generated.
fileContentstringThe content of the CSV file that you want to import, encoded with base64.
groupsarrayThe ids of the groups for this import.
fieldsarrayOptional parameter to specify the mapping between the fields in the file and the fields in Mailrelay. If not specified, the first field is the email and the second the name of the subscriber.
delimiterstringOptional parameter to specify the delimiter char for the fields in the file. Example: "," for CSV files.
enclosurestringOptional parameter to specify the enclosure char for the fields in the file. Example: " for CSV files.
@param string $escape Optional parameter to specify the escape chart for the fields in the file. Example: "" for CSV files.
headersbooleanSet to true if your CSV file contains headers at the first line. They will be ignored in this case.
existingEmailsbooleanWhat should we do with existing emails? Use "skip" to ignore these emails or "replace" to add the existing emails to the groups that you specified. If not specified the value is "replace".
notificationUrlstringOptional parameter to set a notification URL. This url will be called after the import is finsihed. The POST request will contain a single parameter called "id" with the ID of the import.


Returned data

Type: integer

Description: The ID of the import that was created. You may check the progress and status of the import by calling getImportData function.


Json sample code

Json sample code is not available.


Result of API call

API call result sample code is not available.