Auth API reference

Auth API · Roles

get/v1/apps/{app_id}/roles/{role_name}Auth

Get role details with permissions

Path parameters

app_id*string

Id of the app.

role_name*string

Name of the role (e.g. `admin`).

Response · 200

id*string

Role UUID.

app_id*string

App scope (UUID).

name*string

Role name slug.

Example: "admin"

description*string

Free-text description.

is_system*boolean

Whether this is a system role (owner / admin / member).

created_at*string · date-time

When the role was created (ISO 8601).

updated_at*string · date-time

When the role was last changed (ISO 8601).

permissions*array

Permission keys (`resource.action`) the role grants.

Example

Request

GET https://api.auth.productcraft.co/v1/apps/{app_id}/roles/{role_name}
Authorization: Bearer YOUR_TOKEN

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"
    }
  ]
}