/v1/apps/{app_id}/roles/{role_name}AuthGet role details with permissions
Path parameters
app_id*stringId of the app.
role_name*stringName of the role (e.g. `admin`).
Response · 200
id*stringRole UUID.
app_id*stringApp scope (UUID).
name*stringRole name slug.
Example: "admin"
description*stringFree-text description.
is_system*booleanWhether this is a system role (owner / admin / member).
created_at*string · date-timeWhen the role was created (ISO 8601).
updated_at*string · date-timeWhen the role was last changed (ISO 8601).
permissions*arrayPermission keys (`resource.action`) the role grants.
Example
Request
GET https://api.auth.productcraft.co/v1/apps/{app_id}/roles/{role_name}
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const role = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").roles.retrieve("admin");auth.admin.app(…).roles.retrieve(roleName, options?): Auth.RoleWithPermissions
Response
{
"id": "string",
"app_id": "string",
"name": "admin",
"description": "string",
"is_system": false,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"permissions": [
{
"id": "string",
"resource": "user",
"action": "read",
"description": "string"
}
]
}