API documentation

Listing survey responses

Retrieve all survey responses for your account.

Results are returned in creation order, with the oldest item first, and are paginated. See the parameters section below for more information regarding pagination.

Endpoint

GET /v1/survey_responses.json

Example request

curl https://api.delighted.com/v1/survey_responses.json \
  -H "Content-Type: application/json" \
  -u YOUR_DELIGHTED_API_KEY:
Delighted::SurveyResponse.all # returns an Enumerable
delighted.surveyResponse.all(); // returns a promise
delighted.SurveyResponse.all()
\Delighted\SurveyResponse::all();

Example response

[
  {
    "id": "1",
    "person": "10",
    "survey_type": "nps",
    "score": 0,
    "comment": null,
    "permalink": "https://app.delighted.com/r/2jo3B7Gak9q37XkuHrGLGAbCdevemcx8",
    "created_at": 1732510888,
    "updated_at": null,
    "person_properties": { "purchase_experience": "Retail Store", "country": "USA" },
    "notes": [],
    "tags": [],
    "additional_answers": [
      {
        "id": "4",
        "value": {
          "free_response": null,
          "scale": null,
          "select_one": null,
          "select_many": [
            {
              "id": "DxmjNj",
              "text": "Convenience"
            },
            {
              "id": "uNQIig",
              "text": "Friendly staff"
            }
          ]
        },
        "question": {
          "id": "enum_z9EvYV",
          "type": "select_many",
          "text": "What specifically did you enjoy about your experience with us?"
        }
      },
      {
        "id": "5",
        "value": {
          "free_response": null,
          "scale": null,
          "select_one": {
            "id": "tp0Q4K",
            "text": "Yes"
          },
          "select_many": null
        },
        "question": {
          "id": "enum_caUUdY",
          "type": "select_one",
          "text": "Have you purchased from us in the past?"
        }
      },
      {
        "id": "6",
        "value": {
          "free_response": null,
          "scale": 4,
          "select_one": null,
          "select_many": null
        },
        "question": {
          "id": "integer_buwb3w",
          "type": "scale",
          "text": "How often do you shop at one of our stores?"
        }
      },
      {
        "id": "7",
        "value": {
          "free_response": "A friend recommended you to me!",
          "scale": null,
          "select_one": null,
          "select_many": null
        },
        "question": {
          "id": "text_BJPEm0",
          "type": "free_response",
          "text": "How did you hear about us?"
        }
      }
    ]
  },
  {
    "id": "2",
    "person": "11",
    "survey_type": "nps",
    "score": 9,
    "comment": "I loved this app!",
    "permalink": "https://app.delighted.com/r/5pFDpmlyC8GUc5oxU6USto5VonSKAqOa",
    "created_at": 1732512688,
    "updated_at": 1732513288,
    "person_properties": null,
    "notes": [
      { "id": "1", "text": "Note 1", "user_email": "foo@bar.com", "created_at": 1732512688 },
      { "id": "2", "text": "Note 2", "user_email": "gyp@sum.com", "created_at": 1732513588 }
    ],
    "tags": [],
    "additional_answers": []
  },
  ...
]

Parameters

Name Type Description
per_page Integer Number of results to return per page. The default is 20. The maximum is 100.
page Integer The page number to return. The default is 1.
since Integer An optional Unix timestamp to restrict responses to those created on or after this time. Formatting example (for 1 hour ago): 1732510888.
until Integer An optional Unix timestamp to restrict responses to those created on or before this time. Formatting example (for the current time): 1732514488.
updated_since Integer An optional Unix timestamp to restrict responses to those updated on or after this time. Formatting example (for 1 hour ago): 1732510888.
updated_until Integer An optional Unix timestamp to restrict responses to those updated on or before this time. Formatting example (for the current time): 1732514488.
trend String An optional ID of a trend to restrict responses to that trend. To obtain the ID for a trend, visit the trends page. For example, if the URL for the desired trend ends with /trends/1234 the ID of that trend is 1234.
person_id String An optional ID to restrict responses to a specific person.
person_email String An optional email to restrict responses to a specific person.
order String

An optional sort order for the responses based on creation time. The default is asc, which will return responses in chronological order by (oldest first). To get responses in reverse chronological order (newest first), specify desc.

You may also sort responses based on the time they were last updated. To get responses sorted in this way, specify asc:updated_at for chronological order or desc:updated_at for reverse chronological order.

expand Array An optional array specifying the objects you want expanded. To expand the person object, pass expand[]=person. To expand the notes objects, pass expand[]=notes. To expand the person and notes objects, pass expand[]=person&expand[]=notes. The default is expand[]=notes.