Get a signed download URL for a document
curl --request POST \
--url https://api.trycomp.ai/v1/knowledge-base/documents/{documentId}/download \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_abc123def456"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({organizationId: 'org_abc123def456'})
};
fetch('https://api.trycomp.ai/v1/knowledge-base/documents/{documentId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/knowledge-base/documents/{documentId}/download"
payload = { "organizationId": "org_abc123def456" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Knowledge Base
Get a signed download URL for a document | Comp AI API
Get a signed download URL for a document in Comp AI. Upload source documents, process them for retrieval, and manage reusable manual answers that power.
POST
/
v1
/
knowledge-base
/
documents
/
{documentId}
/
download
Get a signed download URL for a document
curl --request POST \
--url https://api.trycomp.ai/v1/knowledge-base/documents/{documentId}/download \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_abc123def456"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({organizationId: 'org_abc123def456'})
};
fetch('https://api.trycomp.ai/v1/knowledge-base/documents/{documentId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/knowledge-base/documents/{documentId}/download"
payload = { "organizationId": "org_abc123def456" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
API key for authentication
Path Parameters
Body
application/json
No fields are required — the document comes from the path and the organization from your API key or session.
Auto-resolved from your API key / session. You can omit this; the server ignores it and always uses the authenticated organization.
Example:
"org_abc123def456"
Response
200
Signed download URL generated
Was this page helpful?

