Register

POST/api/v1/auth/register
FieldRequiredRules
nameYes2–100 characters
emailYesValid email
passwordYes8–128 characters
timezoneNoUp to 50 characters
{
  "success": true,
  "data": { "accessToken": "...", "refreshToken": "..." }
}

Login and Refresh

POST/api/v1/auth/login
POST/api/v1/auth/refresh

Login accepts email and password. Refresh accepts refreshToken and returns a new access/refresh pair. Access tokens last 15 minutes and refresh tokens last seven days.

Logout and Password

POST/api/v1/auth/logout
PUT/api/v1/auth/password

Logout requires bearer authentication plus the refresh token body and blocklists that refresh token. Password change accepts currentPassword and newPassword.

Profile

GET/api/v1/auth/profile
PUT/api/v1/auth/profile

The profile response contains id, name, email, and timezone. The current update DTO accepts only optional name.

Password Reset

POST/api/v1/auth/forgot-password
POST/api/v1/auth/reset-password

Forgot-password always returns a neutral success response. Reset accepts token and newPassword; tokens expire after one hour.

WooCommerce Plugin Key

GET/api/v1/auth/api-key
POST/api/v1/auth/api-key/regenerate

These owner/admin routes return plugin-key metadata or rotate the key for an account with exactly one connected WooCommerce store. Multiple-store accounts reconnect from the specific plugin instead.

Verifier-bound Plugin Connection

POST/api/v1/auth/plugin/connect-init
POST/api/v1/auth/plugin/connect-complete
POST/api/v1/auth/plugin/connect-exchange

Init is public and binds the store/callback origin to a verifier challenge. Complete requires owner/admin authentication and returns only a five-minute one-time code. The WordPress server exchanges that code plus its verifier; only this final server-to-server response reveals the store-bound key once.