import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/test-runs/"
payload = {
"language": "fr",
"start_topic_index": 0
}
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({language: 'fr', start_topic_index: 0})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/test-runs/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/test-runs/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "fr",
"start_topic_index": 0
}
'{
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interview_url": "<string>"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Start a test run of an interview draft
Rehearse a draft before sending it (CLA-1834). Admin only. Creates an
ordinary interview conversation of the draft’s type — same prompt, tools and
page as a real interview — assigned to the requesting user, linked to the draft
(test_of_draft) and hidden from every interview list, count and search. No
invitation, email, notification or interview analytics are produced; the run is
deleted with the draft (sending a draft deletes it). The draft is not modified.
start_topic_index (guided drafts) opens the run on that topic: earlier topics
are seeded but marked skipped, the interview opener is assumed to have already
happened (the first-message flow is skipped), and the run’s first turn is a
system note telling the interviewer to resume on that topic — so the run reads
as a real interview would at that point. language is the language the run is
conducted in and — unlike a real interview — outranks the tester’s own
preference; null keeps auto-detection.
During the run, the stream endpoint accepts jump_to_topic_id (a later open
topic of the run) to skip ahead: the topics in between are marked skipped and
the interviewer is told to transition on that turn.
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/test-runs/"
payload = {
"language": "fr",
"start_topic_index": 0
}
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({language: 'fr', start_topic_index: 0})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/test-runs/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/test-runs/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "fr",
"start_topic_index": 0
}
'{
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interview_url": "<string>"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Authorizations
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..