Skip to main content
POST
Reject Comment
Use this API to reject one comment of a check, with one of the four reject reasons. It writes the same shape as the Velt SDK’s rejectSuggestion(). The comment’s suggestion.status becomes rejected, with suggestion.rejectReason (the person’s words when given, else the reason), suggestion.resolvedBy and suggestion.resolvedAt. The annotation becomes a regular comment. The comment’s status does not change: an Open comment stays Open, with its pin, and a Resolved one stays Resolved. A resolve that was waiting for its verify rescan stops waiting. Like the SDK, it rejects only a suggestion that is still pending (or a comment with no suggestion) that no scan verified. It refuses an accepted suggestion with CHECKS_SUGGESTION_SETTLED and a verified comment with CHECKS_ALREADY_VERIFIED. A comment rejected only by Exclude Check takes the person’s reject instead. A rejected comment counts nowhere: not in the check’s open count, never makes a check failing, and not in the score. When an agent finds the same problem again, the comment stays rejected as it is: no scan reopens, resolves, verifies or rewrites it. Reject is idempotent: a comment that is already rejected is left as it is. The comment must be an agent comment. A person’s comment is refused, attached to a check or not: detach it instead.

Endpoint

POST https://api.velt.dev/v2/agents/checks/comments/reject

Headers

string
required
Your API key.
string
required

Body

Params

object
required
The schema uses .strict(): unknown fields are rejected.

Example Requests

Response

Success Response

Failure Response

Errors: INVALID_ARGUMENT (a body outside the schema: a missing annotationId or userId, a reason outside the four (excluded, which a row can show, is the engine’s own and refused here), a feedbackReason over 2,000 characters, or an unknown field) / NOT_FOUND with CHECKS_COMMENT_NOT_FOUND (no such comment in the project) / FAILED_PRECONDITION with CHECKS_NOT_AGENT_COMMENT (a person’s comment), CHECKS_SUGGESTION_SETTLED (an accepted suggestion) or CHECKS_ALREADY_VERIFIED (a comment a scan verified).