Auth API reference

Auth API · Roles

get/v1/apps/{app_id}/rolesAuth

List all roles in an app. Filter by `?search=` on the role name.

Path parameters

app_id*string

Id of the app.

Query parameters

limitinteger

Page size. Defaults to 20, clamped to 100.

cursorstring

Opaque `next_cursor` from the previous page.

searchstring

Case-insensitive substring match on the role name. Composes with the cursor.

Response · 200 Paginated role list.

data*array

The role items on this page.

pagination*object
next_cursor*string

Opaque cursor for the next page. `null` when no more pages are available.

Example: "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ"

has_more*boolean

True iff another page exists; if true, pass `next_cursor` on the next request.

Example: false

Example

Request

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

Response

{
  "data": [
    {
      "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"
    }
  ],
  "pagination": {
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ",
    "has_more": false
  }
}