Registration creates a new player account identified by email address, display username, and password. The account is inactive immediately after registration — the player must click the verification link sent to their email before they can log in. Once verified, the account is permanently active and the token is consumed.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Antonelli-Tech-Solutions/spades/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/auth/register
Creates a new player account and sends a verification email containing a single-use activation link.| Method | POST |
| Path | /api/auth/register |
| Auth required | None |
Request body
The player’s email address. Must be a valid email format. Stored normalized to lowercase.
The display name shown to other players in the lobby and at the table. Stored with original casing; must be unique across all accounts.
The account password. Minimum 8 characters. Stored as a bcrypt hash — the plaintext is never persisted.
Example request
Response codes
| Status | Meaning |
|---|---|
201 | Registration successful. Verification email sent. |
400 | Missing or invalid fields (e.g. password fewer than 8 characters, missing email). |
409 | Email address or username is already registered to another account. |
201 response body
A human-readable confirmation that registration succeeded and a verification email has been sent.
The UUID assigned to the newly created player account.
GET /api/auth/verify-email
Activates a player account by validating the token from the verification email. Tokens are single-use and expire 24 hours after registration.| Method | GET |
| Path | /api/auth/verify-email |
| Auth required | None |
Query parameters
The UUID verification token included in the registration email link. Tokens expire after 24 hours and are deleted after first use.
Response codes
| Status | Meaning |
|---|---|
200 | Email verified. The account is now active and the player can log in. |
400 | Token is missing, invalid, already used, or has expired. |
Local development
If you do not have an SMTP server configured locally, set
DEV_AUTO_VERIFY=true when starting the server. With this flag, POST /api/auth/register marks the account as verified immediately — no email is sent and no token is required. The player can log in straight away. Never set DEV_AUTO_VERIFY in production — the server ignores it when NODE_ENV=production.POST /api/auth/resend-verification
Sends a fresh verification email to an unverified account. Any previously issued token is deleted before a new one is generated.| Method | POST |
| Path | /api/auth/resend-verification |
| Auth required | None |
Request body
The email address of the unverified account.
Example request
Response codes
| Status | Meaning |
|---|---|
200 | Request accepted. If the email is registered and unverified, a new verification link has been sent. |
This endpoint always returns
200, even when the supplied email address is not found in the database or the account is already verified. This behaviour is intentional — it prevents account enumeration by making it impossible for an unauthenticated caller to determine whether a given email address is registered.