Batch contacts creation

You need to upload contacts from the file.

Request:
POST /accounts/{accountId}/contacts/batches/createContacts

Request body:
Format: multipart form-data

Property nameProperty typeDescription
filebinary contentRequired
File type should be CSV,TXT or XLS. The file size limit is 30Mb.
groupsstringComma-separatd list of group id(integer) to add.
fileHasHeaderboolSet to true if provided file has a header row. The header row will be parsed automatically, you don’t need to provide a list of columns in this case.

Default value is true
fileColumnsstringComma-separated list of columns.

Example: msisdn, firstName, lastName

The uploaded file can have the following columns (names case-insensitive):

  • MSISDN required column
  • FirstName
  • LastName
  • Country
  • ExternalId
  • WeChatUserId
  • FacebookUserId
  • Email
  • ZaloId
  • LineId
  • KakaoTalkId

Response:
Returns 202 Accepted status code with batch information body:

Property nameProperty typeDescription
idstring (UUID)Batch id. You can use this to request batch status.
fileNamestringName of the uploaded file
fileTypestringType of the uploaded file
Possible value:
csv
xls
*txt
fileLocationstringURL of the uploaded file
statusstring(enum)Batch status. Possible values:
queued
inProgress
failed
completed
stopped
timeout
totalRowsintTotal rows in uploaded file
errorRowsintRows with errors
duplicateRowsintNumber of duplicate contacts
insertedRowsintNumber of contacts added or inserted
contactGroupsintNumber of contacts added to a group
createdAtdatetimeBatch job creation time

Examples

Request examples:

Example of CSV file with headers that will be parsed automatically:

msisdn,firstname,lastname
639988618108,Praksmix,Onthemix
639325981131,Glenn,Pagaduan
639989943162,Ronald ,Gem
639326303383,Rocky,Coronel
639422919024,Prokopyo,Tumambling

For the following file fileHeader: should be set to false and fileColumns: should set "msisdn, firstName, lastName" or you can only specify "msisdn"

Take note columns should be set in this order msisdn(required),firstName,lastName(both are optional)

639988618108,Praksmix,Onthemix
639325981131,Glenn,Pagaduan
639989943162,Ronald ,Gem
639326303383,Rocky,Coronel
639422919024,Prokopyo,Tumambling