Umfragen auflisten
Rufen Sie eine Liste aller Umfragen ab, die Ihrem Team zugänglich sind.
GET
https://api.sentisnap.com/v1/surveys
Authentifizierung
Erfordert einen API-Schlüssel mit der Berechtigung surveys:read.
Query-Parameter
| Parameter | Typ | Pflicht | Beschreibung |
|---|---|---|---|
page | integer | Nein | Page number (default: 1) |
per_page | integer | Nein | Number of surveys per page (default: 50, max: 100) |
Antwort
{
"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
}
}Antwortfelder
| Feld | Typ | Beschreibung |
|---|---|---|
id | string | Eindeutiger Umfrage-Identifikator (UUID) |
name | string | Name der Umfrage |
slug | string | URL-freundlicher Identifikator |
status | string | Umfragestatus: draft, published, closed |
response_count | integer | Gesamtanzahl der Antworten |
created_at | string | Zeitstempel der Erstellung (ISO 8601) |
updated_at | string | Zeitstempel der letzten Aktualisierung (ISO 8601) |
published_at | string | Zeitstempel der Veröffentlichung (null, wenn nicht veröffentlicht) |
Beispiel
curl -X GET "https://public-api.sentisnap.com/v1/surveys?page=1&per_page=10" \
-H "Authorization: Bearer sk_live_..."Fehler
| Code | Beschreibung |
|---|---|
401 | Ungültiger API-Schlüssel |
403 | Unzureichende Berechtigung (erfordert surveys:read) |