Unkey · Schema

V2KeysSetPermissionsRequestBody

APIKeysRate LimitingAuthenticationDeveloper PlatformAccess ControlIdentityAnalytics

Properties

Name Type Description
keyId string Specifies which key receives the additional permissions using the database identifier returned from `keys.createKey`. Do not confuse this with the actual API key string that users include in requests.
permissions array The permissions to set for this key. This is a complete replacement operation - it overwrites all existing direct permissions with this new set. Key behaviors: - Providing an empty array removes all d
View JSON Schema on GitHub

JSON Schema

unkey-v2keyssetpermissionsrequestbody-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/V2KeysSetPermissionsRequestBody",
  "title": "V2KeysSetPermissionsRequestBody",
  "type": "object",
  "required": [
    "keyId",
    "permissions"
  ],
  "properties": {
    "keyId": {
      "type": "string",
      "minLength": 3,
      "maxLength": 255,
      "pattern": "^[a-zA-Z0-9_]+$",
      "description": "Specifies which key receives the additional permissions using the database identifier returned from `keys.createKey`.\nDo not confuse this with the actual API key string that users include in requests.\n",
      "example": "key_2cGKbMxRyIzhCxo1Idjz8q"
    },
    "permissions": {
      "type": "array",
      "description": "The permissions to set for this key.\n\nThis is a complete replacement operation - it overwrites all existing direct permissions with this new set.\n\nKey behaviors:\n- Providing an empty array removes all direct permissions from the key\n- This only affects direct permissions - permissions granted through roles are not affected\n- All existing direct permissions not included in this list will be removed\n\nAny permissions that do not exist will be auto created if the root key has permissions, otherwise this operation will fail with a 403 error.",
      "items": {
        "type": "string",
        "minLength": 3,
        "pattern": "^[a-zA-Z0-9_:\\-\\.\\*]+$",
        "description": "Specify the permission by its slug."
      }
    }
  },
  "additionalProperties": false
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/unkey-v2keyssetpermissionsrequestbody"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.