v56

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014121451.1 MB
Attachments

Upload an attachment to any supported entity

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 record is created.

post/v1/attachments

Request body

fileNamestring required

Name of the file

fileTypestring required

MIME type of the file

fileDatastring

Base64-encoded file contents. For the web UI / direct callers. AI/MCP clients should instead upload via /v1/uploads/presign (purpose=attachment) and pass s3Key — base64 through an LLM is impractically slow and times out. Provide exactly one of fileData or s3Key.

s3Keystring

Key of a file already uploaded via /v1/uploads/presign (purpose=attachment). The server fetches the bytes from storage — no base64 needed. Provide exactly one of fileData or s3Key.

descriptionstring

Description of the attachment

userIdstring

User ID of the user uploading the attachment (required for API key auth, ignored for JWT auth)

entityIdstring required

ID of the entity to attach the file to

entityType'task' | 'vendor' | 'risk' | 'comment' | 'trust_nda' | 'task_item' | 'background_check' | 'employment_onboard' | 'employment_offboard' | 'offboarding_checklist' required

Type of entity the attachment belongs to

Example request

{
  "fileName": "document.pdf",
  "fileType": "application/pdf",
  "fileData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
  "s3Key": "org_abc123/uploads/attachment/1700000000000-rbac-matrix.xlsx",
  "description": "Meeting notes from Q4 planning session",
  "userId": "usr_abc123def456",
  "entityId": "tsk_abc123def456"
}

Response

Attachment uploaded successfully

idstring required

Unique identifier for the attachment

namestring required

Original filename

typestring required

File type/MIME type

sizenumber required

File size in bytes

downloadUrlstring required

Signed URL for downloading the file (temporary)

createdAtstring date-time required

Upload timestamp

Example response

{
  "id": "att_abc123def456",
  "name": "document.pdf",
  "type": "application/pdf",
  "size": 1024000,
  "downloadUrl": "https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=...",
  "createdAt": "2024-01-15T10:30:00Z"
}