Teams
Get Teams
Returns the teams in an organization, with their members and accessible sites.
GET /api/organizations/:organizationId/teamsReturns the teams in an organization, with their members and accessible sites.
Any organization member may call this. Members who are not an admin/owner only see the teams they belong to.
Path Parameters
Prop
Type
Query Parameters
This endpoint takes no query parameters.
Response
Prop
Type
Team Object
Each team in the teams array contains:
Prop
Type
Member Object
Prop
Type
Site Object
Prop
Type
curl -X GET "https://app.rybbit.io/api/organizations/org_abc123/teams" \
-H "Authorization: Bearer your_api_key_here"const organizationId = 'org_abc123';
const response = await fetch(
`https://app.rybbit.io/api/organizations/${organizationId}/teams`,
{
headers: {
'Authorization': 'Bearer your_api_key_here'
}
}
);
const data = await response.json();import requests
organization_id = 'org_abc123'
response = requests.get(
f'https://app.rybbit.io/api/organizations/{organization_id}/teams',
headers={
'Authorization': 'Bearer your_api_key_here'
}
)
data = response.json()$organizationId = 'org_abc123';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://app.rybbit.io/api/organizations/{$organizationId}/teams");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer your_api_key_here'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);require 'net/http'
require 'json'
organization_id = 'org_abc123'
uri = URI("https://app.rybbit.io/api/organizations/#{organization_id}/teams")
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer your_api_key_here'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)organizationId := "org_abc123"
req, _ := http.NewRequest("GET", "https://app.rybbit.io/api/organizations/"+organizationId+"/teams", nil)
req.Header.Set("Authorization", "Bearer your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)let organization_id = "org_abc123";
let client = reqwest::Client::new();
let res = client
.get(format!("https://app.rybbit.io/api/organizations/{}/teams", organization_id))
.header("Authorization", "Bearer your_api_key_here")
.send()
.await?;
let data: serde_json::Value = res.json().await?;String organizationId = "org_abc123";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.rybbit.io/api/organizations/" + organizationId + "/teams"))
.header("Authorization", "Bearer your_api_key_here")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());var organizationId = "org_abc123";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");
var response = await client.GetAsync($"https://app.rybbit.io/api/organizations/{organizationId}/teams");
var data = await response.Content.ReadAsStringAsync();{
"teams": [
{
"id": "team_xyz789",
"name": "Marketing",
"organizationId": "org_abc123",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-02-20T14:15:00.000Z",
"members": [
{
"userId": "user_123",
"userName": "John Doe",
"userEmail": "john@example.com"
}
],
"sites": [
{
"siteId": 123,
"domain": "example.com",
"name": "Example Site"
}
]
}
]
}