API/Get Organization Member API

Get Organization Member API

Retrieve one organization member with an API key.

Retrieve one member from the organization that owns the API key. API keys are scoped to one organization, so callers only pass the member id.

Use GET /api/v1/members when an integration needs the full member list. Use GET /api/v1/me when an integration needs the organization id, name, or slug for the API key.

Endpoint

GET /api/v1/members/:memberId

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

Path Parameters

ParameterTypeDescription
memberIdstringOrganization membership id

Response

FieldTypeDescription
memberobjectMember 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/member_123

JavaScript

const response = await fetch(
  "https://nowstack.melvynx.dev/api/v1/members/member_123",
  {
    headers: {
      "x-api-key": process.env.NOWSTACK_API_KEY!,
    },
  },
);

if (!response.ok) {
  throw new Error(`Member 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