Authentication API
Use these endpoints to inspect the current user context and manage tenant API keys.
Base URL: https://api.hestialabs.in/v1
Endpointsâ
| Method | Path | Summary |
|---|---|---|
GET | /auth/api-keys | List API Keys |
GET | /auth/me | Get Current User |
POST | /auth/api-keys | Create API Key |
List API Keysâ
GET /auth/api-keys
List all active API keys for the tenant
Authentication: Bearer JWT required
Parametersâ
None.
Responsesâ
| Status | Description |
|---|---|
200 | API keys list |
Example 200 responseâ
{
"keys": [
{}
]
}
Get Current Userâ
GET /auth/me
Returns authenticated user info and tenant context
Authentication: Bearer JWT required
Parametersâ
None.
Responsesâ
| Status | Description |
|---|---|
200 | User info |
Example 200 responseâ
{
"authenticated": true,
"has_tenant": true,
"user": {
"id": "string",
"email": "string",
"role": "string",
"tenant_id": "string"
}
}
Create API Keyâ
POST /auth/api-keys
Generate a new API key
Authentication: Bearer JWT required
Parametersâ
None.
Request bodyâ
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Friendly name for the key |
scopes | array<string> | No | â |
Example requestâ
{
"name": "string",
"scopes": [
"string"
]
}
Responsesâ
| Status | Description |
|---|---|
201 | API key created |
Example 201 responseâ
{
"status": "string",
"key": "string",
"prefix": "string"
}