Platform API reference

Platform API · Introspect

get/v1/introspect/workspaces/{workspace_id}Auth

Introspect caller's membership + effective policy + enabled services in a workspace

Path parameters

workspace_id*string

Id of the workspace.

Response · 200

idstring · uuid

Canonical workspace UUID. Only present for members — non-members get a uniform low-information response.

is_member*boolean

Whether the caller is a member of the workspace (a workspace key bound to it counts as one). Non-members get no `id`, no role and an empty policy.

role*object

The caller's role in the workspace (`{ id, name: 'pak' }` for a workspace key), or `null` for a non-member.

policy*array

Effective IAM-style policy for this caller in this workspace.

services*array

Enabled services on this workspace.

Example: ["mail","waitlist"]

Example

Request

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

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "is_member": false,
  "role": {},
  "policy": [
    {
      "effect": "allow",
      "actions": [
        "social.read",
        "social.list"
      ],
      "resources": [
        "*"
      ]
    }
  ],
  "services": [
    "mail",
    "waitlist"
  ]
}