API documentation

Adding survey responses

Create a survey response (i.e. a score and comment from a person).


POST /v1/survey_responses.json

Example request

curl https://api.delighted.com/v1/survey_responses.json \
  -d 'person=1' \
  -d 'score=9'
Delighted::SurveyResponse.create(person: '1', score: 9)
delighted.surveyResponse.create({ person: '1', score: 9 });
delighted.SurveyResponse.create(person='1', score=9)
\Delighted\SurveyResponse::create(array('person' => '1', 'score' => 9));

Example response

  "id": "2",
  "person": "1",
  "survey_type": "nps",
  "score": 9,
  "comment": null,
  "permalink": "https://delighted.com/r/0DkeDVFJSBgvJ8UtdacQtudYcXBt3Ecl",
  "created_at": 1544441889,
  "updated_at": 1544441889,
  "person_properties": null,
  "notes": [],
  "tags": []


Name Type Description
person String The ID of the person responding. (required)
person_properties Map/Dictionary

Custom properties to associate with this response. You can add as many properties as you need. For each property you wish to add, pass a separate person_properties[key]=value parameter.

For example, if you wanted to add a “Customer ID” and a “Location” to the response, you could pass 2 parameters, person_properties[customer_id]=123 and person_properties[location]=USA.

This parameter is optional.

score Integer Score of the response, from 0 to 10. (required)
comment String An optional comment that the person left when responding.
created_at Integer An optional Unix timestamp of the time when the survey response was collected. If you do not pass this value, we will automatically set this value to the current time. Formatting example (for the current time): 1544441889.