Skip to main content

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

NameTypeRequiredSourceDescription
emailstringbodyThe user's email address
passwordstringbodyThe 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

NameTypeRequiredSourceDescription
emailstringbodyThe user's email address
passwordstringbodyThe 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

NameTypeRequiredSourceDescription
emailstringbodyThe user's email address
passwordstringbodyThe 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

NameTypeRequiredSourceDescription
confirmEmailstringbodyThe user's email address (must match account email)
passwordstringbodyThe 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

NameTypeRequiredSourceDescription
currentPasswordstringbodyThe user's current password
newPasswordstringbodyThe 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

NameTypeRequiredSourceDescription
emailstringbodyThe 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

NameTypeRequiredSourceDescription
tokenstringbodyThe password reset token from the email
passwordstringbodyThe 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

NameTypeRequiredSourceDescription
tokenstringparamsThe 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

NameTypeRequiredSourceDescription
namestringbodyFriendly name for the key
scopedClientIdstringbodyLock to specific Foundry client ID
scopedUserIdstringbodyLock to specific Foundry user ID
monthlyLimitstringbodyPer-key monthly request cap
expiresAtstringbodyExpiry timestamp (ISO 8601)
foundryUrlstringbodyFoundry instance URL for headless sessions
foundryUsernamestringbodyFoundry login username
foundryPasswordstringbodyFoundry 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

NameTypeRequiredSourceDescription
idstringparamsThe scoped key ID

Returns

object - Success message

Try It Out