curl --request POST \
--url https://api.trycomp.ai/v1/evidence-forms/{formType}/upload-submission \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileName": "network_diagram.png",
"fileType": "image/png"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: 'network_diagram.png', fileType: 'image/png'})
};
fetch('https://api.trycomp.ai/v1/evidence-forms/{formType}/upload-submission', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/evidence-forms/{formType}/upload-submission"
payload = {
"fileName": "network_diagram.png",
"fileType": "image/png"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Upload a file as an evidence submission | Comp AI API
Upload a file and create a submission for the given form type, bypassing form-specific validation. Provide exactly one of fileData (base64) or s3Key.
curl --request POST \
--url https://api.trycomp.ai/v1/evidence-forms/{formType}/upload-submission \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileName": "network_diagram.png",
"fileType": "image/png"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: 'network_diagram.png', fileType: 'image/png'})
};
fetch('https://api.trycomp.ai/v1/evidence-forms/{formType}/upload-submission', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/evidence-forms/{formType}/upload-submission"
payload = {
"fileName": "network_diagram.png",
"fileType": "image/png"
}
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
Headers
Organization ID (required for session auth, optional for API key auth)
Path Parameters
Slug of the evidence form. Call GET /v1/evidence-forms to see every form with its title.
board-meeting, it-leadership-meeting, risk-committee-meeting, meeting, access-request, whistleblower-report, penetration-test, rbac-matrix, infrastructure-inventory, employee-performance-evaluation, network-diagram, tabletop-exercise, account-types Body
The file to store as the submission. Provide exactly one of fileData or s3Key.
Original file name, stored for display and download.
"network_diagram.png"
MIME type of the file.
"image/png"
Base64-encoded file contents, for the web UI and direct callers. AI/MCP clients should upload via /v1/uploads/presign (purpose=evidence) and pass s3Key instead.
"iVBORw0KGgo="
Key of a file already uploaded via /v1/uploads/presign (purpose=evidence). The server reads the bytes from storage, so no base64 travels through the client.
"org_abc123/uploads/evidence/1735000000000-network_diagram.png"
Response
Was this page helpful?

