Platform API reference

Platform API · Platform-Api-Keys

get/v1/workspaces/{workspace_slug}/api-keys/presetsAuth

List the ready-made permission sets a workspace key can be minted with (`preset` on create), each with a label, a description and what it allows in this workspace, in plain sentences. A preset a key has already used reads its stored policy, so edits show.

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.

Response · 200

data*array

Every preset a key can be minted from.

pagination*object

Always a single page: there are five presets.

Example

Request

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

Response

{
  "data": [
    {
      "key": "mail-send",
      "label": "Send email",
      "description": "Send email from your verified domains and check what happened to it. Cannot read message bodies or change domains.",
      "policy_id": "00000000-0000-0000-0000-000000000000",
      "allowed": [
        "Mail: Send email from your verified domains"
      ],
      "actions": [
        "mail.send"
      ]
    }
  ],
  "pagination": {}
}