AskNicely's API allows you to programmatically add contacts, attach custom data, and trigger surveys. Whether you're importing a single contact or syncing a bulk list, the API provides powerful flexibility for developers looking to automate survey distribution.
π‘ Introduction
If youβre using AskNicely in tandem with your internal systems or CRM and want complete control over how contacts are created and surveyed, our API is the best tool for the job.
This article focuses on two core endpoints:
-
Send Survey β import and survey a single contact
-
Bulk Add/Send β import and (optionally) survey multiple contacts
π API Documentation (Generic)
π Navigate in-platform:
Settings > API or visit yourdomain.asknice.ly/help
βοΈ Send Survey Endpoint (Single Contact)
Use this to import one contact and send them a survey immediately. Itβs a POST request sent to:
Required Parameters:
-
X-apikey
β your account API key -
name
β full name of the contact -
email
β valid email address
You can also include any custom data fields (like city
, company
, segment
, etc.).
π§ Example Request:
Video Example...
π¦ Bulk Add/Send Endpoint (Multiple Contacts)
Use this endpoint to import a batch of contacts, with the option to send surveys immediately.
Endpoint URL:
Requirements:
-
A valid JSON object containing a top-level
contacts
array -
Optional: include
"obeyrules": true
if you want to apply Global Contact Rules and trigger surveys on send
π§ Example JSON:
π Visit your custom docs at:https://yourdomain.asknice.ly/help/bulkasync
Video example...
β FAQs & Common Issues
Q: Where do I find my API key?
A: Go to Settings > API inside AskNicely. Your key is listed at the top of the page.
Q: What happens if a contact already exists?
A: The API will update the existing contact with any new custom data provided.
Q: Can I trigger a survey and obey the Global Contact Rule?
A: Yesβadd obeyrules:true
in your Bulk Add/Send JSON request to apply Contact Rules.
Need help setting up your API connection? Contact our Support Team via chat or email support@asknice.ly.
Β
Β