curl --request PUT \
--url https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "simple",
"name": "<string>",
"description": "<string>",
"isRequired": true,
"mappedToPropertyId": "<string>",
"questionTemplateId": "<string>"
}
'import requests
url = "https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}"
payload = {
"category": "simple",
"name": "<string>",
"description": "<string>",
"isRequired": True,
"mappedToPropertyId": "<string>",
"questionTemplateId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category: 'simple',
name: '<string>',
description: '<string>',
isRequired: true,
mappedToPropertyId: '<string>',
questionTemplateId: '<string>'
})
};
fetch('https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}', 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.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'category' => 'simple',
'name' => '<string>',
'description' => '<string>',
'isRequired' => true,
'mappedToPropertyId' => '<string>',
'questionTemplateId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}"
payload := strings.NewReader("{\n \"category\": \"simple\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isRequired\": true,\n \"mappedToPropertyId\": \"<string>\",\n \"questionTemplateId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"simple\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isRequired\": true,\n \"mappedToPropertyId\": \"<string>\",\n \"questionTemplateId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category\": \"simple\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isRequired\": true,\n \"mappedToPropertyId\": \"<string>\",\n \"questionTemplateId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"category": "simple",
"type": "SHORT_FORM",
"name": "<string>",
"isRequired": true,
"id": "<string>",
"workspaceId": "<string>",
"description": "<string>",
"mappedToPropertyId": "<string>",
"questionTemplateId": "<string>"
}{
"errors": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}"Unauthorized""Forbidden""{Resource} not found""Study is not in draft status""Too Many Requests""Internal Server Error"Update a screener question
Fully replace a single screener question. Options are regenerated; the question id is stable. Questions created from a template must pass their questionTemplateId. Not available for survey studies.
curl --request PUT \
--url https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "simple",
"name": "<string>",
"description": "<string>",
"isRequired": true,
"mappedToPropertyId": "<string>",
"questionTemplateId": "<string>"
}
'import requests
url = "https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}"
payload = {
"category": "simple",
"name": "<string>",
"description": "<string>",
"isRequired": True,
"mappedToPropertyId": "<string>",
"questionTemplateId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category: 'simple',
name: '<string>',
description: '<string>',
isRequired: true,
mappedToPropertyId: '<string>',
questionTemplateId: '<string>'
})
};
fetch('https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}', 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.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'category' => 'simple',
'name' => '<string>',
'description' => '<string>',
'isRequired' => true,
'mappedToPropertyId' => '<string>',
'questionTemplateId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}"
payload := strings.NewReader("{\n \"category\": \"simple\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isRequired\": true,\n \"mappedToPropertyId\": \"<string>\",\n \"questionTemplateId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"simple\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isRequired\": true,\n \"mappedToPropertyId\": \"<string>\",\n \"questionTemplateId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallyuxr.com/api/public/v1/studies/{studyId}/screener/questions/{questionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category\": \"simple\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isRequired\": true,\n \"mappedToPropertyId\": \"<string>\",\n \"questionTemplateId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"category": "simple",
"type": "SHORT_FORM",
"name": "<string>",
"isRequired": true,
"id": "<string>",
"workspaceId": "<string>",
"description": "<string>",
"mappedToPropertyId": "<string>",
"questionTemplateId": "<string>"
}{
"errors": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}"Unauthorized""Forbidden""{Resource} not found""Study is not in draft status""Too Many Requests""Internal Server Error"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- Option 1
- Option 2
- Option 3
- Option 4
The full replacement body for a single question, discriminated by category. Template-sourced questions are updated through their concrete category with questionTemplateId set. Matrix questions are addressed by their parent question id.
simple Whether the question collects short text, long text, a date, or a number
SHORT_FORM, LONG_FORM, DATE, NUMBER The question prompt
Optional helper text shown beneath the question prompt
Whether a response is required before the screener can be submitted
Map the response to a person property
Required when updating a question that was created from a template: pass the existing template id to keep the link. Cannot be added to or changed on other questions.
Response
The updated question
- Option 1
- Option 2
- Option 3
- Option 4
A screener question. Template-sourced questions are returned expanded into their concrete category.
simple Whether the question collects short text, long text, a date, or a number
SHORT_FORM, LONG_FORM, DATE, NUMBER The question prompt
Whether a response is required before the screener can be submitted
The question id
The workspace that owns the question
Optional helper text shown beneath the question prompt
Map the response to a person property
Present for questions created from a template