curl --request GET \
--url https://api.affinity.co/v2/teams/{teamId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/teams/{teamId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/teams/{teamId}', 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.affinity.co/v2/teams/{teamId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.affinity.co/v2/teams/{teamId}"
req, _ := http.NewRequest("GET", 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.get("https://api.affinity.co/v2/teams/{teamId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/teams/{teamId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 42,
"name": "Investments",
"createdAt": "2024-03-01T15:22:00Z",
"updatedAt": "2026-04-18T09:11:23Z"
}Get metadata on a single Team
| ⚠️ This endpoint is currently in BETA |
|---|
Retrieve detailed information about a specific Team. Optional opt-in properties can be requested
via the includes query parameter.
curl --request GET \
--url https://api.affinity.co/v2/teams/{teamId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/teams/{teamId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/teams/{teamId}', 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.affinity.co/v2/teams/{teamId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.affinity.co/v2/teams/{teamId}"
req, _ := http.NewRequest("GET", 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.get("https://api.affinity.co/v2/teams/{teamId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/teams/{teamId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 42,
"name": "Investments",
"createdAt": "2024-03-01T15:22:00Z",
"updatedAt": "2026-04-18T09:11:23Z"
}Authorizations
A static Affinity API key, presented as a bearer token.
Path Parameters
Team ID
1 <= x <= 9007199254740991Query Parameters
Additional properties to include in the response.
membersPreview, accessibleListsPreview Response
OK
A Team. Opt-in properties are controlled by the includes query parameter.
The unique identifier for the team
1 <= x <= 900719925474099142
The name of the team
"Investments"
Timestamp when the team was created
"2024-03-01T15:22:00Z"
Timestamp when the team was last updated, or null if never updated
"2026-04-18T09:11:23Z"
Visibility policy applied to interactions belonging to this team's members. share-subjects-bodies exposes all interactions; share-subjects exposes a selective subset; hide-subjects-bodies hides interaction content but exposes metadata; no-access exposes no interactions. Only returned when the caller has the "Manage Teams" permission, the organization has team-based privacy controls enabled, and cross-team visibility is enabled for the organization; omitted from the response otherwise.
share-subjects-bodies, share-subjects, hide-subjects-bodies, no-access "hide-subjects-bodies"
Preview of the team's members. Only included when membersPreview is requested via the includes query parameter. totalCount is the total number of members on the team; full data is available via the paginated endpoint GET /v2/teams/{teamId}/members.
Show child attributes
Show child attributes
Preview of the Lists this team has access to. Only included when accessibleListsPreview is requested via the includes query parameter. totalCount is the total number of Lists this team can access; full data is available via the paginated endpoint GET /v2/teams/{teamId}/accessible-lists.
Show child attributes
Show child attributes
Was this page helpful?