User Management

Operations for user authentication and account management

Generate a new API key

post

Generates a new API key for the authenticated user (replaces existing key)

Authorizations
Responses
200
API key generated successfully
application/json
post
POST /api/generateApiKey HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "apiKey": "dw_1234567890abcdef",
  "message": "API key generated successfully"
}

Get API key status

get

Checks if the user has an API key and returns its creation date

Authorizations
Responses
200
API key status retrieved successfully
application/json
get
GET /api/apiKeyStatus HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "hasApiKey": true,
  "createdAt": "2025-07-17T11:05:59.973Z"
}

Submit and validate user API key

post

Validates and stores a user's external API key (e.g., OpenRouter)

Authorizations
Body
apiKeystringRequired

The API key to validate and store

Responses
200
API key validated and stored successfully
application/json
post
POST /api/submitApiKey HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "apiKey": "text"
}
{
  "message": "API key validated and stored successfully"
}