curl --request POST \
--url http://localhost:3333/v1/comments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "This task needs to be completed by end of week",
"entityId": "tsk_abc123def456",
"entityType": "task",
"attachments": [
{
"fileName": "document.pdf",
"fileType": "application/pdf",
"fileData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
"description": "Meeting notes from Q4 planning session"
}
]
}
'{
"id": "cmt_abc123def456",
"content": "This task needs to be completed by end of week",
"author": {
"id": "usr_abc123def456",
"name": "John Doe",
"email": "john.doe@company.com",
"image": "https://example.com/avatar.jpg",
"deactivated": false
},
"attachments": [
{
"id": "att_abc123def456",
"name": "document.pdf",
"type": "application/pdf",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"createdAt": "2024-01-15T10:30:00Z"
}Create a comment on an entity with optional file attachments
curl --request POST \
--url http://localhost:3333/v1/comments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "This task needs to be completed by end of week",
"entityId": "tsk_abc123def456",
"entityType": "task",
"attachments": [
{
"fileName": "document.pdf",
"fileType": "application/pdf",
"fileData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
"description": "Meeting notes from Q4 planning session"
}
]
}
'{
"id": "cmt_abc123def456",
"content": "This task needs to be completed by end of week",
"author": {
"id": "usr_abc123def456",
"name": "John Doe",
"email": "john.doe@company.com",
"image": "https://example.com/avatar.jpg",
"deactivated": false
},
"attachments": [
{
"id": "att_abc123def456",
"name": "document.pdf",
"type": "application/pdf",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"createdAt": "2024-01-15T10:30:00Z"
}API key for authentication
Organization ID (required for session auth, optional for API key auth)
Content of the comment
2000"This task needs to be completed by end of week"
ID of the entity to comment on
"tsk_abc123def456"
Type of entity being commented on
task, vendor, risk, policy "task"
Optional attachments to include with the comment
Show child attributes
Name of the file
255"document.pdf"
MIME type of the file
"application/pdf"
Base64 encoded file data
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
Description of the attachment
500"Meeting notes from Q4 planning session"
Comment created successfully
Unique identifier for the comment
"cmt_abc123def456"
Comment content
"This task needs to be completed by end of week"
Comment author information
Show child attributes
User ID
"usr_abc123def456"
User name
"John Doe"
User email
"john.doe@company.com"
User profile image URL
"https://example.com/avatar.jpg"
Whether the user is deactivated
false
Attachment metadata (URLs generated on-demand)
Show child attributes
Unique identifier for the attachment
"att_abc123def456"
Original filename
"document.pdf"
File type/MIME type
"application/pdf"
Upload timestamp
"2024-01-15T10:30:00Z"
Comment creation timestamp
"2024-01-15T10:30:00Z"
Was this page helpful?