POST /api/register
Creates a new user account in Filebright. Upon successful registration, returns an authentication token that can be used for subsequent API requests.This endpoint does not require authentication. The returned token should be stored securely and included in the Authorization header for protected endpoints.
Request body
Full name of the user. Must be 2-70 characters and contain only letters, spaces, hyphens, and apostrophes.Validation rules:
- Minimum length: 2 characters
- Maximum length: 70 characters
- Pattern: Only letters, spaces, hyphens, and apostrophes allowed
Email address for the account. Must be a valid email format and unique in the system.Validation rules:
- Must be a valid email format
- Maximum length: 255 characters
- Must be unique (not already registered)
Password for the account. Must meet security requirements.Validation rules:
- Minimum length: 8 characters
- Maximum length: 128 characters
- Must contain at least one letter
- Must contain at least one number
- Must contain at least one symbol
Password confirmation. Must match the password field exactly.
Response
Authentication token for the newly created user. Use this token in the Authorization header as
Bearer {token} for authenticated requests.The type of token issued. Always returns “Bearer”.
The newly created user object.
Unique identifier for the user.
Full name of the user.
Email address of the user.
Timestamp when the user account was created (ISO 8601 format).
Timestamp when the user account was last updated (ISO 8601 format).
Error responses
Example request
Example response
201 Created
422 Unprocessable Entity