Upload an attachment to any supported entity | Comp AI API
Upload a base64-encoded file and attach it to a task, vendor, risk, comment, or other supported entity type. The file is uploaded to S3 and a database.
Documentation Index
Fetch the complete documentation index at: https://www.trycomp.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API key for authentication
Body
Name of the file
255"document.pdf"
MIME type of the file
"application/pdf"
Base64 encoded file data
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
ID of the entity to attach the file to
"tsk_abc123def456"
Type of entity the attachment belongs to
task, vendor, risk, comment, trust_nda, task_item, background_check, employment_onboard, employment_offboard, offboarding_checklist "task"
Description of the attachment
500"Meeting notes from Q4 planning session"
User ID of the user uploading the attachment (required for API key auth, ignored for JWT auth)
"usr_abc123def456"
Response
Attachment uploaded successfully
Unique identifier for the attachment
"att_abc123def456"
Original filename
"document.pdf"
File type/MIME type
"application/pdf"
File size in bytes
1024000
Signed URL for downloading the file (temporary)
"https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=..."
Upload timestamp
"2024-01-15T10:30:00Z"

