Task Requirement Sets
Create task requirement set
Creates a task requirement set and assigns it to a group.
POST
/
task-requirement-sets
Create task requirement set
curl --request POST \
--url https://api.vanta.com/v1/task-requirement-sets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"isReusable": true,
"groupId": "<string>",
"description": "<string>",
"onboarding": {
"policyAcceptance": {
"required": false
},
"backgroundCheck": {
"required": false
},
"securityTraining": {
"required": false
},
"deviceMonitoring": {
"required": false
},
"custom": {
"required": false
}
},
"offboarding": {
"accountDeactivation": {
"required": false
},
"custom": {
"required": false
}
}
}
'import requests
url = "https://api.vanta.com/v1/task-requirement-sets"
payload = {
"name": "<string>",
"isReusable": True,
"groupId": "<string>",
"description": "<string>",
"onboarding": {
"policyAcceptance": { "required": False },
"backgroundCheck": { "required": False },
"securityTraining": { "required": False },
"deviceMonitoring": { "required": False },
"custom": { "required": False }
},
"offboarding": {
"accountDeactivation": { "required": False },
"custom": { "required": False }
}
}
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({
name: '<string>',
isReusable: true,
groupId: '<string>',
description: '<string>',
onboarding: {
policyAcceptance: {required: false},
backgroundCheck: {required: false},
securityTraining: {required: false},
deviceMonitoring: {required: false},
custom: {required: false}
},
offboarding: {accountDeactivation: {required: false}, custom: {required: false}}
})
};
fetch('https://api.vanta.com/v1/task-requirement-sets', 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/task-requirement-sets",
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([
'name' => '<string>',
'isReusable' => true,
'groupId' => '<string>',
'description' => '<string>',
'onboarding' => [
'policyAcceptance' => [
'required' => false
],
'backgroundCheck' => [
'required' => false
],
'securityTraining' => [
'required' => false
],
'deviceMonitoring' => [
'required' => false
],
'custom' => [
'required' => false
]
],
'offboarding' => [
'accountDeactivation' => [
'required' => false
],
'custom' => [
'required' => false
]
]
]),
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/task-requirement-sets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isReusable\": true,\n \"groupId\": \"<string>\",\n \"description\": \"<string>\",\n \"onboarding\": {\n \"policyAcceptance\": {\n \"required\": false\n },\n \"backgroundCheck\": {\n \"required\": false\n },\n \"securityTraining\": {\n \"required\": false\n },\n \"deviceMonitoring\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n },\n \"offboarding\": {\n \"accountDeactivation\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n }\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/task-requirement-sets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isReusable\": true,\n \"groupId\": \"<string>\",\n \"description\": \"<string>\",\n \"onboarding\": {\n \"policyAcceptance\": {\n \"required\": false\n },\n \"backgroundCheck\": {\n \"required\": false\n },\n \"securityTraining\": {\n \"required\": false\n },\n \"deviceMonitoring\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n },\n \"offboarding\": {\n \"accountDeactivation\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/task-requirement-sets")
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 \"name\": \"<string>\",\n \"isReusable\": true,\n \"groupId\": \"<string>\",\n \"description\": \"<string>\",\n \"onboarding\": {\n \"policyAcceptance\": {\n \"required\": false\n },\n \"backgroundCheck\": {\n \"required\": false\n },\n \"securityTraining\": {\n \"required\": false\n },\n \"deviceMonitoring\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n },\n \"offboarding\": {\n \"accountDeactivation\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "5f2c939a52855e725c8d5824",
"name": "Engineering Onboarding",
"description": "Requirements for engineers",
"isReusable": true,
"createdAt": "2024-03-07T18:46:05.944Z",
"updatedAt": "2024-03-07T18:46:05.944Z",
"taskRequirements": {
"onboarding": {
"policyAcceptance": {
"required": true,
"acceptAll": true
},
"backgroundCheck": {
"required": true,
"cutoffDate": null
},
"securityTraining": {
"required": true,
"requiredCategories": [
"general"
],
"requirementIds": [
"5f2c939a52855e725c8d5826"
]
},
"deviceMonitoring": {
"required": true,
"preferredPasswordManagerId": "ONEPASSWORD",
"installPrompt": "INSTALL_VANTA_AGENT"
},
"custom": {
"required": true,
"requirements": [
{
"id": "5f2c939a52855e725c8d5827",
"effectiveDate": null
}
]
}
},
"offboarding": {
"accountDeactivation": {
"required": true,
"accounts": {
"deactivateAll": true
}
},
"custom": {
"required": false
}
}
}
}Authorizations
Body
application/json
Response
201 - application/json
Task requirement set created
Was this page helpful?
⌘I
Create task requirement set
curl --request POST \
--url https://api.vanta.com/v1/task-requirement-sets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"isReusable": true,
"groupId": "<string>",
"description": "<string>",
"onboarding": {
"policyAcceptance": {
"required": false
},
"backgroundCheck": {
"required": false
},
"securityTraining": {
"required": false
},
"deviceMonitoring": {
"required": false
},
"custom": {
"required": false
}
},
"offboarding": {
"accountDeactivation": {
"required": false
},
"custom": {
"required": false
}
}
}
'import requests
url = "https://api.vanta.com/v1/task-requirement-sets"
payload = {
"name": "<string>",
"isReusable": True,
"groupId": "<string>",
"description": "<string>",
"onboarding": {
"policyAcceptance": { "required": False },
"backgroundCheck": { "required": False },
"securityTraining": { "required": False },
"deviceMonitoring": { "required": False },
"custom": { "required": False }
},
"offboarding": {
"accountDeactivation": { "required": False },
"custom": { "required": False }
}
}
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({
name: '<string>',
isReusable: true,
groupId: '<string>',
description: '<string>',
onboarding: {
policyAcceptance: {required: false},
backgroundCheck: {required: false},
securityTraining: {required: false},
deviceMonitoring: {required: false},
custom: {required: false}
},
offboarding: {accountDeactivation: {required: false}, custom: {required: false}}
})
};
fetch('https://api.vanta.com/v1/task-requirement-sets', 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/task-requirement-sets",
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([
'name' => '<string>',
'isReusable' => true,
'groupId' => '<string>',
'description' => '<string>',
'onboarding' => [
'policyAcceptance' => [
'required' => false
],
'backgroundCheck' => [
'required' => false
],
'securityTraining' => [
'required' => false
],
'deviceMonitoring' => [
'required' => false
],
'custom' => [
'required' => false
]
],
'offboarding' => [
'accountDeactivation' => [
'required' => false
],
'custom' => [
'required' => false
]
]
]),
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/task-requirement-sets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isReusable\": true,\n \"groupId\": \"<string>\",\n \"description\": \"<string>\",\n \"onboarding\": {\n \"policyAcceptance\": {\n \"required\": false\n },\n \"backgroundCheck\": {\n \"required\": false\n },\n \"securityTraining\": {\n \"required\": false\n },\n \"deviceMonitoring\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n },\n \"offboarding\": {\n \"accountDeactivation\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n }\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/task-requirement-sets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isReusable\": true,\n \"groupId\": \"<string>\",\n \"description\": \"<string>\",\n \"onboarding\": {\n \"policyAcceptance\": {\n \"required\": false\n },\n \"backgroundCheck\": {\n \"required\": false\n },\n \"securityTraining\": {\n \"required\": false\n },\n \"deviceMonitoring\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n },\n \"offboarding\": {\n \"accountDeactivation\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/task-requirement-sets")
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 \"name\": \"<string>\",\n \"isReusable\": true,\n \"groupId\": \"<string>\",\n \"description\": \"<string>\",\n \"onboarding\": {\n \"policyAcceptance\": {\n \"required\": false\n },\n \"backgroundCheck\": {\n \"required\": false\n },\n \"securityTraining\": {\n \"required\": false\n },\n \"deviceMonitoring\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n },\n \"offboarding\": {\n \"accountDeactivation\": {\n \"required\": false\n },\n \"custom\": {\n \"required\": false\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "5f2c939a52855e725c8d5824",
"name": "Engineering Onboarding",
"description": "Requirements for engineers",
"isReusable": true,
"createdAt": "2024-03-07T18:46:05.944Z",
"updatedAt": "2024-03-07T18:46:05.944Z",
"taskRequirements": {
"onboarding": {
"policyAcceptance": {
"required": true,
"acceptAll": true
},
"backgroundCheck": {
"required": true,
"cutoffDate": null
},
"securityTraining": {
"required": true,
"requiredCategories": [
"general"
],
"requirementIds": [
"5f2c939a52855e725c8d5826"
]
},
"deviceMonitoring": {
"required": true,
"preferredPasswordManagerId": "ONEPASSWORD",
"installPrompt": "INSTALL_VANTA_AGENT"
},
"custom": {
"required": true,
"requirements": [
{
"id": "5f2c939a52855e725c8d5827",
"effectiveDate": null
}
]
}
},
"offboarding": {
"accountDeactivation": {
"required": true,
"accounts": {
"deactivateAll": true
}
},
"custom": {
"required": false
}
}
}
}