Skip to main content
POST
/
v1
/
task-management
/
attachments
Upload attachment to task item
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"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Headers

X-Organization-Id
string

Organization ID (required for session auth, optional for API key auth)

Body

application/json
fileName
string
required

Name of the file

Maximum string length: 255
Example:

"document.pdf"

fileType
string
required

MIME type of the file

Example:

"application/pdf"

fileData
string
required

Base64 encoded file data

Example:

"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="

entityType
enum<string>
required

Type of entity this task item belongs to (vendor or risk)

Available options:
vendor,
risk
Example:

"vendor"

entityId
string
required

ID of the entity this task item belongs to

Example:

"vnd_abc123def456"

Response

201 - application/json

Attachment uploaded successfully

id
string
required

Unique identifier for the attachment

Example:

"att_abc123def456"

name
string
required

Original filename

Example:

"document.pdf"

type
string
required

File type/MIME type

Example:

"application/pdf"

size
number
required

File size in bytes

Example:

1024000

downloadUrl
string
required

Signed URL for downloading the file (temporary)

Example:

"https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=..."

createdAt
string<date-time>
required

Upload timestamp

Example:

"2024-01-15T10:30:00Z"