Collect responses
Give your artifact a form and read the answers back.
guide~2 minVerified v0.127.10

You will have a page that collects answers and a place to read them.
One policy
The agent publishes one policy with the artifact. This is an answer sheet: one row per person, which they can come back and change.
{
"policyVersion": 1,
"writes": "upsert",
"perUser": "single",
"read": "own",
"retentionDays": null,
"recordCap": { "perVisitor": 1, "perArtifact": 500 },
"fields": [
{
"name": "attending",
"type": "boolean",
"required": false,
"pii": "none",
"description": "A yes or no answer."
},
{
"name": "guests",
"type": "integer",
"required": false,
"min": 0,
"max": 10,
"pii": "none",
"description": "Optional, so each answer can be saved on its own."
}
]
}Fields can be added later; previously collected fields keep their meaning.
Pick the shape
| What a row is | perUser | writes | Also |
|---|---|---|---|
| one person's answers | single | upsert | recordCap.perVisitor: 1, every field optional |
| one event: an order, a vote, a guestbook line | many | append-only | uniqueBy makes it one answer per question, for visitors (the host's own stream is never limited) |
| an item a person keeps and edits | many | upsert | |
| a thing everyone edits together: a plan, a board | shared | upsert | key names the field that identifies it |
read is what a visitor reads back: admin, nothing; own, their own rows; contributors, everyone's once they have answered; public, everyone's. You always read every row. Other people's rows reach a visitor with anything about a person hidden, and a public text field holds at most 280 characters.
- Saving again merges into the same row. An optional field sent empty (
null) is cleared; a field left out is kept. - Editing a whole form can also replace the row by its id. That replaces everything: a field the form leaves out is removed. Under
uniqueBythe replacement must carry the row's own value of that field: an answer can change, but never move to another question. - Pick all that apply is one yes-or-no field per option, so each is counted on its own.
- Only while a question is open: a stream can take answers during one phase only, the host's to move. See Live rooms.
Shared and live pages has a prompt for each shape.
Read, export, erase
The Data tab shows responses and the schema to people allowed to work with the data. The owner sees raw answers. The agent can download an export through the responses export endpoint; the export follows its access, including any masking. super_data lets the owner's agent read answers back.
Erasure removes stored responses, rather than only hiding a table row. A visitor can erase their own data; the owner can erase a named response. Exported copies are separate files.
Size, field, retention and row ceilings live in Limits.
Check it worked
A submitted answer appears on Data. The export includes the response. After erasure, reading it back no longer returns that record.
