Organizations
Get Organization Sites
Returns all sites in an organization the caller can access, with usage and subscription info.
GET /api/organizations/:organizationId/sitesReturns all sites in an organization the caller can access, with usage and subscription info.
Path Parameters
Prop
Type
Query Parameters
This endpoint takes no query parameters.
Response
Prop
Type
Site Object
Each site in the sites array contains the following fields. Other site-config fields may also be present:
Prop
Type
Subscription Object
Prop
Type
curl -X GET "https://app.rybbit.io/api/organizations/org_abc123/sites" \
-H "Authorization: Bearer your_api_key_here"const organizationId = 'org_abc123';
const response = await fetch(
`https://app.rybbit.io/api/organizations/${organizationId}/sites`,
{
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}/sites',
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}/sites");
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}/sites")
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+"/sites", 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/{}/sites", 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 + "/sites"))
.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}/sites");
var data = await response.Content.ReadAsStringAsync();{
"organization": {
"id": "org_abc123",
"name": "Acme Inc",
"slug": "acme",
"createdAt": "2024-01-15T10:30:00.000Z"
},
"sites": [
{
"siteId": 123,
"name": "Acme Marketing",
"domain": "acme.com",
"type": "web",
"public": false,
"organizationId": "org_abc123",
"sessionsLast24Hours": 842,
"isOwner": true,
"teams": [
{
"id": "team_xyz789",
"name": "Growth"
}
]
}
],
"subscription": {
"monthlyEventCount": 482910,
"eventLimit": 1000000,
"overMonthlyLimit": false,
"planName": "Pro",
"status": "active"
}
}Get My OrganizationsGET
Returns all organizations the authenticated user is a member of, including all members for each organization. Excludes subscription and billing information. Supports both session cookies and API key (Bearer token) authentication.
Create SitePOST
Creates a new site within an organization. Requires admin or owner role in the organization.