Email Surveys API
Create in-email surveys and read their answers from the API.
Surveys are one-click questions embedded in an email (NPS, rating, yes/no or multiple choice). Recipients answer straight from their inbox, and the answers land here.
List surveys
GET /api/v1/email/surveys{
"surveys": [
{
"id": "j92...",
"type": "nps",
"question": "How likely are you to recommend us?",
"options": [],
"counts": { "9": 12, "10": 31 },
"responsesCount": 43,
"scoreSum": 402,
"commentsCount": 7,
"sourceName": "August newsletter",
"archived": false
}
],
"sampleLimited": false
}Get one survey
GET /api/v1/email/surveys/:surveyIdReturns the survey, its averageScore (null before the first answer) and the 50 most recent responses.
Create a survey
POST /api/v1/email/surveys| Field | Type | Description |
|---|---|---|
type | string | Required nps, rating, yesno or choice. |
question | string | Question text. Defaults to the type's standard wording. |
options | string[] | Choices, for choice surveys only. |
curl -X POST -H "x-api-key: org_api_key" -H "Content-Type: application/json" \
-d '{"type":"choice","question":"What should we build next?","options":["Reporting","Integrations","Mobile"]}' \
"https://growth.example.com/api/v1/email/surveys"Returns { "surveyId": "j92..." }. Reference that id from a survey content block to put the question in an email; the wording on the block wins and is mirrored back onto the survey when the email is saved.
List answers
GET /api/v1/email/surveys/responses?surveyId=j92...&limit=100&cursor=Answers are returned newest first with a cursor for the next page (null on the last page).
Archive a survey
DELETE /api/v1/email/surveys/:surveyId