People
Update person metadata
Update a person’s basic information.
PATCH
/
people
/
{personId}
Update person metadata
curl --request PATCH \
--url https://api.vanta.com/v1/people/{personId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employment": {
"startDate": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.vanta.com/v1/people/{personId}"
payload = { "employment": { "startDate": "2023-11-07T05:31:56Z" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({employment: {startDate: '2023-11-07T05:31:56Z'}})
};
fetch('https://api.vanta.com/v1/people/{personId}', 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/people/{personId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'employment' => [
'startDate' => '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/people/{personId}"
payload := strings.NewReader("{\n \"employment\": {\n \"startDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.vanta.com/v1/people/{personId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employment\": {\n \"startDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/people/{personId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employment\": {\n \"startDate\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "65e1efde08e8478f143a8ff9",
"userId": "65e1efde08e8478f143a9001",
"emailAddress": "example-person@email.com",
"employment": {
"endDate": null,
"jobTitle": "Customer success manager",
"startDate": "2021-01-01T00:00:00.000Z",
"status": "CURRENT"
},
"leaveInfo": null,
"groupIds": [
"5f2c939a52855e725c8d5824"
],
"name": {
"display": "Example Person",
"last": "Person",
"first": "Example"
},
"sources": {
"emailAddress": {
"integrationId": "gsuiteadmin",
"resourceId": "660c701d3d344e660b032306",
"type": "INTEGRATION"
},
"employment": {
"startDate": {
"integrationId": "gusto",
"resourceId": "660c70783d344e660b032323",
"type": "INTEGRATION"
},
"endDate": {
"integrationId": "gusto",
"resourceId": "660c70783d344e660b032323",
"type": "INTEGRATION"
}
}
},
"tasksSummary": {
"completionDate": null,
"dueDate": "2021-12-01T00:00:00.000Z",
"status": "OVERDUE",
"details": {
"completeTrainings": {
"taskType": "COMPLETE_TRAININGS",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": {
"date": "2021-11-01T00:00:00.000Z",
"reason": "Training Vanta tests have been disabled for this person"
},
"incompleteTrainings": [
{
"name": "Security training 1"
},
{
"name": "Security training 2"
}
],
"completedTrainings": [
{
"name": "Security training 3"
},
{
"name": "Security training 4"
}
]
},
"acceptPolicies": {
"taskType": "ACCEPT_POLICIES",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": null,
"unacceptedPolicies": [
{
"name": "Policy 1"
},
{
"name": "Policy 2"
}
],
"acceptedPolicies": [
{
"name": "Policy 3"
},
{
"name": "Policy 4"
}
]
},
"completeCustomTasks": {
"taskType": "COMPLETE_CUSTOM_TASKS",
"status": "OVERDUE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": {
"date": "2021-11-01T00:00:00.000Z",
"reason": "Custom task Vanta tests have been disabled for this person"
},
"incompleteCustomTasks": [
{
"name": "Custom task 1"
},
{
"name": "Custom task 2"
}
],
"completedCustomTasks": [
{
"name": "Custom task 3"
},
{
"name": "Custom task 4"
}
]
},
"completeOffboardingCustomTasks": {
"taskType": "COMPLETE_CUSTOM_OFFBOARDING_TASKS",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": null,
"incompleteCustomOffboardingTasks": [],
"completedCustomOffboardingTasks": [
{
"name": "Custom offboarding task 1"
},
{
"name": "Custom offboarding task 2"
}
]
},
"installDeviceMonitoring": {
"taskType": "INSTALL_DEVICE_MONITORING",
"status": "DUE_SOON",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": null,
"disabled": null
},
"completeBackgroundChecks": {
"taskType": "COMPLETE_BACKGROUND_CHECKS",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": null
}
}
},
"programScopeIds": [
"6a1c939a52855e725c8d5824"
]
}Authorizations
Response
200 - application/json
Ok
Was this page helpful?
⌘I
Update person metadata
curl --request PATCH \
--url https://api.vanta.com/v1/people/{personId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employment": {
"startDate": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.vanta.com/v1/people/{personId}"
payload = { "employment": { "startDate": "2023-11-07T05:31:56Z" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({employment: {startDate: '2023-11-07T05:31:56Z'}})
};
fetch('https://api.vanta.com/v1/people/{personId}', 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/people/{personId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'employment' => [
'startDate' => '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/people/{personId}"
payload := strings.NewReader("{\n \"employment\": {\n \"startDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.vanta.com/v1/people/{personId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"employment\": {\n \"startDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/people/{personId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employment\": {\n \"startDate\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "65e1efde08e8478f143a8ff9",
"userId": "65e1efde08e8478f143a9001",
"emailAddress": "example-person@email.com",
"employment": {
"endDate": null,
"jobTitle": "Customer success manager",
"startDate": "2021-01-01T00:00:00.000Z",
"status": "CURRENT"
},
"leaveInfo": null,
"groupIds": [
"5f2c939a52855e725c8d5824"
],
"name": {
"display": "Example Person",
"last": "Person",
"first": "Example"
},
"sources": {
"emailAddress": {
"integrationId": "gsuiteadmin",
"resourceId": "660c701d3d344e660b032306",
"type": "INTEGRATION"
},
"employment": {
"startDate": {
"integrationId": "gusto",
"resourceId": "660c70783d344e660b032323",
"type": "INTEGRATION"
},
"endDate": {
"integrationId": "gusto",
"resourceId": "660c70783d344e660b032323",
"type": "INTEGRATION"
}
}
},
"tasksSummary": {
"completionDate": null,
"dueDate": "2021-12-01T00:00:00.000Z",
"status": "OVERDUE",
"details": {
"completeTrainings": {
"taskType": "COMPLETE_TRAININGS",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": {
"date": "2021-11-01T00:00:00.000Z",
"reason": "Training Vanta tests have been disabled for this person"
},
"incompleteTrainings": [
{
"name": "Security training 1"
},
{
"name": "Security training 2"
}
],
"completedTrainings": [
{
"name": "Security training 3"
},
{
"name": "Security training 4"
}
]
},
"acceptPolicies": {
"taskType": "ACCEPT_POLICIES",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": null,
"unacceptedPolicies": [
{
"name": "Policy 1"
},
{
"name": "Policy 2"
}
],
"acceptedPolicies": [
{
"name": "Policy 3"
},
{
"name": "Policy 4"
}
]
},
"completeCustomTasks": {
"taskType": "COMPLETE_CUSTOM_TASKS",
"status": "OVERDUE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": {
"date": "2021-11-01T00:00:00.000Z",
"reason": "Custom task Vanta tests have been disabled for this person"
},
"incompleteCustomTasks": [
{
"name": "Custom task 1"
},
{
"name": "Custom task 2"
}
],
"completedCustomTasks": [
{
"name": "Custom task 3"
},
{
"name": "Custom task 4"
}
]
},
"completeOffboardingCustomTasks": {
"taskType": "COMPLETE_CUSTOM_OFFBOARDING_TASKS",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": null,
"incompleteCustomOffboardingTasks": [],
"completedCustomOffboardingTasks": [
{
"name": "Custom offboarding task 1"
},
{
"name": "Custom offboarding task 2"
}
]
},
"installDeviceMonitoring": {
"taskType": "INSTALL_DEVICE_MONITORING",
"status": "DUE_SOON",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": null,
"disabled": null
},
"completeBackgroundChecks": {
"taskType": "COMPLETE_BACKGROUND_CHECKS",
"status": "COMPLETE",
"dueDate": "2021-12-01T00:00:00.000Z",
"completionDate": "2021-11-01T00:00:00.000Z",
"disabled": null
}
}
},
"programScopeIds": [
"6a1c939a52855e725c8d5824"
]
}