curl --request POST \
--url https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invites": [
{
"email": "jsmith@example.com",
"role": "member",
"seat_type": "recording",
"is_in_leaderboard": true
}
],
"additional_workspace_ids": []
}
'import requests
url = "https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites"
payload = {
"invites": [
{
"email": "jsmith@example.com",
"role": "member",
"seat_type": "recording",
"is_in_leaderboard": True
}
],
"additional_workspace_ids": []
}
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({
invites: [
{
email: 'jsmith@example.com',
role: 'member',
seat_type: 'recording',
is_in_leaderboard: true
}
],
additional_workspace_ids: []
})
};
fetch('https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/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://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/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([
'invites' => [
[
'email' => 'jsmith@example.com',
'role' => 'member',
'seat_type' => 'recording',
'is_in_leaderboard' => true
]
],
'additional_workspace_ids' => [
]
]),
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://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites"
payload := strings.NewReader("{\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\",\n \"role\": \"member\",\n \"seat_type\": \"recording\",\n \"is_in_leaderboard\": true\n }\n ],\n \"additional_workspace_ids\": []\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://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\",\n \"role\": \"member\",\n \"seat_type\": \"recording\",\n \"is_in_leaderboard\": true\n }\n ],\n \"additional_workspace_ids\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/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 \"invites\": [\n {\n \"email\": \"jsmith@example.com\",\n \"role\": \"member\",\n \"seat_type\": \"recording\",\n \"is_in_leaderboard\": true\n }\n ],\n \"additional_workspace_ids\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_emails": [
"<string>"
],
"failed_emails": [
"<string>"
],
"added_members": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"workspace_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"existing_members": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>"
}
]
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Invite people to a workspace
Invites people to a workspace, as “Invite members” does in the app. Each new person gets an invitation email that is valid for 14 days; accepting it creates their membership with the role, seat type and leaderboard setting sent here. A person who already belongs to the company is not invited again: they are added straight to the workspaces they are missing and keep their seat type. Emails are matched without case and stored in lowercase. If some invitations could not be created, the others are still sent and the failed emails are listed in failed_emails. The invitation is sent in the name of the person who created the API key. A workspace the API key cannot access answers 404. Send an Idempotency-Key header so a retry never sends a second email. Because it sends email, it also counts against a lower invite rate limit: 5 requests a minute and 20 an hour per API key, 10 a minute and 30 an hour for the whole company. Requires users.write.
curl --request POST \
--url https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invites": [
{
"email": "jsmith@example.com",
"role": "member",
"seat_type": "recording",
"is_in_leaderboard": true
}
],
"additional_workspace_ids": []
}
'import requests
url = "https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites"
payload = {
"invites": [
{
"email": "jsmith@example.com",
"role": "member",
"seat_type": "recording",
"is_in_leaderboard": True
}
],
"additional_workspace_ids": []
}
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({
invites: [
{
email: 'jsmith@example.com',
role: 'member',
seat_type: 'recording',
is_in_leaderboard: true
}
],
additional_workspace_ids: []
})
};
fetch('https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/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://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/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([
'invites' => [
[
'email' => 'jsmith@example.com',
'role' => 'member',
'seat_type' => 'recording',
'is_in_leaderboard' => true
]
],
'additional_workspace_ids' => [
]
]),
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://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites"
payload := strings.NewReader("{\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\",\n \"role\": \"member\",\n \"seat_type\": \"recording\",\n \"is_in_leaderboard\": true\n }\n ],\n \"additional_workspace_ids\": []\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://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invites\": [\n {\n \"email\": \"jsmith@example.com\",\n \"role\": \"member\",\n \"seat_type\": \"recording\",\n \"is_in_leaderboard\": true\n }\n ],\n \"additional_workspace_ids\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.triplesession.com/api/public/v2/workspaces/{workspaceId}/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 \"invites\": [\n {\n \"email\": \"jsmith@example.com\",\n \"role\": \"member\",\n \"seat_type\": \"recording\",\n \"is_in_leaderboard\": true\n }\n ],\n \"additional_workspace_ids\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_emails": [
"<string>"
],
"failed_emails": [
"<string>"
],
"added_members": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"workspace_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"existing_members": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>"
}
]
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Authorizations
Headers
Body
Other workspaces to add the people to. Each must be one the API key can access, otherwise 404. A person who already belongs to the company joins them at once with the requested role. A new person joins them as a member when they accept, as in the app; role applies to the workspace in the path.
50Was this page helpful?

