User Management
Operations for user authentication and account management
Generates a new API key for the authenticated user (replaces existing key)
JWT token for user session authentication.
API key generated successfully
The generated API key (only returned once)
dw_1234567890abcdefAPI key generated successfullyUnauthorized
Internal Server Error
POST /api/generateApiKey HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"apiKey": "dw_1234567890abcdef",
"message": "API key generated successfully"
}Checks if the user has an API key and returns its creation date
JWT token for user session authentication.
API key status retrieved successfully
Whether the user has an API key
When the API key was created (if it exists)
Unauthorized
Internal Server Error
GET /api/apiKeyStatus HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"hasApiKey": true,
"createdAt": "2026-01-01T00:00:00.000Z"
}Validates and stores a user's external API key (e.g., OpenRouter)
JWT token for user session authentication.
The API key to validate and store
API key validated and stored successfully
API key validated and stored successfullyInvalid API key
Unauthorized
Internal Server Error
POST /api/submitApiKey HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"apiKey": "text"
}{
"message": "API key validated and stored successfully"
}Last updated
