Authentication API

Register

POST/api/auth/register
Request
json
{
"email": "user@example.com",
"password": "securepassword",
"display_name": "John Doe"
}
Response (201)
json
{
"user_id": "550e8400-...",
"email": "user@example.com",
"message": "Verification email sent"
}

Login

POST/api/auth/login
Request
json
{
"email": "user@example.com",
"password": "securepassword"
}
Response (200)
json
{
"access_token": "eyJhbGci...",
"refresh_token": "rt_abc123...",
"user": {
"id": "550e8400-...",
"email": "user@example.com",
"display_name": "John Doe"
}
}

Refresh Token

POST/api/auth/refresh
Request
json
{
"refresh_token": "rt_abc123..."
}

Logout

POST/api/auth/logout

Revokes the refresh token. The access token remains valid until expiry.

PreviousConfigurationNextSecrets API