Rybbit
Organizations

Get Organization Members

Returns all members of an organization with their user details and roles. Requires membership in the organization.

GET /api/organizations/:organizationId/members

Returns all members of an organization with their user details and roles. Requires membership in the organization.

Path Parameters

Prop

Type

Response

Prop

Type

Member Object

Each member in the data array contains:

Prop

Type

User Object

Prop

Type

Request
curl -X GET "https://app.rybbit.io/api/organizations/org_123/members" \
  -H "Authorization: Bearer your_api_key_here"
Request
const organizationId = 'org_123';
const response = await fetch(
  `https://app.rybbit.io/api/organizations/${organizationId}/members`,
  {
    headers: {
      'Authorization': 'Bearer your_api_key_here'
    }
  }
);

const data = await response.json();
Request
import requests

organization_id = 'org_123'
response = requests.get(
    f'https://app.rybbit.io/api/organizations/{organization_id}/members',
    headers={
        'Authorization': 'Bearer your_api_key_here'
    }
)

data = response.json()
Request
$organizationId = 'org_123';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://app.rybbit.io/api/organizations/{$organizationId}/members");
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);
Request
require 'net/http'
require 'json'

organization_id = 'org_123'
uri = URI("https://app.rybbit.io/api/organizations/#{organization_id}/members")
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)
Request
organizationId := "org_123"
req, _ := http.NewRequest("GET", "https://app.rybbit.io/api/organizations/"+organizationId+"/members", 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)
Request
let organization_id = "org_123";
let client = reqwest::Client::new();
let res = client
    .get(format!("https://app.rybbit.io/api/organizations/{}/members", organization_id))
    .header("Authorization", "Bearer your_api_key_here")
    .send()
    .await?;

let data: serde_json::Value = res.json().await?;
Request
String organizationId = "org_123";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.rybbit.io/api/organizations/" + organizationId + "/members"))
    .header("Authorization", "Bearer your_api_key_here")
    .GET()
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
Request
var organizationId = "org_123";
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}/members");
var data = await response.Content.ReadAsStringAsync();
Response
{
  "success": true,
  "data": [
    {
      "id": "member_abc123",
      "role": "owner",
      "userId": "user_xyz789",
      "organizationId": "org_123",
      "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",
      "organizationId": "org_123",
      "createdAt": "2024-02-20T14:15:00.000Z",
      "user": {
        "id": "user_abc456",
        "name": "Jane Smith",
        "email": "jane@example.com"
      }
    }
  ]
}