/** * @example * {} */ export interface ImportContactsRequest { /** To disable email notification */ disableNotification?: boolean; /** To blacklist all the contacts for email */ emailBlacklist?: boolean; /** To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( **only available if `updateExistingContacts` set to true **) */ emptyContactsAttributes?: boolean; /** **Mandatory if fileUrl and jsonBody is not defined.** CSV content to be imported. Use semicolon to separate multiple attributes. **Maximum allowed file body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. */ fileBody?: string; /** **Mandatory if fileBody and jsonBody is not defined.** URL of the file to be imported (**no local file**). Possible file formats: #### .txt, .csv, .json */ fileUrl?: string; /** **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. */ jsonBody?: ImportContactsRequest.JsonBody.Item[]; /** **Mandatory if newList is not defined.** Ids of the lists in which the contacts shall be imported. For example, **[2, 4, 7]**. */ listIds?: number[]; /** **Optional.** Ids of the consent groups to which all imported contacts will be added. Requires consent groups to be enabled for the organisation. For example, **[1, 3]**. */ consentGroupIds?: number[]; /** To create a new list and import the contacts into it, pass the listName and an optional folderId. */ newList?: ImportContactsRequest.NewList; /** URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479 */ notifyUrl?: string; /** To blacklist all the contacts for sms */ smsBlacklist?: boolean; /** To facilitate the choice to update the existing contacts */ updateExistingContacts?: boolean; } export declare namespace ImportContactsRequest { type JsonBody = JsonBody.Item[]; namespace JsonBody { interface Item { /** List of attributes to be imported */ attributes?: Record | undefined; email?: string | undefined; } } /** * To create a new list and import the contacts into it, pass the listName and an optional folderId. */ interface NewList { /** Id of the folder where this new list shall be created. **Mandatory if listName is not empty** */ folderId?: number | undefined; /** List with listName will be created first and users will be imported in it. **Mandatory if listIds is empty**. */ listName?: string | undefined; } }