Trigger surveys
This page describes the ways to trigger surveys with nps.today from your own systems: the API, pop-ups and in-app feedback, and embedded surveys. For triggers without code, see Power Automate and Zapier.
A trigger is what we refer to when an action in a certain system calls our API to add a respondent to nps.today which will send out a survey. This can be set up by calling our API or with a Webhook connector.
Triggering a survey through our API will usually be done with a trigger in a third-party system.

Below you see different examples of a system trigger:
-
Online
- Web shop (at check-out)
-
CRM
- Before/after meetings (e.g. Appointment created/completed)
- Offer sent (e.g. Sales stage = offer sent + 1 day)
- New customer/onboarding (Account Type changed to customer)
-
ERP/financial system
- Order (order completed)
- Invoice (Invoiced)
-
Delivery and project
- Delivery (delivery completed)
- Project (e.g. project stage = halfway)
-
Customer Service
- Case completed (e.g. Case Closed + 2 hours)
Trigger surveys with our API
To send a survey, add the customer to a campaign as a campaign member. nps.today then sends the survey by email or SMS, using the campaign's settings such as delay, reminders and throttling.
| Endpoint | Use it to |
|---|---|
POST /campaigns/{campaignId}/respondent |
Add one respondent. The body is one campaign member object. |
POST /campaigns/{campaignId}/respondents |
Add several respondents in one call. The body is an array of campaign member objects. |
POST /campaigns/{campaignId}/respondentInlineAuth |
Add one respondent when your system cannot set the Authorization header. The API key goes in the body. |
All fields of the campaign member object are described in the API reference. For authentication, see Authentication and errors.
Example
This request adds the respondent Ross from the company Ajaxx, sets Janne as the responsible employee on the campaign member, and stores two custom values. Replace {campaignId} with your campaign ID, shown as Internal ID in Campaign Info. See Find campaign IDs.
curl --location 'https://api.nps.today/campaigns/{campaignId}/respondent' \
--header 'Content-Type: application/json' \
--header 'Authorization: apikey <your API key>' \
--data-raw '{
"respondent": {
"emailAddress": "[email protected]",
"firstName": "Ross",
"lastName": "Doe",
"phoneNumber": "+4512345678",
"externalId": "Ext12386",
"company": {
"name": "Ajaxx"
}
},
"employee": {
"email": "[email protected]",
"firstName": "Janne",
"lastName": "Doe"
},
"custom": {
"Unique Key": "asgjuas07g0as44",
"Area": "East"
}
}'
- respondent: the person who gets the survey. An email address or a phone number is needed to send it. How nps.today matches the respondent to an existing one is explained in How respondents are identified.
- employee: the responsible employee on this campaign member. See Add a responsible employee.
- custom: any valid JSON with data from your own system, for example IDs you need in reports. The keys and values are stored on the campaign member.
Verify it worked
- Send a request with your own email address as the respondent.
- Check the result in app.nps.today, as described in Test an integration.
Collect responses with pop-up
If you want to collect responses on your website or web application a pop-up is a very valuable channel to use. To understand more about the pop-up and understanding the technical set-up please go to this pop-up documentation site
Get customer feedback In App
If you want to collect feedback inside an app, your app developers can build the survey UI and add the respondent and the response in one call with POST /popup/{campaignId}/response.
https://api.nps.today/popup/{campaignId}/response
{
"respondent": {
"emailAddress": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+4512345678",
"externalId": "Ext12386"
},
"response":{
"rating": 8,
"userComment": "Some important comment",
"ratingTime": "2020-01-01T13:37:45Z"
}
}
Embedded survey
An embedded survey is an nps.today survey inside an email sent from a third-party system. There are many cases where this is relevant if the system provides its own ‘send email’ solution.
Below is a simple flow of an embedded survey.

Below is an example of an embedded survey in a newsletter.

