List Surveys
Retrieve a list of all surveys accessible to your team.
GET
https://api.sentisnap.com/v1/surveys
Authentication
Requires API key with surveys:read scope.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
per_page | integer | No | Number of surveys per page (default: 50, max: 100) |
Response
{
"data": [
{
"id": "019abc12-3456-7890-abcd-ef1234567890",
"name": "Customer Satisfaction Survey",
"slug": "customer-satisfaction-survey-abc123",
"status": "published",
"response_count": 1250,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:22:00Z",
"published_at": "2024-01-16T09:00:00Z"
}
],
"meta": {
"page": 1,
"per_page": 50,
"total": 12,
"total_pages": 1
},
"links": {
"self": "/v1/surveys?page=1",
"next": null,
"prev": null
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique survey identifier (UUID) |
name | string | Survey name |
slug | string | URL-friendly identifier |
status | string | Survey status: draft, published, closed |
response_count | integer | Total number of responses |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last update timestamp |
published_at | string | ISO 8601 publish timestamp (null if not published) |
Example
curl -X GET "https://public-api.sentisnap.com/v1/surveys?page=1&per_page=10" \
-H "Authorization: Bearer sk_live_..."Errors
| Code | Description |
|---|---|
401 | Invalid API key |
403 | Insufficient scope (requires surveys:read) |