List Organization Members API
List organization members with an API key.
List members for the organization that owns the API key. API keys are scoped to one organization, so callers do not pass an organization id.
Use GET /api/v1/me when an integration needs the organization id, name, or slug for the API key.
Use GET /api/v1/members/:memberId when an integration needs one specific member.
Endpoint
GET /api/v1/membersAuthentication
Create an organization API key from the organization settings page:
/orgs/{orgSlug}/settings/api-keysSend the key with x-api-key:
x-api-key: YOUR_API_KEYBearer authentication is also accepted:
Authorization: Bearer YOUR_API_KEYResponse
| Field | Type | Description |
|---|---|---|
members | array | Members in the API key's organization |
Member Object
| Field | Type | Description |
|---|---|---|
id | string | Organization membership id |
role | string | Member role, such as owner |
createdAt | number | Membership creation timestamp in ms |
user.id | string | User id |
user.name | string | User display name |
user.email | string | User email address |
user.image | string | null | User avatar URL |
Examples
cURL
curl -H "x-api-key: YOUR_API_KEY" \
https://nowstack.melvynx.dev/api/v1/membersJavaScript
const response = await fetch("https://nowstack.melvynx.dev/api/v1/members", {
headers: {
"x-api-key": process.env.NOWSTACK_API_KEY!,
},
});
if (!response.ok) {
throw new Error(`Members API failed: ${response.status}`);
}
const data = await response.json();Errors
| Status | Description |
|---|---|
401 | Missing, invalid, expired, or limited key |
404 | The key's organization or requested member no longer exists |
500 | Internal server error |