Surveys Reference Public

Screen & data reference

Every page, form field, question type, database table, route and API endpoint the Surveys module ships, with the CLI commands used to manage it.

Guide version: r1 Module version: 1.0.0 Updated: 2026-08-27 Estimated time: 4 min 8 views 0% helpful
You are viewing version r1 of this guide. View the current version

Pages

PageShows
OverviewPublished/required counts, response and acceptance rates, star distribution, by-app and by-platform tables.
SurveysEvery survey with its type, enforcement, status, version and response count. Publish/archive live here.
ResponsesThe answer and consent ledger, filterable by survey, outcome and date.
Rating DetailsIndividual mobile-app ratings, filterable by app, platform, stars and date.
App CatalogThe apps that can be rated.

Survey form fields

FieldNotes
TitleRequired. Shown as the prompt heading.
TypeRating, Consent, Poll or Feedback. Descriptive — it does not change behaviour.
EnforcementThe behavioural switch. Optional or Required.
MessageThe prompt body. Basic HTML allowed and sanitised. For consent, this is the text being agreed to.
AppOptionally ties the survey to a catalog app.
User types / TenantsAudience filters. Blank = everyone.
Starts / EndsOptional active window (UTC).
Snooze / Cooldown / Max promptsPacing. Optional surveys only — greyed out when Required is selected.
QuestionsRepeatable rows: label, type, options (one per line), required flag.
Publish as a new versionEdit only. Invalidates prior answers and re-asks everyone.

Question types

TypeRenders as
AgreementProse only — the Agree/Disagree buttons are the answer.
Star ratingFive stars, keyboard accessible.
ScaleRadio buttons from your option list.
Single choiceRadio buttons.
Multiple choiceCheckboxes.
Free textTextarea.

Tables (created on every database)

TableHolds
surveysDefinitions: enforcement, version, status, targeting, pacing, content hash.
survey_questionsOrdered questions.
survey_responsesThe append-only ledger, one row per user per survey version.
survey_answersPer-question answers for a response.
survey_prompt_stateImpression counts and snooze deadlines.
euapi_appsThe rateable app catalog (ships in the base install schema).
euapi_app_ratingsMobile-app ratings (ships in the base install schema).

Routes

RoutePurpose
surveys/overviewThe Overview page.
surveys/<page>Pages, list endpoints, modals, save/delete/publish.
survey_prompt/submitWhere a user’s answer is posted.

End-User API

EndpointNotes
GET /v1/api/me/appsEnabled catalog apps.
POST /v1/api/me/app-ratingSubmit a 1–5 rating. One per user per app per UTC day (409 duplicate otherwise).

Both keep the URLs, request bodies and response envelopes they had before the move. Both answer 404 module_unavailable when the module is disabled.

Commands

php erpat migrate:modules --module=surveys   # create the tables
php erpat db:seed SurveysDemo                # load demo surveys
php erpat db:seed SurveysDemo --dry-run      # preview only
php erpat db:seed SurveysDemo --remove       # soft-delete the demo rows
php erpat module:test Surveys                # run the module's tests

Report a content problem