Skip to main content
POST
/
customer-trust
/
questionnaires
/
{questionnaireId}
/
approve
Approve questionnaire
curl --request POST \
  --url https://api.vanta.com/v1/customer-trust/questionnaires/{questionnaireId}/approve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "statusChangeMessage": "<string>"
}
'
import requests

url = "https://api.vanta.com/v1/customer-trust/questionnaires/{questionnaireId}/approve"

payload = { "statusChangeMessage": "<string>" }
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({statusChangeMessage: '<string>'})
};

fetch('https://api.vanta.com/v1/customer-trust/questionnaires/{questionnaireId}/approve', 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/customer-trust/questionnaires/{questionnaireId}/approve",
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([
'statusChangeMessage' => '<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/customer-trust/questionnaires/{questionnaireId}/approve"

payload := strings.NewReader("{\n \"statusChangeMessage\": \"<string>\"\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))

}
HttpResponse<String> response = Unirest.post("https://api.vanta.com/v1/customer-trust/questionnaires/{questionnaireId}/approve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"statusChangeMessage\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.vanta.com/v1/customer-trust/questionnaires/{questionnaireId}/approve")

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 \"statusChangeMessage\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "507f1f77bcf86cd799439011",
  "displayName": "SOC 2 Security Questionnaire",
  "type": "SPREADSHEET",
  "status": "IN_PROGRESS",
  "statusLog": [],
  "dueDate": "2024-12-31T00:00:00.000Z",
  "metadata": [
    {
      "key": "priority",
      "value": "high"
    }
  ],
  "tagAndCategoryIds": [],
  "createdDate": "2024-12-01T00:00:00.000Z",
  "updatedDate": "2024-12-14T00:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

questionnaireId
string
required

Body

application/json

Request body for approving a questionnaire.

statusChangeMessage
string

Optional message describing the reason for approval.

Response

200 - application/json

Ok

id
string
required
displayName
string
required
type
enum<string>
required
Available options:
SPREADSHEET,
WEBSITE,
DOCUMENT
status
enum<string>
required
Available options:
APPROVED,
IN_PROGRESS,
IN_REVIEW,
READY_FOR_REVIEW,
WAITING_ON_ANSWERS,
ON_HOLD,
NO_LONGER_NEEDED,
COMPLETE,
ERROR,
EXTRACTING_QUESTIONS,
QUEUED_FOR_EXTRACTION,
PROCESSING,
QUEUED_FOR_PROCESSING,
WAITING_ON_COLUMN_SELECTION,
WAITING_ON_COLUMN_APPROVAL,
QUEUED_FOR_COLUMN_DETECTION,
DETECTING_COLUMNS
statusLog
object[]
required

The status change history log for the questionnaire. Entries are ordered by the most recent status change first.

tagAndCategoryIds
object[]
required

Tags assigned to this questionnaire. Each entry contains a categoryId and tagId.

createdDate
string<date-time>
required
updatedDate
string<date-time>
required
url
string
ownerAssignment
object

The owner assignment in actor form (User or Team).

approverAssignment
object

The approver assignment in actor form (User or Team).

customerTrustAccountId
string
dueDate
string<date-time>
metadata
object[]
completedDate
string<date-time>