Skip to main content
All endpoints accept and return JSON. The Content-Type header for POST and PATCH requests must be application/json.

Success Responses

Successful requests return HTTP 2xx status codes. The response body contains the requested object or array directly — there is no outer wrapper envelope. Single object example (GET /surveys/):
{
  "id": "abc-123",
  "name": "US Gen Pop Q2 2025",
  "status": "Live",
  "country": "US"
}
List example (GET /surveys):
[
  { "id": "abc-123", "name": "US Gen Pop Q2 2025", ... },
  { "id": "def-456", "name": "UK Millennials", ... }
]

Error Responses

All error responses return a JSON body with a message field containing a human-readable description suitable for display to end users.
Returned when a required field is missing or a field value is invalid.
{
  "message": "Survey name is required."
}

HTTP Status Code Reference

CodeMeaningCommon Cause
200 OKSuccessStandard success for GET and PATCH
201 CreatedResource createdSuccess for POST (create) requests
400 Bad RequestValidation errorMissing required field or invalid value
401 UnauthorizedAuth failureMissing, expired, or invalid token
404 Not FoundResource missingWrong ID or insufficient account permissions
405 Method Not AllowedInvalid methodAttempting DELETE or unsupported verb
429 Too Many RequestsRate limitedRequest volume exceeded per-endpoint limit
500 Internal Server ErrorServer errorUnexpected error — contact support if persistent

Pagination

Endpoints that return lists (GET /surveys, GET /responses) support pagination via query parameters:
ParameterTypeDescription
pageintegerPage number, starting at 1 (default: 1)
page_sizeintegerNumber of results per page (default varies by endpoint)
Example: GET /surveys?page=2&page_size=50
When polling for responses during active fieldwork, combine pagination with a timestamp filter where supported to retrieve only new records since your last poll.