API/List Organization Members API

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/members

Authentication

Create an organization API key from the organization settings page:

/orgs/{orgSlug}/settings/api-keys

Send the key with x-api-key:

x-api-key: YOUR_API_KEY

Bearer authentication is also accepted:

Authorization: Bearer YOUR_API_KEY

Response

FieldTypeDescription
membersarrayMembers in the API key's organization

Member Object

FieldTypeDescription
idstringOrganization membership id
rolestringMember role, such as owner
createdAtnumberMembership creation timestamp in ms
user.idstringUser id
user.namestringUser display name
user.emailstringUser email address
user.imagestring | nullUser avatar URL

Examples

cURL

curl -H "x-api-key: YOUR_API_KEY" \
  https://nowstack.melvynx.dev/api/v1/members

JavaScript

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

StatusDescription
401Missing, invalid, expired, or limited key
404The key's organization or requested member no longer exists
500Internal server error