Platform API reference

Platform API · Workspace-Policies

get/v1/workspaces/{workspace_slug}/policiesAuth

List managed policies in a workspace, alphabetically. 20/page (max 100), cursor-paginated.

Path parameters

workspace_slug*string

Slug of the workspace. Platform routes name the workspace by slug, positionally in the SDK (`platform.workspaces.retrieve("acme")`); the product APIs bind `workspace_id` instead.

Query parameters

limitinteger

Page size. Defaults to 20, clamped to 100.

cursorstring

Opaque `next_cursor` from the previous page.

Response · 200 Page of managed policies with `next_cursor` and `has_more`.

data*array

One page of managed policies.

pagination*object
next_cursor*string

Pass as `cursor` to get the next page; `null` on the last page.

Example: null

has_more*boolean

Whether another page follows this one.

Example: false

Example

Request

GET https://api.platform-auth.productcraft.co/v1/workspaces/{workspace_slug}/policies
Authorization: Bearer YOUR_TOKEN

Response

{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "workspace_id": "00000000-0000-0000-0000-000000000000",
      "name": "mail-readonly",
      "description": "string",
      "policy": [
        {
          "effect": "allow",
          "actions": [
            "social.read",
            "social.list"
          ],
          "resources": [
            "*"
          ]
        }
      ],
      "preset_key": "mail-send",
      "created_by": "00000000-0000-0000-0000-000000000000",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "next_cursor": null,
    "has_more": false
  }
}