Skip to main content
POST
Add Comments
Use this API to add comments within a specific CommentAnnotation.

Endpoint

POST https://api.velt.dev/v2/commentannotations/comments/add

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

This endpoint adds comments (including agent replies) to an existing CommentAnnotation. Annotation-level fields such as type (comment / suggestion) and visibility are set when the annotation is created or updated via the Add Comment Annotations and Update Comment Annotations APIs — they are not accepted on this endpoint.

1. Add comment in a CommentAnnotation by organizationId, documentId, and annotationId

2. Add comment with permission verification

When verifyUserPermissions is enabled, the API verifies the user has access to the document before adding the comment. If verification fails, the request will be rejected.

3. Add comment with attachments

4. Add an agent reply

Attach an agent block to mark the comment as agent-authored. The server stamps sourceType: "agent" on the comment.

Response

Success Response

Failure Response