Skip to main content

Authentication API

Use these endpoints to inspect the current user context and manage tenant API keys.

Base URL: https://api.hestialabs.in/v1

Endpoints​

MethodPathSummary
GET/auth/api-keysList API Keys
GET/auth/meGet Current User
POST/auth/api-keysCreate API Key

List API Keys​

GET /auth/api-keys

List all active API keys for the tenant

Authentication: Bearer JWT required

Parameters​

None.

Responses​

StatusDescription
200API 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​

StatusDescription
200User 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​

FieldTypeRequiredDescription
namestringYesFriendly name for the key
scopesarray<string>No—

Example request​

{
"name": "string",
"scopes": [
"string"
]
}

Responses​

StatusDescription
201API key created

Example 201 response​

{
"status": "string",
"key": "string",
"prefix": "string"
}