curl --request POST \
--url http://localhost:3333/v1/task-management/attachments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileName": "document.pdf",
"fileType": "application/pdf",
"fileData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
"entityType": "vendor",
"entityId": "vnd_abc123def456"
}
'{
"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"
}Upload a file attachment for a task item with proper S3 path structure: org_/attachments/task-item///files
curl --request POST \
--url http://localhost:3333/v1/task-management/attachments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileName": "document.pdf",
"fileType": "application/pdf",
"fileData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
"entityType": "vendor",
"entityId": "vnd_abc123def456"
}
'{
"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"
}API key for authentication
Name of the file
255"document.pdf"
MIME type of the file
"application/pdf"
Base64 encoded file data
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
Type of entity this task item belongs to (vendor or risk)
vendor, risk "vendor"
ID of the entity this task item belongs to
"vnd_abc123def456"
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"
Was this page helpful?