curl --request POST \
--url https://service.abundly.ai/workspaceapi/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"teams": [
{
"teamId": "<string>"
}
],
"expiresInDays": 45
}
'import requests
url = "https://service.abundly.ai/workspaceapi/invites"
payload = {
"email": "jsmith@example.com",
"teams": [{ "teamId": "<string>" }],
"expiresInDays": 45
}
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({email: 'jsmith@example.com', teams: [{teamId: '<string>'}], expiresInDays: 45})
};
fetch('https://service.abundly.ai/workspaceapi/invites', 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://service.abundly.ai/workspaceapi/invites",
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([
'email' => 'jsmith@example.com',
'teams' => [
[
'teamId' => '<string>'
]
],
'expiresInDays' => 45
]),
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://service.abundly.ai/workspaceapi/invites"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"teams\": [\n {\n \"teamId\": \"<string>\"\n }\n ],\n \"expiresInDays\": 45\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://service.abundly.ai/workspaceapi/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"teams\": [\n {\n \"teamId\": \"<string>\"\n }\n ],\n \"expiresInDays\": 45\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.abundly.ai/workspaceapi/invites")
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 \"email\": \"jsmith@example.com\",\n \"teams\": [\n {\n \"teamId\": \"<string>\"\n }\n ],\n \"expiresInDays\": 45\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"email": "<string>",
"customerId": "<string>",
"status": "<string>",
"createdAt": "<string>",
"expiresAt": "<string>",
"customerName": "<string>",
"customerRole": "<string>",
"isExpired": true,
"invitedByUserName": "<string>",
"displayName": "<string>",
"groups": [
{
"groupId": "<string>",
"role": "<string>"
}
],
"agentAccess": {
"agentId": "<string>",
"level": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Invite someone to the workspace
Email an invitation to join the workspace as a Creator (member) or Collaborator, optionally into teams. Admins and guests can’t be invited through the API. Requires the Invite members scope. Returns 400 when the person is already a member or already has a pending invitation (so a retried call never sends a second email), when the workspace restricts email domains and this one isn’t allowed, or when teams is set but team settings are off; 403 when the workspace has no free seats.
curl --request POST \
--url https://service.abundly.ai/workspaceapi/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"teams": [
{
"teamId": "<string>"
}
],
"expiresInDays": 45
}
'import requests
url = "https://service.abundly.ai/workspaceapi/invites"
payload = {
"email": "jsmith@example.com",
"teams": [{ "teamId": "<string>" }],
"expiresInDays": 45
}
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({email: 'jsmith@example.com', teams: [{teamId: '<string>'}], expiresInDays: 45})
};
fetch('https://service.abundly.ai/workspaceapi/invites', 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://service.abundly.ai/workspaceapi/invites",
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([
'email' => 'jsmith@example.com',
'teams' => [
[
'teamId' => '<string>'
]
],
'expiresInDays' => 45
]),
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://service.abundly.ai/workspaceapi/invites"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"teams\": [\n {\n \"teamId\": \"<string>\"\n }\n ],\n \"expiresInDays\": 45\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://service.abundly.ai/workspaceapi/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"teams\": [\n {\n \"teamId\": \"<string>\"\n }\n ],\n \"expiresInDays\": 45\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.abundly.ai/workspaceapi/invites")
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 \"email\": \"jsmith@example.com\",\n \"teams\": [\n {\n \"teamId\": \"<string>\"\n }\n ],\n \"expiresInDays\": 45\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"email": "<string>",
"customerId": "<string>",
"status": "<string>",
"createdAt": "<string>",
"expiresAt": "<string>",
"customerName": "<string>",
"customerRole": "<string>",
"isExpired": true,
"invitedByUserName": "<string>",
"displayName": "<string>",
"groups": [
{
"groupId": "<string>",
"role": "<string>"
}
],
"agentAccess": {
"agentId": "<string>",
"level": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Workspace API key (wk_). GET endpoints require the Workspace read API scope, POST, PUT, PATCH and DELETE endpoints the Workspace write API scope, and sending or revoking invitations (POST and DELETE /workspaceapi/invites) the Invite members scope. A key stops working when it expires or is disabled.
Body
Email address to invite.
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Workspace role on joining. "member" is shown as Creator in the product.
member, collaborator Teams the invitee joins on accepting.
Show child attributes
Show child attributes
Days until the invitation expires. Defaults to 7.
1 <= x <= 90Response
Invitation created and emailed.
"pending" or "expired" — only those two are listed.
ISO 8601 timestamp.
ISO 8601 timestamp.
The role the invitee gets on accepting.
Show child attributes
Show child attributes
Set on guest invitations created from an agent's access page.
Show child attributes
Show child attributes

