fetch_surveys
Fetch a paginated list of surveys, optionally filtered by sweepstakes, enabled state or archived state. An empty filter returns all surveys in the account. Requires the Surveys module enabled — on 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support. IsLocked is derived at read time: true when the survey already has responses (its question structure can no longer be replaced). Questions are NOT included here — use get_survey for the full question set. DISPLAY RULE: never show SurveyToken UUIDs; present survey names, counts and the shareable PublicLink instead.
fetch_surveys
When to use
Fetch a paginated list of surveys, optionally filtered by sweepstakes, enabled state or archived state. An empty filter returns all surveys in the account. Requires the Surveys module enabled — on 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support. IsLocked is derived at read time: true when the survey already has responses (its question structure can no longer be replaced). Questions are NOT included here — use get_survey for the full question set. DISPLAY RULE: never show SurveyToken UUIDs; present survey names, counts and the shareable PublicLink instead.
Pre-calls required
fetch_sweepstakesif the user gave you a sweepstakes name instead of a token
Parameters to validate before calling
sweepstakes_token(string, optional) — Filter by a specific sweepstakes (UUID v4, optional)status(boolean, optional) — true = enabled only, false = disabled only, omit = both (optional)archived(boolean, optional) — Filter by archived state; omit for both (optional)page(number, optional) — range: 1–+∞ — Page number (optional, default 1)limit(number, optional) — range: 1–200 — Results per page (optional, default 50, max 200)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (optional, default 1) | |
| limit | No | Results per page (optional, default 50, max 200) | |
| status | No | true = enabled only, false = disabled only, omit = both (optional) | |
| archived | No | Filter by archived state; omit for both (optional) | |
| sweepstakes_token | No | Filter by a specific sweepstakes (UUID v4, optional) |