Create a comment for audit evidence
Create a comment in Vanta for a piece of evidence.
Rate limit: 25 requests / minute.
import { Vanta } from "vanta-auditor-api-sdk";
const vanta = new Vanta({
bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await vanta.audits.createCommentForEvidence({
auditId: "<id>",
auditEvidenceId: "<id>",
addCommentInput: {
text: "<value>",
email: "Carmen.Bogan@yahoo.com",
creationDate: new Date("2024-05-28T11:04:29.369Z"),
},
});
console.log(result);
}
run();package hello.world;
import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.components.AddCommentInput;
import com.vanta.vanta_auditor_api.models.operations.CreateCommentForAuditEvidenceResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
public class Application {
public static void main(String[] args) throws Exception {
Vanta sdk = Vanta.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
CreateCommentForAuditEvidenceResponse res = sdk.audits().createCommentForEvidence()
.auditId("<id>")
.auditEvidenceId("<id>")
.addCommentInput(AddCommentInput.builder()
.text("<value>")
.email("Carmen.Bogan@yahoo.com")
.creationDate(OffsetDateTime.parse("2024-05-28T11:04:29.369Z"))
.build())
.call();
if (res.comment().isPresent()) {
System.out.println(res.comment().get());
}
}
}curl --request POST \
--url https://api.vanta.com/v1/audits/{auditId}/evidence/{auditEvidenceId}/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"email": "<string>",
"creationDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.vanta.com/v1/audits/{auditId}/evidence/{auditEvidenceId}/comments"
payload = {
"text": "<string>",
"email": "<string>",
"creationDate": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', email: '<string>', creationDate: '2023-11-07T05:31:56Z'})
};
fetch('https://api.vanta.com/v1/audits/{auditId}/evidence/{auditEvidenceId}/comments', 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}/evidence/{auditEvidenceId}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'email' => '<string>',
'creationDate' => '2023-11-07T05:31:56Z'
]),
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}/evidence/{auditEvidenceId}/comments"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"email\": \"<string>\",\n \"creationDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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}/evidence/{auditEvidenceId}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"email\": \"<string>\",\n \"creationDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "65fc81a3359c8508c9af880f",
"auditEvidenceId": "65fc81a3359c8508c9af880f",
"text": "Some comment",
"creationDate": "2024-03-07T21:25:56.000Z",
"modificationDate": "2024-03-07T21:25:56.000Z",
"deletionDate": "2024-03-07T21:25:56.000Z",
"email": "vlad@vantaroo.com",
"authorName": "Vlad Vantaroo"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Response
Ok
The unique identifier for the comment
The unique identifier for the audit evidence related to the comment.
The comment message
When the comment was created
When the comment was updated
When the comment was deleted
The email of the comment author. This acts as a unique identifier to map users between Vanta and external systems.
Human-readable display name of the comment author. Null if the author's name is not available (e.g., user was deleted). This enables correct author attribution in integrations where users cannot be reliably matched across systems by email alone.
Was this page helpful?
import { Vanta } from "vanta-auditor-api-sdk";
const vanta = new Vanta({
bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await vanta.audits.createCommentForEvidence({
auditId: "<id>",
auditEvidenceId: "<id>",
addCommentInput: {
text: "<value>",
email: "Carmen.Bogan@yahoo.com",
creationDate: new Date("2024-05-28T11:04:29.369Z"),
},
});
console.log(result);
}
run();package hello.world;
import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.components.AddCommentInput;
import com.vanta.vanta_auditor_api.models.operations.CreateCommentForAuditEvidenceResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
public class Application {
public static void main(String[] args) throws Exception {
Vanta sdk = Vanta.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
CreateCommentForAuditEvidenceResponse res = sdk.audits().createCommentForEvidence()
.auditId("<id>")
.auditEvidenceId("<id>")
.addCommentInput(AddCommentInput.builder()
.text("<value>")
.email("Carmen.Bogan@yahoo.com")
.creationDate(OffsetDateTime.parse("2024-05-28T11:04:29.369Z"))
.build())
.call();
if (res.comment().isPresent()) {
System.out.println(res.comment().get());
}
}
}curl --request POST \
--url https://api.vanta.com/v1/audits/{auditId}/evidence/{auditEvidenceId}/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"email": "<string>",
"creationDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.vanta.com/v1/audits/{auditId}/evidence/{auditEvidenceId}/comments"
payload = {
"text": "<string>",
"email": "<string>",
"creationDate": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', email: '<string>', creationDate: '2023-11-07T05:31:56Z'})
};
fetch('https://api.vanta.com/v1/audits/{auditId}/evidence/{auditEvidenceId}/comments', 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}/evidence/{auditEvidenceId}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'email' => '<string>',
'creationDate' => '2023-11-07T05:31:56Z'
]),
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}/evidence/{auditEvidenceId}/comments"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"email\": \"<string>\",\n \"creationDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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}/evidence/{auditEvidenceId}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"email\": \"<string>\",\n \"creationDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "65fc81a3359c8508c9af880f",
"auditEvidenceId": "65fc81a3359c8508c9af880f",
"text": "Some comment",
"creationDate": "2024-03-07T21:25:56.000Z",
"modificationDate": "2024-03-07T21:25:56.000Z",
"deletionDate": "2024-03-07T21:25:56.000Z",
"email": "vlad@vantaroo.com",
"authorName": "Vlad Vantaroo"
}