Auth
POST /auth/register
Register a new user account
Creates a new user with the provided email and password. Returns the new user's API key.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| string | ✓ | body | The user's email address | |
| password | string | ✓ | body | The user's password (min 8 chars, must include uppercase, lowercase, and number) |
Returns
object - User object with API key
Try It Out
POST /auth/login
Log in with email and password
Authenticates a user and returns their account details including API key.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| string | ✓ | body | The user's email address | |
| password | string | ✓ | body | The user's password |
Returns
object - User object with API key
Try It Out
POST /auth/regenerate-key
Regenerate API key
Generates a new API key for the authenticated user. The old key is invalidated.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| string | ✓ | body | The user's email address | |
| password | string | ✓ | body | The user's password |
Returns
object - New API key
Try It Out
GET /auth/user-data
Get user data
Retrieves the authenticated user's account details including usage statistics and subscription status.
Returns
object - User data object
Try It Out
GET /auth/export-data
Export user data
Exports all stored user data for GDPR data portability compliance.
Returns
object - Complete user data export
Try It Out
DELETE /auth/account
Delete user account
Permanently deletes the user's account and all associated data.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| confirmEmail | string | ✓ | body | The user's email address (must match account email) |
| password | string | ✓ | body | The user's password for verification |
Returns
object - Confirmation of deletion
Try It Out
POST /auth/change-password
Change password while logged in
Allows an authenticated user to change their password.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| currentPassword | string | ✓ | body | The user's current password |
| newPassword | string | ✓ | body | The new password (min 8 chars, must include uppercase, lowercase, and number) |
Returns
object - Success message
Try It Out
POST /auth/forgot-password
Request a password reset
Sends a password reset email if the account exists.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| string | ✓ | body | The email address associated with the account |
Returns
object - Generic success message
Try It Out
POST /auth/reset-password
Reset password with token
Resets the user's password using a valid reset token.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| token | string | ✓ | body | The password reset token from the email |
| password | string | ✓ | body | The new password (min 8 chars, must include uppercase, lowercase, and number) |
Returns
object - Success message
Try It Out
GET /auth/validate-reset-token/:token
Validate a password reset token
Checks whether a password reset token is still valid before showing the reset form.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| token | string | ✓ | params | The password reset token to validate |
Returns
object - Token validity status
Try It Out
POST /auth/api-keys
Create a new scoped API key
Creates a sub-key under the authenticated user's master key with optional restrictions.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| name | string | ✓ | body | Friendly name for the key |
| scopedClientId | string | body | Lock to specific Foundry client ID | |
| scopedUserId | string | body | Lock to specific Foundry user ID | |
| monthlyLimit | string | body | Per-key monthly request cap | |
| expiresAt | string | body | Expiry timestamp (ISO 8601) | |
| foundryUrl | string | body | Foundry instance URL for headless sessions | |
| foundryUsername | string | body | Foundry login username | |
| foundryPassword | string | body | Foundry login password (encrypted at rest) |
Returns
object - New scoped API key details
Try It Out
GET /auth/api-keys
List all scoped API keys
Returns all scoped keys for the authenticated user.
Returns
array - Array of scoped API keys
Try It Out
DELETE /auth/api-keys/:id
Delete a scoped API key
Permanently deletes a scoped key.
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| id | string | ✓ | params | The scoped key ID |
Returns
object - Success message