Skip to main content
The Scrubbe authentication API lives under /api/v1/auth and covers the full identity lifecycle: registering a new account, verifying an email address, logging in to receive tokens, refreshing those tokens, and managing your profile. Public endpoints require no credentials; protected endpoints require a valid Bearer token in the Authorization header.

Public endpoints

These endpoints do not require authentication.

POST /auth/login

Authenticate with email and password. Returns a short-lived access token and a long-lived refresh token.
string
required
The registered email address.
string
required
The account password.
200 response
string
JWT to include in the Authorization: Bearer header for protected requests. Short-lived.
string
Long-lived token used to obtain a new access token via POST /auth/refresh-token.
object
Basic profile information for the authenticated user.

POST /auth/business/register

Register a new business account and workspace.
string
required
Name of the organization.
string
required
Owner’s email address.
string
required
Account password (minimum 8 characters).

POST /auth/dev/register

Register a new developer account.
string
required
Developer email address.
string
required
Account password.

POST /auth/oauth/login

Authenticate or register via an OAuth provider (e.g., Google). Redirects to the provider’s consent screen.
string
required
OAuth provider name. Example: "google".

POST /auth/verify_email

Verify an email address using the OTP sent after registration.
string
required
The email address to verify.
string
required
The one-time passcode delivered to the email address.

POST /auth/resend_otp

Resend the email verification OTP. Subject to the email rate limit (3 requests per minute).
string
required
The email address to resend the OTP to.
This endpoint is rate-limited to 3 requests per minute per email address. Repeated calls within the window return 429 Too Many Requests.

POST /auth/forgot-password

Initiate the password reset flow. Sends a reset link or token to the specified email.
string
required
The email address associated with the account.

POST /auth/validate-reset-token

Validate that a password reset token is still active before presenting the reset form.
string
required
The reset token received via email.

POST /auth/reset-password

Set a new password using a valid reset token.
string
required
The reset token from the email.
string
required
The new password (minimum 8 characters).

POST /auth/refresh-token

Exchange a refresh token for a new access token. Does not require the Authorization header.
string
required
A valid, unexpired refresh token.

Protected endpoints

These endpoints require Authorization: Bearer <accessToken>.

POST /auth/logout

Invalidate the current session. The access token is revoked server-side. No request body required.

POST /auth/change-password

Change the authenticated user’s password.
string
required
The user’s current password.
string
required
The new password (minimum 8 characters, must differ from the current password).

GET /auth/me

Retrieve the profile of the currently authenticated user.

PUT /auth/profile

Update the authenticated user’s profile information.
string
Updated first name.
string
Updated last name.
string
Contact phone number.
Email address cannot be changed through this endpoint. Contact support to update your login email.