Attach Sources documents to a draft
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/local-documents/attach-from-sources/"
payload = { "document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
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({document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/local-documents/attach-from-sources/', 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}/local-documents/attach-from-sources/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'{
"attached": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"file": "<string>",
"type": "agent_settings",
"agent_settings": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"coach_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_session": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cross_store_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interview_draft": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_document": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claude_file_id": "<string>",
"source": "uploaded",
"document_text": "<string>",
"summary_text": "<string>",
"short_summary_text": "<string>",
"processing_status": "<string>",
"page_count": 123,
"character_count": 123,
"preview_pdf_url": "<string>",
"size_warning": "<string>",
"version_number": 123,
"total_versions": 123
}
],
"skipped": [
{
"id": "<string>",
"name": "<string>",
"reason": "<string>"
}
]
}{
"attached": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"file": "<string>",
"type": "agent_settings",
"agent_settings": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"coach_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_session": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cross_store_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interview_draft": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_document": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claude_file_id": "<string>",
"source": "uploaded",
"document_text": "<string>",
"summary_text": "<string>",
"short_summary_text": "<string>",
"processing_status": "<string>",
"page_count": 123,
"character_count": 123,
"preview_pdf_url": "<string>",
"size_warning": "<string>",
"version_number": 123,
"total_versions": 123
}
],
"skipped": [
{
"id": "<string>",
"name": "<string>",
"reason": "<string>"
}
]
}{
"error": "User not found"
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Interviews
Attach Sources documents to a draft
Copy library Documents onto the draft as reference documents and re-parse them
like a fresh upload (product decision: one consistent shape for the interviewing
agent). Admin only. Archived documents, documents already attached, and
over-budget batches (max 20 per call, 128 MiB) are reported in skipped.
POST
/
projects
/
{project_id}
/
interview-drafts
/
{draft_id}
/
local-documents
/
attach-from-sources
/
Attach Sources documents to a draft
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/local-documents/attach-from-sources/"
payload = { "document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
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({document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interview-drafts/{draft_id}/local-documents/attach-from-sources/', 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}/local-documents/attach-from-sources/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'{
"attached": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"file": "<string>",
"type": "agent_settings",
"agent_settings": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"coach_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_session": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cross_store_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interview_draft": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_document": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claude_file_id": "<string>",
"source": "uploaded",
"document_text": "<string>",
"summary_text": "<string>",
"short_summary_text": "<string>",
"processing_status": "<string>",
"page_count": 123,
"character_count": 123,
"preview_pdf_url": "<string>",
"size_warning": "<string>",
"version_number": 123,
"total_versions": 123
}
],
"skipped": [
{
"id": "<string>",
"name": "<string>",
"reason": "<string>"
}
]
}{
"attached": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"file": "<string>",
"type": "agent_settings",
"agent_settings": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"coach_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_session": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cross_store_conversation": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interview_draft": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_document": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claude_file_id": "<string>",
"source": "uploaded",
"document_text": "<string>",
"summary_text": "<string>",
"short_summary_text": "<string>",
"processing_status": "<string>",
"page_count": 123,
"character_count": 123,
"preview_pdf_url": "<string>",
"size_warning": "<string>",
"version_number": 123,
"total_versions": 123
}
],
"skipped": [
{
"id": "<string>",
"name": "<string>",
"reason": "<string>"
}
]
}{
"error": "User not found"
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Authorizations
BearerAuthTokenAuth
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..
Body
application/json