Authorization header.
API routes live under the
/api/v1 prefix. No session cookie is accepted — the auth:sanctum guard validates only the token.Obtaining a token
Registering via the API issues a Sanctum token in the same response.Request body
Full name of the user.
Email address. Must be unique across all users.
Minimum 8 characters. Must be confirmed.
Must match
password.Display name of the organization (up to 255 characters).
URL-safe slug for the organization. Must be unique across all tenants (
alpha_dash format).Response 201 Created
Location header is also set to the user profile URL: GET /api/v1/user.
UUID of the newly created user.
Email address of the user.
Sanctum personal access token. Include this in subsequent requests.
Suggested client-side redirect path after registration.
Using the token
Pass the token in every authenticated request:Protected routes
Routes that require a valid Sanctum token usemiddleware('auth:sanctum').
User profile
Tenant-scoped routes
The following groups require bothauth:sanctum and tenant.ownership middleware:
| Resource | Routes |
|---|---|
| Orders | GET /api/v1/orders, GET /api/v1/orders/{order}, PATCH /api/v1/orders/{order}/status, DELETE /api/v1/orders/{order} |
| Settings | GET /api/v1/settings, POST /api/v1/settings/update |
| Reports | GET /api/v1/reports/sales/excel, GET /api/v1/reports/sales/pdf, GET /api/v1/reports/inventory/pdf, GET /api/v1/reports/kitchen/pdf |
| Exports | POST /api/v1/exports/sales |
| Notifications | GET /api/v1/notifications, GET /api/v1/notifications/count, PATCH /api/v1/notifications/read-all, PATCH /api/v1/notifications/{id}/read |
| AI tools | POST /api/v1/ai/generate, POST /api/v1/ai/optimize-profile |
Token scopes and revocation
Tokens are named at creation time (api-token for registration, social-api-token for social login). Vito does not currently define granular Sanctum token abilities — every token grants full API access for the owning user.
To revoke a token, delete it from the personal_access_tokens table or use Laravel’s currentAccessToken()->delete() in a logout action.
Push subscriptions
Authenticated users can register a browser for Web Push notifications.Register a push subscription
The push service URL provided by the browser (max 1000 characters).
Elliptic-curve Diffie-Hellman public key.
Auth secret from the browser’s push subscription.
Encryption scheme. Defaults to
aesgcm.Remove a push subscription
auth:sanctum and return { "status": "success" } on success.