Create survey links
When setting up an embedded email you need to create a link for each of the boxes (0-10) the respondent can click on.
See here how you can generate links with a script or API.
Once you have the links, you can create boxes and add “&rating=“ and the box number.
See example below on a rating 8:
URL example on &rating=8
https://r.nps.today/?cid=12810&firstName=John&lastName=Doe&[email protected]&
phone=+4587654321&ext=cd1234567&[email protected]&id=b77063db-181c-4084-957f-590c04de255c&sha=530fa9fc7441cda800091458b9e912efaebbbf1a563b1ea292571b22b8dde6b8&rating=8

Styling
Styling of the embedded survey needs to be done in the third-party system if the system has a HTML designer for their emails.
Below is an HTML example so you do not need to start from nothing.
HTML example for embedded survey
<td style="border: 1px solid #000000; direction: ltr; font-size: 0px; text-align: center; vertical-align: top;">
<div style="Margin: 0px auto; max-width: 538px;">
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" class="devicewidth">
<tbody>
<tr>
<td style="direction: ltr; font-size: 0px; padding: 20px 0; text-align: center; vertical-align: top;">
<div class="outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;">
<table border="0" cellpadding="0" cellspacing="0" style="vertical-align: top;" width="100%" class="devicewidthtext">
<tbody>
<tr>
<td align="center" style="font-size: 0px; padding: 10px 25px; word-break: break-word;">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: 600; line-height: 1; text-align: center; color: #000000;">
<div class="QUESTION_TEXT">How likely is it that you would recommend nps.today to others?
<div class="QUESTION_TEXT">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<div class="donotremove">
<div class="NPSTODAYSURVEY">
<table class="rating" cellspacing="0" cellpadding="0" style="margin: 0 auto;">
<tbody>
<tr>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=0" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">0</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=1" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">1</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=2" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">2</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=3" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">3</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=4" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">4</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=5" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">5</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=6" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">6</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=7" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">7</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=8" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">8</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=9" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">9</span>
</a>
</td> 
<td class="boxspacing" width="10px"></td>
<td class="box" align="center" width="8.5%" height="40" bgcolor="#000000">
<a href="{REPLY_URL}&rating=10" style="font-size: 16px; font-weight: bold; font-family: sans-serif; text-decoration: none; line-height: 40px; width: 100%; display: inline-block;">
<span style="color: #ffffff;">10</span>
</a>
</td>
</tr>
</tbody>
</table>
<div class="donotremove">
</div>
<div style="Margin: 0px auto; max-width: 538px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" class="devicewidth">
<tbody>
<tr>
<td style="direction: ltr; font-size: 0px; padding: 20px 0; padding-top: 0px; text-align: center; vertical-align: top; width:100%">
<div class="outlook-group-fix rating" style="font-size: 13px; text-align: left; direction: ltr; vertical-align: top; float: left; width:100%">
<table border="0" cellpadding="0" cellspacing="0" style="vertical-align: top;" width="100%" class="">
<tbody>
<tr>
<td align="left" width="50%" style="font-size: 0px; padding: 0px; word-break: break-word; min-width: 50%;">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 600; line-height: 24px; text-align: left;color: #000000;">
<div class="NOT_LIKELY">Not likely
<div class="NOT_LIKELY">
</div>
</td>
<td align="right" width="50%" style="font-size: 0px; padding: 0px; word-break: break-word; min-width: 50%;">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 600; line-height: 24px; text-align: right; color: #000000;">
<div class="VERY_LIKELY">Very likely
<div class="VERY_LIKELY">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
Use Webhook
If your system provide you with webhooks, please read this webhook guide.
Connect with Power Automate
nps.today has built a nps.today connector in Power Automate. For this, you will need a Microsoft 365 Licence. See Power Automate.
Connect with Zapier
nps.today has built a Zap in Zapier for you to connect nps.today with other systems. For this, you will need your own Zapier account. See Zapier.
Add respondent with sFTP server
sFTP is used for systems unable to work with more modern integrations, but are able to dump .csv or .xls(x) files to an FTP folder. To trigger a survey you can set up a Power Automate flow that reads the file(s) with a recurring frequency, sets certain conditions, and adds the respondents from the files to a campaign in nps.today. nps.today will be able to assist you with this.
NOTE! that these files transferred to the FTP folder must be type UTF-8.