Delete a comment
DELETE
/v1/comments/{commentId}
const url = 'https://api.varman.io/v1/comments/cmt_abc123def456';const options = { method: 'DELETE', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"userId":"usr_abc123def456"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.varman.io/v1/comments/cmt_abc123def456 \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "userId": "usr_abc123def456" }'Delete a comment in Varman. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”commentId
required
string
Example
cmt_abc123def456Unique comment identifier
Request Bodyrequired
Section titled “Request Bodyrequired”Delete comment request body
Media typeapplication/json
object
userId
User ID of the comment author (required for API key auth, ignored for JWT auth)
string
Example
usr_abc123def456Responses
Section titled “Responses”Comment deleted successfully
Media typeapplication/json
object
success
boolean
deletedCommentId
string
message
string
Example
{ "success": true, "deletedCommentId": "cmt_abc123def456", "message": "Comment deleted successfully"}Unauthorized - Invalid authentication
Media typeapplication/json
object
message
string
Example
{ "message": "Unauthorized"}Comment not found
Media typeapplication/json
object
message
string
Example
{ "message": "Comment with ID cmt_abc123def456 not found"}