How to programmatically upload/import Contacts to your Account

  1. Download the contact import template attached to this article.
  2. Complete the necessary fields on the template. Mobile numbers the format {Country code+ local number} and the country in the Alpha iso code format are mandatory.  The Mobile number should be added to the {primary_mdn} field and the country in Alpha iso code format should be in the {primary_addr_country} field. All other fields are optional, but recommended if you have the need to segment your contacts.
  3. Once you have your contact file ready, now it's time to upload to your address book.  You can do this by using the Contact Import Job resource via API
  • Step 1 : Create the Attachment/contacts to import
curl -L -X POST '' -H 'Authorization: Bearer {Token}' -H 'Content-Type: application/json --data-raw '{
"designation": "CONTACTS_IMPORT",
"name": "Contacts Import File",
"type": "application/",
"filename": "Kolanator_contactsImportTemplate4.csv"
Response: {wCCEky3Dz0eh3nzHSTXKU}
  • Step 2 : Create the Access Token for Uploading Attachment Data 

Use the response ID received when you created the attachment as a resource ID in the Acces token API call

curl -L -X POST '' -H 'Authorization: Bearer {Token} -H 'Content-Type: application/json'
Response: {i0FG2p9LtL5N7i47tsh8y}
  • Step 3 : Upload Attachment Data (your Contact Template file)

Use the response ID received in the Access token API call

curl -L -X POST '' -H 'Content-Type: application/octet-stream' -H 'Authorization: Bearer {Token}
--data-binary '@/C:/Users/Kola/Downloads/Kolanator_contactsImportTemplate4.csv'























Was this article helpful?
0 out of 0 found this helpful


Article is closed for comments.