Lista ankiet
Pobierz listę wszystkich ankiet dostępnych dla Twojego zespołu.
GET
https://api.sentisnap.com/v1/surveys
Uwierzytelnianie
Wymaga klucza API z uprawnieniem surveys:read.
Parametry zapytania
| Parametr | Typ | Wymagany | Opis |
|---|---|---|---|
page | integer | Nie | Page number (default: 1) |
per_page | integer | Nie | Number of surveys per page (default: 50, max: 100) |
Odpowiedź
{
"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
}
}Pola odpowiedzi
| Pole | Typ | Opis |
|---|---|---|
id | string | Unikalny identyfikator ankiety (UUID) |
name | string | Nazwa ankiety |
slug | string | Identyfikator przyjazny dla adresu URL |
status | string | Status ankiety: draft, published, closed |
response_count | integer | Całkowita liczba odpowiedzi |
created_at | string | Znacznik czasu utworzenia (ISO 8601) |
updated_at | string | Znacznik czasu ostatniej aktualizacji (ISO 8601) |
published_at | string | Znacznik czasu publikacji (null, jeśli nieopublikowano) |
Przykład
curl -X GET "https://public-api.sentisnap.com/v1/surveys?page=1&per_page=10" \
-H "Authorization: Bearer sk_live_..."Błędy
| Kod | Opis |
|---|---|
401 | Nieprawidłowy klucz API |
403 | Niewystarczające uprawnienia (wymaga surveys:read) |