GET
/
v1
/
comments
Get comments for an entity
curl --request GET \
  --url https://api.trycomp.ai/v1/comments \
  --header 'X-API-Key: <api-key>'
[
  {
    "id": "cmt_abc123def456",
    "content": "This task needs to be completed by end of week",
    "author": {
      "id": "usr_abc123def456",
      "name": "John Doe",
      "email": "[email protected]"
    },
    "attachments": [
      {
        "id": "att_abc123def456",
        "name": "document.pdf",
        "type": "application/pdf",
        "createdAt": "2024-01-15T10:30:00Z"
      }
    ],
    "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)

Query Parameters

entityId
string
required

ID of the entity to get comments for

Example:

"tsk_abc123def456"

entityType
enum<string>
required

Type of entity

Available options:
task,
vendor,
risk,
policy

Response

200 - application/json

Comments retrieved successfully

id
string
required

Unique identifier for the comment

Example:

"cmt_abc123def456"

content
string
required

Comment content

Example:

"This task needs to be completed by end of week"

author
object
required

Comment author information

attachments
object[]
required

Attachment metadata (URLs generated on-demand)

createdAt
string<date-time>
required

Comment creation timestamp

Example:

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