POST /api/v1/register
Create a new user account. Optionally creates an associated tenant business at the same time. Middleware:throttle:apiAuthentication: Not required
Request body
Full display name of the user. Maximum 255 characters.
Unique email address. Must not already exist in the users table.
Password. Must meet Laravel’s default password complexity rules and pass confirmation.
Must match the
password field.Optional business name. When provided, a tenant record is created and linked to this user. The slug is auto-generated from this name.
Headers
Optional idempotency key. Falls back to the
idempotency_key body field if not present.Response 201 Created
Error responses
| Status | Cause |
|---|---|
422 | Validation failure (duplicate email, weak password, fields missing) |
POST /api/v1/otp/generate
Generate a one-time password sent to the provided email or phone number. Middleware:throttle:api.otp-generation, idempotencyAuthentication: Not required
Request body
Email address or international phone number (e.g.
+50488887777). Must be a valid email or match the pattern +[country_code][number].Response 200 OK
Confirmation that the code was sent.
ISO 8601 timestamp when the OTP expires (default: 10 minutes from generation).
Error responses
| Status | Cause |
|---|---|
422 | identifier missing or not a valid email/phone format |
429 | OTP generation rate limit exceeded |
POST /api/v1/otp/verify
Verify a one-time password. On success, returns user context and a redirect path. Middleware:throttle:api.verificationAuthentication: Not required
Request body
UUID identifier for the OTP session — passed as a UUID-formatted string representing the session identifier.
Exactly 6 numeric digits.
Response 200 OK — existing user
Success message.
false for existing users.Client redirect path (
/dashboard).Response 200 OK — new user (no account found)
Error responses
| Status | Cause |
|---|---|
422 | UUID invalid format, OTP not numeric, wrong code, or code expired |
429 | Verification rate limit exceeded |
POST /api/v1/auth/social
Authenticate via an OAuth provider. Accepts a provider token from the client-side OAuth flow and returns a Sanctum bearer token. Middleware:throttle:apiAuthentication: Not required
Request body
OAuth provider name. Must be one of:
google, facebook, apple, github, twitter.OAuth access token from the provider. Maximum 4096 characters.
Unique user identifier from the OAuth provider. Maximum 255 characters.
Email from the OAuth profile. Must be a valid RFC + DNS-validated address.
Display name from the OAuth profile. Defaults to the email prefix when omitted.
Profile image URL from the OAuth profile. Maximum 2048 characters.
Headers
Optional idempotency key. Auto-generated as a UUID if not supplied.
Response 200 OK
Bearer token (
social-api-token).Suggested redirect path:
/dashboard for existing users, /onboarding for new users that require onboarding.Error responses
| Status | Cause |
|---|---|
422 | Unsupported provider, token too long, invalid email, missing required fields |
422 | Tenant context could not be resolved |
GET /api/v1/user
Return the currently authenticated user. Middleware:auth:sanctum, throttle:apiAuthentication: Required
Response 200 OK
Returns the raw Eloquent user model serialized to JSON. Key fields include id, name, email, and tenant_id.
Error responses
| Status | Cause |
|---|---|
401 | Missing or invalid bearer token |