Answers/How to collect survey responses via API

How to collect survey responses via API

Updated March 2026

Three steps: create the survey, share the URL, read the data.

The fast way is Sutrena's survey template. Call POST /api/forms/from-template with templateId "survey" and you get a form with satisfaction rating, recommendation likelihood, and an open-ended improvement field. Want custom questions? Call POST /api/forms with your own field definitions instead. Select fields with predefined options work well for constraining responses.

Once created, you get two URLs: the hosted form (sutrena.com/f/{id}) for browser responses, and the submission endpoint (/api/forms/{id}/submit) for programmatic submissions. Most surveys use the hosted URL -- share it via email, social media, or embed it on your site.

For programmatic collection -- submitting from a mobile app or custom frontend -- POST to /api/forms/{id}/submit with field values as JSON. This endpoint is public, no auth required, so your frontend can submit directly without exposing API keys.

To read responses, call GET /api/forms/{id}/submissions with your API key. You get all submissions with timestamps and pagination. Or build a dashboard with pie charts for categorical breakdowns, bar charts for comparisons, line charts for response volume over time.

Want real-time analysis? Set up a webhook for each new response. Pipe survey data into your own database, a spreadsheet, or an analytics tool without polling. Builder ($9/month), Pro, and Scale plans support CSV export.

The survey template pairs the form with a matching dashboard, so you get an instant analytics view with satisfaction distribution, recommendation breakdown, and a response timeline.

# Create a survey from template
curl -X POST https://sutrena.com/api/forms/from-template \
  -H "Authorization: Bearer st_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "templateId": "survey" }'

# Read collected responses
curl https://sutrena.com/api/forms/FORM_ID/submissions \
  -H "Authorization: Bearer st_live_your_key"

Ready to build?

Get a trial API key instantly — no signup required.

How to collect survey responses via API — Sutrena | Sutrena