Miracle Docs
Api keys

List permissions grantable on a new API key

Returns the permission codes a key of ownerType may carry when the caller issues it: the owner-layer set (merchant keys: merchant layer; tenant keys: operator layer) intersected with the caller's own permissions. A create request whose permissions stay inside this list passes both permission checks.

GET
/v1/api-keys/grantable-permissions
AuthorizationBearer <token>

In: header

Query Parameters

ownerType*string

Owner scope. "merchant" issues a key bound to a single merchant; "tenant" issues a tenant-wide key.

Value in"merchant" | "tenant"

Response Body

application/json

curl -X GET "https://<api-host>/v1/api-keys/grantable-permissions?ownerType=merchant"
{
  "data": [
    {
      "code": "string",
      "domain": "string",
      "resource": "string",
      "action": "string",
      "description": "string",
      "availableForLayers": [
        "merchant"
      ]
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "prevCursor": "string",
    "hasMore": true,
    "totalCount": 0
  }
}
Empty

On this page