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/:memberIdAuthentication
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_KEYPath Parameters
| Parameter | Type | Description |
|---|---|---|
memberId | string | Organization membership id |
Response
| Field | Type | Description |
|---|---|---|
member | object | Member 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/members/member_123JavaScript
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
| Status | Description |
|---|---|
401 | Missing, invalid, expired, or limited key |
404 | The key's organization or requested member no longer exists |
500 | Internal server error |