• Quick Start
  • Send Survey
  • Get Contact
  • Remove Contact
  • Delete Contact (GDPR)
  • Get Unsubscribed
  • Get Responses
  • Get NPS
  • Sent Statistics
  • Historical Stats
  • Deactivate All
  • Bulk Add with CSV
  • Inapp Surveys
  • Bulk Add/Send

Change Log

  • Changes

Bulk Addition of Contacts using CSV Importer via API

Instead of emailing your files or using your browser to upload your contacts, you can automate this by providing the CSV file through API. To do this, follow the steps below.

Configure a CSV Importer

To get started, you need to create a CSV importer in the CSV Importer App. This step is required, so you can configure the settings how the new contact data is processed and if surveys should be sent.

Each CSV Importer has a unique ID once it is created, you can get that Identifier on the last step (4) of the setup. If you have already configured the CSV Importer, you can find that by clicking onto any importer which opens the settings and details of the importer.

How to use the API

Request

To make a request you need to add the following account details to the request below

[importer-id] = This is specific to the Importer you would like to use. Please follow the above steps to configure and retrieve the id of the importer

curl -F 'file=@[filename]' --header "X-apikey: " \
https://DEMO.asknice.ly/api/v1/curlupload/[importer-id]

Example

Uploading a CSV file containing the data in the format that was used during the CSV Importer setup. Here is an example where the file is called TestData.csv and the [importer-id] is 1234:

curl -F 'file=@TestData.csv' --header "X-apikey: " \
https://DEMO.asknice.ly/api/v1/curlupload/1234

Limits

The API has a payload limit of 6MB.

Response

Once you submitted your request, you will receive one of the following responses

Success

Your request was successful and the file will be imported as per the CSV Importer settings.

Success

Errors

401 (Unauthorized)

You have made a request with an invalid API key. Please check if the API key you are using is correct.

{
    "success": false,
    "msg": "Could not find user with API key"
}