/{app_slug}/v1/authorize/batchMulti-permission authorization in a single round-trip
Runs N permission checks against the same token in one call. Each check accepts `permission` (singular) or `permissions` (array — ALL must be held); pass an `id` to correlate results back to inputs. Each result reports `authorized` plus the missing permissions (if any). Token source: `body.token` if provided, else the `Authorization: Bearer <jwt>` header. At least one must be present.
Path parameters
app_slug*stringSlug of the app.
Request body
tokenstringJWT to verify and authorize against each check. Optional — if omitted, the token is read from the `Authorization: Bearer <jwt>` header.
checks*arrayList of checks. Each returns { id?, authorized, missing_permissions }.
Response · 200
results*arrayOne result per check, in request order, each echoing its `id`.
Example
Request
POST https://api.auth.productcraft.co/{app_slug}/v1/authorize/batch
Content-Type: application/json
{
"token": "string",
"checks": [
{
"id": "string",
"permission": "string",
"permissions": [
"string"
]
}
]
}Response
{
"results": [
{
"id": "string",
"authorized": false,
"missing_permissions": [
"string"
]
}
]
}