API Reference
Auth & API Keys
Authentication endpoints for session management and API key operations.
Auth
auth.getSession
Get the current user's session.
| Type | Query |
| Auth | Public |
| Input | None |
Response:
{
user: {
id: string;
name: string;
email: string;
image?: string;
};
session: {
id: string;
expiresAt: string;
};
} | nullAPI Keys
apiKey.list
List all API keys for the authenticated user.
| Type | Query |
| Auth | Protected |
| Input | None |
Response:
Array<{
id: string;
name: string;
prefix: string; // First 8 chars for identification
createdAt: string;
lastUsedAt: string | null;
}>;apiKey.create
Create a new API key. The full key is only returned once.
| Type | Mutation |
| Auth | Protected |
Input:
{
name: string; // Descriptive name (e.g., "CI Pipeline")
}Response:
{
id: string;
name: string;
prefix: string;
fullKey: string; // "uii_<64-char-hex>" — save this immediately
createdAt: string;
}apiKey.revoke
Immediately revoke an API key.
| Type | Mutation |
| Auth | Protected |
Input:
{
id: string; // UUID of the key to revoke
}