Send an assessment invite by email
curl --request POST \
--url https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email \
--header 'Authorization: Bearer <token>'import requests
url = "https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email', 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://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 204,
"status": "success"
}{
"code": 400,
"error": {
"message": "Profile has no email address",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 401,
"error": {
"message": "Invalid token",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 402,
"error": {
"message": "Maximum reports reached for trial account",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 403,
"error": {
"message": "Access denied",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 421,
"error": {
"message": "This account is served from another region",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"region": {
"zone": "EU",
"apiUrl": "https://vanguard-eu.profilebehavior.com/api"
},
"status": "error"
}{
"code": 500,
"error": {
"message": "Internal error",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}Assessment Invite
Send Invite by Email
Emails the individual associated with the profile a magic link that signs them in and starts their assessment. The link is valid for 7 days. Call this endpoint again whenever a fresh link is needed, for example after the previous one expired or after issuing a retake.
The profile must have an email address; otherwise the request is rejected with 400.
POST
/
profile
/
{profileId}
/
invite
/
email
Send an assessment invite by email
curl --request POST \
--url https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email \
--header 'Authorization: Bearer <token>'import requests
url = "https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email', 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://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vanguard.profilebehavior.com/api/v4/profile/{profileId}/invite/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 204,
"status": "success"
}{
"code": 400,
"error": {
"message": "Profile has no email address",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 401,
"error": {
"message": "Invalid token",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 402,
"error": {
"message": "Maximum reports reached for trial account",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 403,
"error": {
"message": "Access denied",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}{
"code": 421,
"error": {
"message": "This account is served from another region",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"region": {
"zone": "EU",
"apiUrl": "https://vanguard-eu.profilebehavior.com/api"
},
"status": "error"
}{
"code": 500,
"error": {
"message": "Internal error",
"timestamp": "2025-01-01T09:42:52.329056-05:00"
},
"status": "error"
}Create the profile first with Create Profile. Creating a profile does not send anything; this endpoint delivers the assessment.
Authorizations
M2MOAuth2
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the profile to invite.
Response
Success - the invite email was sent.
Standard response object for successful single-resource requests in the Profile Behavior API. Contains an HTTP status code, the returned resource data, and a status indicator.
Was this page helpful?