On this page6 sections
POST/api/auth/authorize-routeAuthentication
Authorize Menu Route
Server-side menu authorization helper returning structured 403 details when the caller's role lacks permission for the requested `/menu/*` path.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Request
Provide the following fields in the request payload.
pathnamestringrequired
Menu pathname starting with /menu.
Responses
Select a status code to inspect schema.
Menu route access is permitted.application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/auth/authorize-route
curl -X POST "https://api.invoger.com/api/auth/authorize-route" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "pathname": "/menu/invoices" }'Interactive playground
Response
application/json
{
"success": true,
"data": {
"allowed": true,
"requestedPath": "/menu/invoices",
"route": "/menu/invoices",
"menu": "Invoices",
"module": "invoice",
"role": "Cashier",
"requiredPermission": "invoice.view"
}
}