API/Get Organization Member API Mastrao

Get Organization Member API Mastrao

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

The credential must include the organization:read scope.

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://app.mastrao.com/api/v1/members/member_123

JavaScript

const response = await fetch(
  "https://app.mastrao.com/api/v1/members/member_123",
  {
    headers: {
      "x-api-key": "YOUR_API_KEY",
    },
  },
);

if (!response.ok) {
  throw new Error(`Member API failed: ${response.status}`);
}

const data = await response.json();

Errors

StatusDescription
401Missing, invalid, or inactive key
403Missing organization:read scope
429Rate limit reached; see the retry-after header
503Credential verification unavailable
404The key's organization or requested member no longer exists
500Internal server error
List Organization Members API MastraoAuth Components