Retrieve and export survey responses. Access individual answers and export data as CSV, JSON or Excel on any plan with API access, and as an SPSS package on the Pro plan and above.
/surveys/:id/responsesRetrieve a paginated list of survey responses with answers.
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
pageSize | integer | Items per page (1-100, default: 20) |
status | string | Filter by any session status: in_progress, completed, abandoned, disqualified, screened_out, over_quota, quality_terminated |
since | datetime | Filter responses after this date (ISO 8601) |
until | datetime | Filter responses before this date (ISO 8601) |
curl -X GET "https://app.surventrics.ai/api/v1/surveys/SURVEY_ID/responses?status=completed&pageSize=50" \
-H "Authorization: Bearer YOUR_API_KEY"{
"data": [
{
"id": "resp_550e8400-e29b-41d4-a716-446655440000",
"sessionId": "sess_abc123",
"status": "completed",
"startedAt": "2024-01-20T10:30:00Z",
"completedAt": "2024-01-20T10:35:00Z",
"deviceType": "mobile",
"country": "US",
"answers": [
{
"questionId": "q_001",
"questionTitle": "How satisfied are you?",
"value": "Very Satisfied",
"answeredAt": "2024-01-20T10:31:00Z"
},
{
"questionId": "q_002",
"questionTitle": "How likely are you to recommend us?",
"value": 9,
"answeredAt": "2024-01-20T10:32:00Z"
}
]
}
],
"pagination": {
"total": 142,
"page": 1,
"pageSize": 50,
"totalPages": 3,
"hasMore": true
}
}responses:read/surveys/:id/responses/exportExport all survey responses as CSV, JSON, Excel or an SPSS package. The SPSS package needs the Pro plan or above; the other formats need no plan beyond API access.
| Name | Type | Description |
|---|---|---|
format | string | csv (default), json, xlsx, or spss. xlsx is an Excel workbook; spss is a zip containing data.csv, an import.sps syntax file that already points at it, and a README. spss returns 403 unless the organisation's plan includes SPSS export (Pro and above). |
status | string | One session status or all (default completed): all, in_progress, completed, abandoned, disqualified, screened_out, over_quota, quality_terminated |
since | datetime | Export responses after this date |
until | datetime | Export responses before this date |
curl -X GET "https://app.surventrics.ai/api/v1/surveys/SURVEY_ID/responses/export?format=csv" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o responses.csvThe CSV includes metadata columns followed by one column per question, headed by the question's text. It is the same file the results page downloads:
Response ID,Started At,Completed At,Status,Duration (seconds),Device Type,Country,Quality Score,How satisfied are you?,How likely to recommend?
sess_abc,2024-01-20T10:30:00Z,2024-01-20T10:35:00Z,completed,300,mobile,US,0.95,Very Satisfied,9
sess_def,2024-01-20T11:00:00Z,2024-01-20T11:08:00Z,completed,480,desktop,UK,0.88,Satisfied,7A text cell that begins with =, +, -, @, a tab or a carriage return is written with a leading apostrophe ('=1+1), so a spreadsheet shows it as text instead of running it as a formula. Numbers, negative ones included, are unchanged. Use format=json for the raw values.
curl -X GET "https://app.surventrics.ai/api/v1/surveys/SURVEY_ID/responses/export?format=json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o responses.json{
"survey": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Customer Satisfaction Survey",
"slug": "customer-satisfaction-2024"
},
"questions": [
{ "id": "q_001", "title": "How satisfied are you?", "type": "single_choice" },
{ "id": "q_002", "title": "How likely to recommend?", "type": "nps" }
],
"responses": [
{
"response_id": "resp_001",
"respondent_id": "sess_abc",
"status": "completed",
"started_at": "2024-01-20T10:30:00Z",
"completed_at": "2024-01-20T10:35:00Z",
"device_type": "mobile",
"country": "US",
"quality_score": 0.95,
"q_001": "Very Satisfied",
"q_002": 9
}
],
"exportedAt": "2024-01-21T09:00:00Z",
"totalResponses": 142
}responses:export| Status | Description |
|---|---|
in_progress | Respondent started but hasn't completed the survey |
completed | Survey fully completed and submitted |
abandoned | Started but never completed (session expired) |
The value field type depends on the question type:
An answer to a question marked as personal data comes back as the string "[redacted]" when the member your API key acts as has an organization role that may not see it. The same applies to exports, probe transcripts and BI connector endpoints.
| Question Type | Value Type | Example |
|---|---|---|
| single_choice | string | "Option A" |
| multiple_choice | array | ["A", "B"] |
| nps, stars, slider | number | 8 |
| short_text, long_text | string | "Great service!" |
| ranking | array | ["B", "A", "C"] |
| matrix_single | object | {"row1": "col2", "row2": "col3"} |