Current Organization API
Retrieve the organization attached to an API key.
Retrieve the organization that owns the API key. Use this endpoint when an integration needs to identify the key's workspace.
Endpoint
GET /api/v1/meAuthentication
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 |
|---|---|---|
organization.id | string | Organization id |
organization.name | string | Organization display name |
organization.slug | string | null | Organization slug used in app URLs |
Examples
cURL
curl -H "x-api-key: YOUR_API_KEY" \
https://nowstack.melvynx.dev/api/v1/meJavaScript
const response = await fetch("https://nowstack.melvynx.dev/api/v1/me", {
headers: {
"x-api-key": process.env.NOWSTACK_API_KEY!,
},
});
if (!response.ok) {
throw new Error(`Current organization API failed: ${response.status}`);
}
const data = await response.json();Errors
| Status | Description |
|---|---|
401 | Missing, invalid, expired, or limited key |
404 | The key's organization no longer exists |
500 | Internal server error |