Survey Responses

Create Survey Response

Changed on

Create a new survey response

post/survey_responses

Request

  • Base URL
    https://api.buttondown.com/v1
  • URL
    https://api.buttondown.com/v1/survey_responses
  • Auth
    API key in header Authorization

Request body

subscriber_idstring required

The subscriber who submitted the response.

survey_idstring required

The survey being answered.

email_idstring required

The email ID, automation ID, or arbitrary source string where the survey was answered.

answerinteger required

The 1-based index of the selected answer in the survey's answers list.

Example request

{
  "email_id": "em_01jv2m9q8r7s6t5w4x3y2z1abc",
  "answer": 1
}

Response

Created

idstring required

A unique TypeID associated with the object.

creation_datestring date-time required

The date and time at which the object was first created.

answerstring required

The answer given to the survey.

textstring required

Optional text included by the subscriber with the response. Subscribers are only prompted to supply a text response if the is_freeform_response_enabled field is set to true on the survey.

survey_idstring required

The ID of the survey this response was submitted to.

subscriber_idstring required

The ID of the subscriber who submitted this response.

email_idstring nullable

The ID of the email where this response was submitted, if any.

automation_idstring nullable

The ID of the automation where this response was submitted, if any.

sourcestring nullable

For responses not tied to an email or automation, the origin the survey was answered from (e.g. a transactional:* template). Null otherwise.

Example response

{
  "subscriber": {
    "country": "US",
    "email_address": "telemachus@buttondown.email",
    "delivered_count": 12,
    "open_count": 7,
    "clicked_count": 3,
    "open_rate": 0.5833,
    "click_rate": 0.25
  },
  "email": {
    "slug": "welcome-to-the-newsletter"
  }
}

Changes

    • warning

      added the new comment_text_contains_link enum value to the //// response property for the response status

    • warning

      added the new stripe.charge.succeeded enum value to the // response property for the response status