Docs

Auth

Check API health

GET
/health

Returns a successful response when the Alien API process is serving requests.

Response Body

application/json

curl -X GET "https://example.com/health"
{  "status": "ok"}

Whoami

GET
/v1/whoami

Get the current authenticated principal (user or service account). Works with both session cookies and API keys.

Authorization

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Query Parameters

workspace?string

Workspace to resolve the principal in. Required for user credentials because a user's role is per-workspace. Service accounts carry their workspace in the credential and may omit it.

Match^(?:ws_[0-9a-zA-Z]{24}|(?!ws[-_])[a-z0-9](-?[a-z0-9])*)$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/whoami"
{  "kind": "user",  "id": "string",  "email": "user@example.com",  "workspaceId": "string",  "workspaceName": "string",  "role": "workspace.member"}