User Management
Operations for user authentication and account management
Generates a new API key for the authenticated user (replaces existing key)
Authorizations
AuthorizationstringRequired
JWT token for user session authentication.
Responses
200
API key generated successfully
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
post
/generateApiKeyPOST /api/generateApiKey HTTP/1.1
Host:
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
Authorizations
AuthorizationstringRequired
JWT token for user session authentication.
Responses
200
API key status retrieved successfully
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
get
/apiKeyStatusGET /api/apiKeyStatus HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"hasApiKey": true,
"createdAt": "2025-12-06T13:53:01.871Z"
}Validates and stores a user's external API key (e.g., OpenRouter)
Authorizations
AuthorizationstringRequired
JWT token for user session authentication.
Body
apiKeystringRequired
The API key to validate and store
Responses
200
API key validated and stored successfully
application/json
400
Invalid API key
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
post
/submitApiKeyPOST /api/submitApiKey HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"apiKey": "text"
}{
"message": "API key validated and stored successfully"
}