Skip to Content
API ReferenceSurveys

Search Survey Answers

POST
/api/v1/surveys/{survey_id}/answers/search

Individual answers to all survey questions, each with its form_element_id; filter by employee_ids to get specific employees' answers. On an anonymous survey employee is null and the employee_ids filter is rejected with 422. Below the anonymity threshold items is empty and is_below_anonymity_threshold is true. Requires view access to the survey

Authorization

HttpBearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

survey_id*Survey Id

Request Body

application/json
  1. body
page_number?Page Number
Range0 < value
Default1
page_size?Page Size
Range1 <= value <= 200
Default20
form_element_ids?array<integer>|null
employee_ids?array<integer>|null
text?string|null
department_ids?array<integer>|null
job_profile_ids?array<integer>|null
job_role_ids?array<integer>|null
manager_ids?array<integer>|null
with_comments?boolean|null

Response Body

Successful Response

application/json
  1. response
items*array<>
metadata*
is_below_anonymity_threshold*Is Below Anonymity Threshold
Example Request
curl -X POST 'https://api.skailer.com/api/v1/surveys/0/answers/search' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "items": [    {      "form_element_id": 0,      "employee": {        "id": 0,        "first_name": "string",        "last_name": "string",        "email": "string",        "is_archived": false      },      "answer_text": "string",      "answer_option_ids": [        0      ],      "answer_int": 0,      "comment": "string",      "field_values": [        {          "row": 0,          "field_id": 0,          "field_type": "string",          "value": "string"        }      ]    }  ],  "metadata": {    "page_number": 1,    "total_pages": 0,    "items": 0,    "items_per_page": 0,    "total_items": 0  },  "is_below_anonymity_threshold": true}