Studies
Customize Study Plan
Run one resumable turn through the same planning agent and tools used by the dashboard’s Customize Plan page.
The conversation id is stored on the study. Questions are returned to the caller; completed plan markdown is persisted automatically.
POST
/
api
/
public
/
v1
/
studies
/
{study_id}
/
customize-plan
Customize Study Plan
curl --request POST \
--url https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"concept_image": {
"data_base64": "<string>",
"filename": "<string>",
"label": "<string>"
}
}
'import requests
url = "https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan"
payload = {
"message": "<string>",
"concept_image": {
"data_base64": "<string>",
"filename": "<string>",
"label": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
concept_image: {data_base64: '<string>', filename: '<string>', label: '<string>'}
})
};
fetch('https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan', 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.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan",
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([
'message' => '<string>',
'concept_image' => [
'data_base64' => '<string>',
'filename' => '<string>',
'label' => '<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.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"concept_image\": {\n \"data_base64\": \"<string>\",\n \"filename\": \"<string>\",\n \"label\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"concept_image\": {\n \"data_base64\": \"<string>\",\n \"filename\": \"<string>\",\n \"label\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"concept_image\": {\n \"data_base64\": \"<string>\",\n \"filename\": \"<string>\",\n \"label\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"response_type": "question",
"conversation_id": "<string>",
"study": {
"id": "<string>",
"provisioning_status": "draft",
"name": "<string>",
"study_type": "<string>",
"recruiting_method": "<string>",
"interview_format": "chat",
"voice": "male",
"language": "<string>",
"expected_duration_seconds": 900,
"byop_config": {
"incentive_amount": 123,
"is_incentives_enabled": true,
"auto_send_incentives": true
},
"study_link": "<string>",
"missing_requirements": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Authenticate with an API key (prefixed ui_sk_) or a JWT token from the dashboard.
Path Parameters
Body
application/json
One user turn for the stateful Customize Plan conversation.
Response
Successful Response
The next Customize Plan message plus the study's resulting state.
Available options:
question, message, study_plan Lightweight study shape returned by the list endpoint (heavy fields such as the study plan and screener questions are stripped — fetch by id).
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Customize Study Plan
curl --request POST \
--url https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"concept_image": {
"data_base64": "<string>",
"filename": "<string>",
"label": "<string>"
}
}
'import requests
url = "https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan"
payload = {
"message": "<string>",
"concept_image": {
"data_base64": "<string>",
"filename": "<string>",
"label": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
concept_image: {data_base64: '<string>', filename: '<string>', label: '<string>'}
})
};
fetch('https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan', 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.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan",
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([
'message' => '<string>',
'concept_image' => [
'data_base64' => '<string>',
'filename' => '<string>',
'label' => '<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.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"concept_image\": {\n \"data_base64\": \"<string>\",\n \"filename\": \"<string>\",\n \"label\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"concept_image\": {\n \"data_base64\": \"<string>\",\n \"filename\": \"<string>\",\n \"label\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userintuition.ai/api/public/v1/studies/{study_id}/customize-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"concept_image\": {\n \"data_base64\": \"<string>\",\n \"filename\": \"<string>\",\n \"label\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"response_type": "question",
"conversation_id": "<string>",
"study": {
"id": "<string>",
"provisioning_status": "draft",
"name": "<string>",
"study_type": "<string>",
"recruiting_method": "<string>",
"interview_format": "chat",
"voice": "male",
"language": "<string>",
"expected_duration_seconds": 900,
"byop_config": {
"incentive_amount": 123,
"is_incentives_enabled": true,
"auto_send_incentives": true
},
"study_link": "<string>",
"missing_requirements": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
