Auth API reference

Auth API · Consumer-Admin-Roles

get/{app_slug}/v1/admin/roles/{role_name}Auth

Read one role with its permission set

Returns the role plus the flat `permissions[]` array currently bound. Use this to drive a "configure role" UI in the customer product without having to call `/permissions` separately.

Path parameters

app_slug*string

Slug of the app.

role_name*string

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

Response · 200

id*string

Unique identifier of the role.

app_id*string

The Auth app the role belongs to.

name*string

Name of the role.

description*string

Free-text description of the role, or `null`.

is_system*boolean

True for the built-in roles every app has; they cannot be renamed or deleted.

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/{app_slug}/v1/admin/roles/{role_name}
Authorization: Bearer YOUR_TOKEN

Response

{
  "id": "string",
  "app_id": "string",
  "name": "string",
  "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"
    }
  ]
}