Get a team via Admin API
curl --request GET \
--url https://api.example.com/terraform/teams/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/terraform/teams/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/terraform/teams/{id}', 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.example.com/terraform/teams/{id}",
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.example.com/terraform/teams/{id}"
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.example.com/terraform/teams/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/terraform/teams/{id}")
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": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"visibility": "PUBLIC",
"defaultCostMetric": "cost",
"organizationId": "<string>",
"scopes": [
{
"id": "<string>",
"name": "<string>",
"whereClause": {},
"filterCel": "<string>"
}
],
"_count": {
"members": 123
},
"members": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"teamId": "<string>",
"userId": "<string>",
"role": "OWNER",
"user": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"avatar": "<string>",
"emailId": "<string>"
}
}
],
"invites": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"teamId": "<string>",
"organizationId": "<string>",
"email": "<string>",
"role": "OWNER",
"status": "PENDING"
}
],
"archivedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}Admin Teams
Get a team via Admin API
The path parameter may be the team id or the team name (case-insensitive). Returns full team detail including members (with user) and pending invites.
GET
/
terraform
/
teams
/
{id}
Get a team via Admin API
curl --request GET \
--url https://api.example.com/terraform/teams/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/terraform/teams/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/terraform/teams/{id}', 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.example.com/terraform/teams/{id}",
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.example.com/terraform/teams/{id}"
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.example.com/terraform/teams/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/terraform/teams/{id}")
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": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"visibility": "PUBLIC",
"defaultCostMetric": "cost",
"organizationId": "<string>",
"scopes": [
{
"id": "<string>",
"name": "<string>",
"whereClause": {},
"filterCel": "<string>"
}
],
"_count": {
"members": 123
},
"members": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"teamId": "<string>",
"userId": "<string>",
"role": "OWNER",
"user": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"avatar": "<string>",
"emailId": "<string>"
}
}
],
"invites": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"teamId": "<string>",
"organizationId": "<string>",
"email": "<string>",
"role": "OWNER",
"status": "PENDING"
}
],
"archivedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Send Authorization: Bearer <credential> using either a Clerk session JWT or a Clerk API key (ak_*). API keys may identify a user (user_*) or organization (org_*) principal and are generated in the Clerk Dashboard under API keys.
Path Parameters
Team id (cuid) or team name within the organization
Response
Team detail (members + pending invites)
Available options:
PUBLIC, PRIVATE Available options:
cost, effective_cost, list_cost, contracted_cost, unblended_cost, net_unblended_cost, amortized_cost, net_amortized_cost Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Last modified on August 10, 2026
Was this page helpful?
