Audits
Delete a comment for a control within an audit
Deletes an existing comment on a control. Only the original author of the comment can delete it. The author is identified by their email address, which must match the email of the user who created the comment.
Rate limit: 10 requests / minute.
DELETE
/
audits
/
{auditId}
/
controls
/
{controlId}
/
comments
/
{commentId}
TypeScript
import { Vanta } from "vanta-auditor-api-sdk";
const vanta = new Vanta({
bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
});
async function run() {
await vanta.audits.deleteCommentForControl({
auditId: "<id>",
controlId: "<id>",
commentId: "<id>",
deleteAuditControlCommentInput: {
email: "Lorenzo.Ondricka@yahoo.com",
},
});
}
run();package hello.world;
import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.components.DeleteAuditControlCommentInput;
import com.vanta.vanta_auditor_api.models.operations.DeleteCommentForControlResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Vanta sdk = Vanta.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
DeleteCommentForControlResponse res = sdk.audits().deleteCommentForControl()
.auditId("<id>")
.controlId("<id>")
.commentId("<id>")
.deleteAuditControlCommentInput(DeleteAuditControlCommentInput.builder()
.email("Lorenzo.Ondricka@yahoo.com")
.build())
.call();
// handle response
}
}curl --request DELETE \
--url https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>"
}
'import requests
url = "https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}"
payload = { "email": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>'})
};
fetch('https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}"
payload := strings.NewReader("{\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Deletes an existing comment on a control. Only the original author of the comment can delete it.
Email address of the comment author. Must match an existing Vanta user who belongs to the audit firm making the API request. This email uniquely identifies the author across systems.
Response
204
No content
Related topics
List comments for a control within an auditUpdate a comment for a control within an auditCreate a comment for a control within an auditUpsert a control's assessment within an auditList information requests linked to a control within an auditWas this page helpful?
⌘I
TypeScript
import { Vanta } from "vanta-auditor-api-sdk";
const vanta = new Vanta({
bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
});
async function run() {
await vanta.audits.deleteCommentForControl({
auditId: "<id>",
controlId: "<id>",
commentId: "<id>",
deleteAuditControlCommentInput: {
email: "Lorenzo.Ondricka@yahoo.com",
},
});
}
run();package hello.world;
import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.components.DeleteAuditControlCommentInput;
import com.vanta.vanta_auditor_api.models.operations.DeleteCommentForControlResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Vanta sdk = Vanta.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
DeleteCommentForControlResponse res = sdk.audits().deleteCommentForControl()
.auditId("<id>")
.controlId("<id>")
.commentId("<id>")
.deleteAuditControlCommentInput(DeleteAuditControlCommentInput.builder()
.email("Lorenzo.Ondricka@yahoo.com")
.build())
.call();
// handle response
}
}curl --request DELETE \
--url https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>"
}
'import requests
url = "https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}"
payload = { "email": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>'})
};
fetch('https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}"
payload := strings.NewReader("{\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/audits/{auditId}/controls/{controlId}/comments/{commentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body