Upload an additional trust portal document
curl --request POST \
--url https://api.trycomp.ai/v1/trust-portal/documents/upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_6914cd0e16e4c7dccbb54426",
"fileName": "security-overview.pdf",
"fileData": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organizationId: 'org_6914cd0e16e4c7dccbb54426',
fileName: 'security-overview.pdf',
fileData: '<string>'
})
};
fetch('https://api.trycomp.ai/v1/trust-portal/documents/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/trust-portal/documents/upload"
payload = {
"organizationId": "org_6914cd0e16e4c7dccbb54426",
"fileName": "security-overview.pdf",
"fileData": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "tdoc_abc123",
"name": "security-overview.pdf",
"createdAt": "2026-01-02T10:15:00.000Z",
"updatedAt": "2026-01-02T10:15:00.000Z",
"description": "Overview of our security program"
}Trust Portal
Upload an additional trust portal document | Comp AI API
Upload an additional trust portal document in Comp AI. Configure the live Trust Center, custom domain, public overview, FAQs, compliance resources.
POST
/
v1
/
trust-portal
/
documents
/
upload
Upload an additional trust portal document
curl --request POST \
--url https://api.trycomp.ai/v1/trust-portal/documents/upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_6914cd0e16e4c7dccbb54426",
"fileName": "security-overview.pdf",
"fileData": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organizationId: 'org_6914cd0e16e4c7dccbb54426',
fileName: 'security-overview.pdf',
fileData: '<string>'
})
};
fetch('https://api.trycomp.ai/v1/trust-portal/documents/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/trust-portal/documents/upload"
payload = {
"organizationId": "org_6914cd0e16e4c7dccbb54426",
"fileName": "security-overview.pdf",
"fileData": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "tdoc_abc123",
"name": "security-overview.pdf",
"createdAt": "2026-01-02T10:15:00.000Z",
"updatedAt": "2026-01-02T10:15:00.000Z",
"description": "Overview of our security program"
}Authorizations
API key for authentication
Body
application/json
Organization ID that owns the document
Example:
"org_6914cd0e16e4c7dccbb54426"
Original file name
Example:
"security-overview.pdf"
Base64-encoded file contents (no data URL prefix)
MIME type (optional)
Example:
"application/pdf"
Optional description shown in the trust portal
Example:
"Overview of our security program"
Response
201 - application/json
Document uploaded successfully
Was this page helpful?

