Coding agent documentation index Fetch the complete documentation index at: https://docs.worklittle.com/docs-agent-manifest.json Use this file to discover all available pages before exploring further.
Surveys
Create and manage organization surveys, collect public responses, and list results via REST, SDK, or CLI.
Overview
Manage surveys with a Bearer key (employees:read). Collect answers on public routes without a key.
Authentication
| Call | Auth | Scope | | --- | --- | --- | | List / create / edit / delete / responses | Bearer `sk-wl-api01-...` | `employees:read` | | Public form + submit | None | - |
API keys skip browser CSRF. Session cookies from the Worklittle Business work on the same paths.
Examples
List surveys
curl -s "https://api.worklittle.com/business/surveys" \
-H "Authorization: Bearer $WORKLITTLE_API_KEY"
Get one survey
curl -s "https://api.worklittle.com/business/surveys/SURVEY_ID" \
-H "Authorization: Bearer $WORKLITTLE_API_KEY"
Public form and submit (no key)
curl -s "https://api.worklittle.com/business/surveys/public/SURVEY_ID"
curl -s -X POST "https://api.worklittle.com/business/surveys/public/SURVEY_ID/responses" \
-H "Content-Type: application/json" \
-d '{"answers":{"q1":"Yes"}}'
List responses
curl -s "https://api.worklittle.com/business/surveys/SURVEY_ID/responses" \
-H "Authorization: Bearer $WORKLITTLE_API_KEY"
Manage routes
| Method | Path | Description | | --- | --- | --- | | GET | `/business/surveys` | List surveys | | POST | `/business/surveys` | Create | | GET | `/business/surveys/:id` | Get survey | | PATCH | `/business/surveys/:id` | Update | | DELETE | `/business/surveys/:id` | Delete | | POST | `/business/surveys/:id/duplicate` | Duplicate | | GET | `/business/surveys/:id/responses` | List responses | | PATCH | `/business/surveys/:id/responses/bulk` | Bulk update responses | | DELETE | `/business/surveys/:id/responses/bulk` | Bulk delete responses | | PATCH | `/business/surveys/:id/response-notify` | Response notification settings | | GET / PUT | `/business/surveys/:id/shares` | Share targets |
Public routes
| Method | Path | Description | | --- | --- | --- | | GET | `/business/surveys/public/:id` | Form schema | | POST | `/business/surveys/public/:id/responses` | Submit answers |
Public GET fails if the survey is closed or not shared. Submit body is JSON with an answers map keyed by question id.
SDK
After building the monorepo client (SDK):
import { createWorklittle } from "worklittle";
const wl = createWorklittle({ apiKey: process.env.WORKLITTLE_API_KEY });
const list = await wl.surveys.list();
const one = await wl.surveys.get("SURVEY_ID");
const created = await wl.surveys.create({ title: "Engagement pulse" });
Errors
| Cause | Result | | --- | --- | | Manage route without `employees:read` | **403** | | Public submit against a closed survey | **4xx** from the handler | | Answer keys that are not question ids | Validation error |