Invite workforce members
curl --request POST \
--url https://api.trycomp.ai/v1/people/invite \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"invites": [
{
"email": "user@example.com",
"roles": [
"employee"
],
"sendPortalEmail": false
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invites: [{email: 'user@example.com', roles: ['employee'], sendPortalEmail: false}]
})
};
fetch('https://api.trycomp.ai/v1/people/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/people/invite"
payload = { "invites": [
{
"email": "user@example.com",
"roles": ["employee"],
"sendPortalEmail": False
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)People
Invite workforce members | Comp AI API
Invite employees or contractors to complete portal tasks, training, device setup, and compliance evidence requirements.
POST
/
v1
/
people
/
invite
Invite workforce members
curl --request POST \
--url https://api.trycomp.ai/v1/people/invite \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"invites": [
{
"email": "user@example.com",
"roles": [
"employee"
],
"sendPortalEmail": false
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invites: [{email: 'user@example.com', roles: ['employee'], sendPortalEmail: false}]
})
};
fetch('https://api.trycomp.ai/v1/people/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/people/invite"
payload = { "invites": [
{
"email": "user@example.com",
"roles": ["employee"],
"sendPortalEmail": False
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Was this page helpful?
⌘I

