Send questionnaire responses
Record responses that your application collected. Each request records one repetition: one participant’s pass through one questionnaire. The request creates the test, questionnaire, questions, and participant if RedJade does not have them yet. Existing tests and questionnaires must have been created by this API; tests built in RedJade or imported from files cannot receive these writes.
POST responses
Section titled “POST responses”POST /api/v1/tests/{test_key}/responses
Request fields
Section titled “Request fields”| Field | Type | Required | Meaning |
|---|---|---|---|
test_key (path) |
string | Yes | The test’s key; an unknown key creates a test |
context.test.owner_email |
string | When creating a test | An active RedJade user in your company who will own the test |
participant.key |
string | No | Your ID for the person; omitting participant creates an anonymous participant |
questionnaire.key |
string | Yes | The questionnaire’s key within the test |
questionnaire.questions |
array | No | Definitions using the accepted question types |
questionnaire.responses |
array | Yes | One entry per question, with its key and response |
questionnaire.repetition.key |
string | No | Reuse a key to replace its responses; omit it to add a repetition |
samples |
array | No | Zero or one sample |
See the field reference for nested fields, defaults, and limits.
Request example: poll vote
Section titled “Request example: poll vote”Save this document as poll-response.json. It defines a one-question poll and records one member’s vote. The URL names the test, here community-poll:
{ "context": { "test": { "name": "Community poll", "owner_email": "jane.doe@example.com" } }, "participant": { "key": "member-17" }, "questionnaire": { "key": "purchase-poll",31 collapsed lines
"name": "Purchase intent", "questions": [ { "key": "purchase-intent", "type": "choice", "exclusive": true, "text": "Would you buy this product?", "options": [ { "key": "yes", "name": "Yes" }, { "key": "no", "name": "No" } ] } ], "repetition": { "key": "purchase-poll-member-17" }, "responses": [ { "question_key": "purchase-intent", "response": [ "yes" ] } ] }}The first request to a test key that RedJade does not have creates the test. context.test.name gives it a display name, and context.test.owner_email names the RedJade user who owns it. The owner is required when a request creates a test, and must be the email address of an active user in your company. The test appears in RedJade as if that user had created it, so they can open it and share it with others. Later votes can leave out context and questions and send only the keys and the response.
curl --fail-with-body --request POST \ 'https://app.redjade.net/api/v1/tests/community-poll/responses' \ --header "Authorization: Bearer $REDJADE_TOKEN" \ --header 'Content-Type: application/json' \ --data-binary @poll-response.jsonResponse
Section titled “Response”RedJade returns HTTP 201 and the keys of what it recorded:
{ "status": "created", "context": { "test": { "key": "community-poll" } }, "participant": { "key": "member-17", "code": "1001" }, "questionnaire": { "key": "purchase-poll", "repetition": { "key": "purchase-poll-member-17", "number": 1 } }}| Field | Type | Meaning |
|---|---|---|
status |
string | created for a new repetition or replaced for an existing one |
context.test.key |
string | The test that holds the repetition |
participant.key, participant.code |
string | The participant’s identity and assigned code |
questionnaire.key |
string | The questionnaire that holds the responses |
questionnaire.repetition.key |
string | Use this key to replace the repetition |
questionnaire.repetition.number |
integer | The participant’s repetition number |
Change a vote or retry
Section titled “Change a vote or retry”questionnaire.repetition.key decides whether a request adds a repetition or replaces one.
| You send | Result |
|---|---|
| The same repetition key | RedJade replaces that repetition’s responses and returns 200 with status: "replaced" |
| A new repetition key | RedJade adds a repetition for the participant and returns 201 |
| No repetition key | RedJade adds a repetition and returns the key it assigned |
For a poll with one vote per member, build the key from the poll and the member, as in the example. Sending the document again with "response": ["no"] changes the vote. Sending it again unchanged after a lost HTTP response is safe.
Only repetitions imported through this API can be replaced. Responses collected in RedJade, including a retake of an imported repetition, are protected and return 409.
A replacement overwrites every response in the repetition. Send all the responses you want to keep. See Keys and replacement.
Get the poll’s results in the same request
Section titled “Get the poll’s results in the same request”Send a sample evaluation
Section titled “Send a sample evaluation”Add samples when the responses are about a product. This document records three responses about one cookie:
{ "context": { "test": { "name": "Cookie test", "owner_email": "jane.doe@example.com" } }, "participant": { "key": "member-17" }, "samples": [ {84 collapsed lines
"key": "cookie-a", "name": "Chunky chocolate chip" } ], "questionnaire": { "key": "cookie-evaluation", "name": "Cookie evaluation", "locale": "en_US", "questions": [ { "key": "overall-liking", "type": "choice", "exclusive": true, "text": "How much did you like this cookie?", "options": [ { "key": "like-5", "name": "Like very much", "score": 5 }, { "key": "like-4", "name": "Like slightly", "score": 4 }, { "key": "like-3", "name": "Neither like nor dislike", "score": 3 }, { "key": "like-2", "name": "Dislike slightly", "score": 2 }, { "key": "like-1", "name": "Dislike very much", "score": 1 } ] }, { "key": "sweetness", "type": "numeric", "text": "How sweet was it, from 0 to 100?", "min": 0, "max": 100 }, { "key": "comments", "type": "text", "text": "What did you think of it?" } ], "repetition": { "key": "member-17-cookie-a-1", "started_at": "2026-12-01T16:01:12Z", "completed_at": "2026-12-01T16:05:00Z" }, "responses": [ { "question_key": "overall-liking", "response": [ { "option_key": "like-4", "answered_at": "2026-12-01T16:02:10Z" } ] }, { "question_key": "sweetness", "response": [ 62 ] }, { "question_key": "comments", "response": [ "Big chocolate chunks, a little too sweet for me." ] } ] }}Send sample-evaluation.json to /api/v1/tests/cookie-test/responses.
overall-likingis achoicequestion. Each option’sscoreis the number it stands for in analysis.sweetnessandcommentsuse the short form: a bare number and a bare string.repetition.started_atandcompleted_atrecord when the participant took the questionnaire. Without them, RedJade uses the time it receives the request.
See Question types for each type’s response shape and the types accepted when sending.
Send a second sample for the same participant as a second request with the same participant.key, a different sample, and a new repetition key.
Request behavior
Section titled “Request behavior”Participant demographics
Section titled “Participant demographics”Responses requests ignore participant.demographics.values. The single-request participant endpoint is planned and unavailable. To update demographics in an existing event, use Import participants.
What the request accepts
Section titled “What the request accepts”| Item | Accepted |
|---|---|
| Question types | choice, numeric, and text |
| Samples per request | Zero or one |
| Request body | Up to 1 MiB |
Read-only fields such as notification and participant.outcome |
Ignored |
context.test.key |
Optional. If you send it, it must match the test in the URL. |
The whole request is validated before anything is saved. A request that fails leaves existing data unchanged.
Concurrent requests
Section titled “Concurrent requests”Imports to the same test run one at a time. A request waits at most two seconds for each database lock. If a lock stays busy, RedJade rolls the request back and returns 429 with error: "import_busy" and Retry-After: 2. Wait at least that many seconds, then retry with the same repetition key. Limit parallel requests to one per test to avoid contention.
Errors
Section titled “Errors”| Status | Cause |
|---|---|
429 |
A database lock stayed busy. Follow Retry-After and reuse the repetition key. |
409 |
A test, questionnaire, or repetition was not created by this API, or a key conflicts with an existing record, such as a replacement that names a different questionnaire or sample |
422 |
A field, type, or option is invalid. The body’s path names the field. |
Earlier imports without an API ownership record also return 409. Contact Support before continuing an earlier import; do not change keys just to bypass the error if that would duplicate data.
See API errors and the field reference.
What the request does not do
Section titled “What the request does not do”Sending responses records collected data. It does not run screening, count against a quota, or send notifications.