Skip to content

Regenerate API key

POST
/auth/api-key/regenerate

Generate a new API key and invalidate the previous one. The new key is shown only once and must be stored securely. Requires a valid JWT token.

API key regenerated successfully

object
data
required
object
api_key
required

New raw API key. Store securely. Shown only once.

string
Example
rag_live_xyz789...
message
required
string
Example
API key regenerated. Store this key securely — it will not be shown again.

Authentication failed or missing

object
error
required
object
code
required

Machine-readable error code

string
Allowed values: VALIDATION_ERROR AUTHENTICATION_ERROR NOT_FOUND CONFLICT RATE_LIMIT_EXCEEDED USAGE_LIMIT_EXCEEDED EXTERNAL_SERVICE_ERROR INTERNAL_ERROR
Example
VALIDATION_ERROR
message
required

Human-readable error message

string
Example
Invalid request body
details

Additional error details (e.g., validation issues)

object
key
additional properties
any
Example
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Invalid or missing API key"
}
}