List Responses
Retrieve responses for a survey with optional filtering.
GET
https://api.sentisnap.com/v1/surveys/{surveyId}/responses
Authentication
Requires API key with responses:read scope.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
surveyId | string | Yes | Survey UUID |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
per_page | integer | No | Number per page (default: 50, max: 100) |
filter[submittedAt][gte] | string | No | Filter by date (ISO 8601) |
filter[submittedAt][lte] | string | No | Filter by date (ISO 8601) |
Response
{
"data": [
{
"id": "019def45-6789-0abc-def0-123456789abc",
"respondent_id": "resp_abc123",
"status": "completed",
"data": {
"question_uuid_1": "Very satisfied",
"question_uuid_2": [
"Feature A",
"Feature C"
],
"question_uuid_3": "The product is excellent and easy to use."
},
"metadata": {
"source": "email",
"language": "en",
"time_spent_seconds": 245
},
"started_at": "2024-01-20T14:20:00Z",
"submitted_at": "2024-01-20T14:24:05Z",
"created_at": "2024-01-20T14:20:00Z"
}
],
"meta": {
"page": 1,
"per_page": 50,
"total": 1250,
"total_pages": 25
},
"links": {
"self": "/v1/surveys/019abc.../responses?page=1",
"next": "/v1/surveys/019abc.../responses?page=2"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique response identifier |
respondent_id | string | Anonymous respondent identifier |
status | string | Response status: started, completed |
data | object | Response answers keyed by question ID |
metadata | object | Additional response metadata |
started_at | string | When the respondent started |
submitted_at | string | When the response was submitted |
Example
# Get responses from the last 7 days
curl -X GET "https://public-api.sentisnap.com/v1/surveys/019abc.../responses?filter[submittedAt][gte]=2024-01-13T00:00:00Z" \
-H "Authorization: Bearer sk_live_..."Errors
| Code | Description |
|---|---|
401 | Invalid API key |
403 | Insufficient scope (requires responses:read) |
404 | Survey not found |