API/Email Surveys API

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/:surveyId

Returns the survey, its averageScore (null before the first answer) and the 50 most recent responses.

Create a survey

POST /api/v1/email/surveys
FieldTypeDescription
typestringRequired nps, rating, yesno or choice.
questionstringQuestion text. Defaults to the type's standard wording.
optionsstring[]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

Hides the survey from the results page without deleting its answers. Add ?restore=true to bring it back.

Error responses:

StatusMeaning
400Missing surveyId, or an unknown survey type.
401Missing or invalid API key.
404Unknown survey, or a survey owned by another organization.

Notes

Email Campaigns APIAffiliate Partners API