Organizations
Get My Organizations
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.
GET /api/organizationsReturns 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.
Response
Returns an array of organization objects.
Prop
Type
Member Object
Each member in the members array contains:
Prop
Type
User Object
Prop
Type
Site Object
Each site in the sites array contains:
Prop
Type
curl -X GET "https://app.rybbit.io/api/organizations" \
-H "Authorization: Bearer your_api_key_here"const response = await fetch(
'https://app.rybbit.io/api/organizations',
{
headers: {
'Authorization': 'Bearer your_api_key_here'
}
}
);
const data = await response.json();import requests
response = requests.get(
'https://app.rybbit.io/api/organizations',
headers={
'Authorization': 'Bearer your_api_key_here'
}
)
data = response.json()$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://app.rybbit.io/api/organizations");
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'
uri = URI('https://app.rybbit.io/api/organizations')
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)req, _ := http.NewRequest("GET", "https://app.rybbit.io/api/organizations", 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 client = reqwest::Client::new();
let res = client
.get("https://app.rybbit.io/api/organizations")
.header("Authorization", "Bearer your_api_key_here")
.send()
.await?;
let data: serde_json::Value = res.json().await?;HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.rybbit.io/api/organizations"))
.header("Authorization", "Bearer your_api_key_here")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());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");
var data = await response.Content.ReadAsStringAsync();[
{
"id": "org_123",
"name": "Acme Inc",
"slug": "acme-inc",
"logo": "https://example.com/logo.png",
"createdAt": "2024-01-15T10:30:00.000Z",
"role": "owner",
"members": [
{
"id": "member_abc123",
"role": "owner",
"userId": "user_xyz789",
"createdAt": "2024-01-15T10:30:00.000Z",
"user": {
"id": "user_xyz789",
"name": "John Doe",
"email": "john@example.com"
}
},
{
"id": "member_def456",
"role": "member",
"userId": "user_abc456",
"createdAt": "2024-02-20T14:15:00.000Z",
"user": {
"id": "user_abc456",
"name": "Jane Smith",
"email": "jane@example.com"
}
}
],
"sites": [
{
"id": "456",
"domain": "example.com",
"name": "My Website",
"organizationId": "org_123",
"createdBy": "user_xyz789",
"public": false,
"saltUserIds": false,
"blockBots": true,
"createdAt": "2024-01-15T10:30:00.000Z"
}
]
},
{
"id": "org_456",
"name": "Tech Startup",
"slug": "tech-startup",
"logo": null,
"createdAt": "2024-03-10T08:00:00.000Z",
"role": "admin",
"members": [
{
"id": "member_ghi789",
"role": "owner",
"userId": "user_owner123",
"createdAt": "2024-03-10T08:00:00.000Z",
"user": {
"id": "user_owner123",
"name": "Alice Johnson",
"email": "alice@techstartup.com"
}
},
{
"id": "member_jkl012",
"role": "admin",
"userId": "user_xyz789",
"createdAt": "2024-03-12T09:30:00.000Z",
"user": {
"id": "user_xyz789",
"name": "John Doe",
"email": "john@example.com"
}
}
],
"sites": [
{
"id": "789",
"domain": "techstartup.com",
"name": "Tech Startup Website",
"organizationId": "org_456",
"createdBy": "user_owner123",
"public": true,
"saltUserIds": false,
"blockBots": true,
"createdAt": "2024-03-10T08:00:00.000Z"
}
]
}
]