Post External Screener Answers
Post a participant’s answers from your own screener — external-screener organizations only.
Rows upsert idempotently per questionId and must reference the project’s declared externalQuestions.
The application reads as submitted once every declared question has an answer, or earlier when the payload
sets complete: true; the overall verdict is derived from the per-row qualifies flags.
Post the answers BEFORE redirecting the participant back to the Respondent apply page they came from.
Corrections are just another POST with the corrected rows.
curl --request POST \
--url https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-secret: <x-api-secret>' \
--data '
{
"answers": [
{
"questionId": "<string>",
"qualifies": true,
"answerValues": [
"<string>"
],
"answerText": "<string>"
}
]
}
'import requests
url = "https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers"
payload = { "answers": [
{
"questionId": "<string>",
"qualifies": True,
"answerValues": ["<string>"],
"answerText": "<string>"
}
] }
headers = {
"x-api-key": "<x-api-key>",
"x-api-secret": "<x-api-secret>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-secret': '<x-api-secret>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
answers: [
{
questionId: '<string>',
qualifies: true,
answerValues: ['<string>'],
answerText: '<string>'
}
]
})
};
fetch('https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answers' => [
[
'questionId' => '<string>',
'qualifies' => true,
'answerValues' => [
'<string>'
],
'answerText' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-secret: <x-api-secret>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"questionId\": \"<string>\",\n \"qualifies\": true,\n \"answerValues\": [\n \"<string>\"\n ],\n \"answerText\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-secret", "<x-api-secret>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers")
.header("x-api-key", "<x-api-key>")
.header("x-api-secret", "<x-api-secret>")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"questionId\": \"<string>\",\n \"qualifies\": true,\n \"answerValues\": [\n \"<string>\"\n ],\n \"answerText\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-secret"] = '<x-api-secret>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answers\": [\n {\n \"questionId\": \"<string>\",\n \"qualifies\": true,\n \"answerValues\": [\n \"<string>\"\n ],\n \"answerText\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyBody
Answer rows for this participant. Rows upsert idempotently per
questionId — re-sending a row replaces the earlier one, so corrections
are just another POST.
Hide child attributes
Hide child attributes
Must reference a declared Project.externalQuestions[].questionId.
Every row must also carry content: at least one of answerValues
(non-empty array) or answerText (non-empty string).
Your per-question verdict for this participant.
Selected option values / structured values (multi-select friendly).
Required (non-empty) when answerText is not provided.
Free-text answer for TEXT/OTHER questions.
Required (non-empty) when answerValues is not provided.
Completion signal. The application reads as submitted once the
accumulated answers cover every declared externalQuestions entry, or
earlier when this flag is true (use it when participants may skip
optional questions on your side). Until then the response stays in the
external screener.
Response
Was this page helpful?
curl --request POST \
--url https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-secret: <x-api-secret>' \
--data '
{
"answers": [
{
"questionId": "<string>",
"qualifies": true,
"answerValues": [
"<string>"
],
"answerText": "<string>"
}
]
}
'import requests
url = "https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers"
payload = { "answers": [
{
"questionId": "<string>",
"qualifies": True,
"answerValues": ["<string>"],
"answerText": "<string>"
}
] }
headers = {
"x-api-key": "<x-api-key>",
"x-api-secret": "<x-api-secret>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-secret': '<x-api-secret>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
answers: [
{
questionId: '<string>',
qualifies: true,
answerValues: ['<string>'],
answerText: '<string>'
}
]
})
};
fetch('https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answers' => [
[
'questionId' => '<string>',
'qualifies' => true,
'answerValues' => [
'<string>'
],
'answerText' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-secret: <x-api-secret>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"questionId\": \"<string>\",\n \"qualifies\": true,\n \"answerValues\": [\n \"<string>\"\n ],\n \"answerText\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-secret", "<x-api-secret>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers")
.header("x-api-key", "<x-api-key>")
.header("x-api-secret", "<x-api-secret>")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"questionId\": \"<string>\",\n \"qualifies\": true,\n \"answerValues\": [\n \"<string>\"\n ],\n \"answerText\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.respondent.io/v1/projects/{projectId}/screener-responses/{screenerResponseId}/external-screener-answers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-secret"] = '<x-api-secret>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answers\": [\n {\n \"questionId\": \"<string>\",\n \"qualifies\": true,\n \"answerValues\": [\n \"<string>\"\n ],\n \"answerText\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body