Team Management
List team invitations
Open invitations first, then newest, up to 200 rows. A team has at
most 20 open invitations, so every open invitation is always listed.
Older expired or closed rows past the cap are history only, since
inviting the same email again replaces an expired invitation.
Requires users:read or users:write. A pending invitation past its
expiry is reported as expired and sorts with the closed ones.
GET
/
teams
/
{team_id}
/
invitations
List team invitations
curl --request GET \
--url https://api.superserve.ai/teams/{team_id}/invitations \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.superserve.ai/teams/{team_id}/invitations"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.superserve.ai/teams/{team_id}/invitations', 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.superserve.ai/teams/{team_id}/invitations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.superserve.ai/teams/{team_id}/invitations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.superserve.ai/teams/{team_id}/invitations")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superserve.ai/teams/{team_id}/invitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"invitations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"status": "pending",
"invited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"last_sent_at": "2023-11-07T05:31:56Z",
"delivery_status": "pending"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}⌘I
List team invitations
curl --request GET \
--url https://api.superserve.ai/teams/{team_id}/invitations \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.superserve.ai/teams/{team_id}/invitations"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.superserve.ai/teams/{team_id}/invitations', 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.superserve.ai/teams/{team_id}/invitations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.superserve.ai/teams/{team_id}/invitations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.superserve.ai/teams/{team_id}/invitations")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superserve.ai/teams/{team_id}/invitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"invitations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"status": "pending",
"invited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"last_sent_at": "2023-11-07T05:31:56Z",
"delivery_status": "pending"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}