{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/raccha-ai/json-schema/raccha-ai-device-approve-body-schema.json",
  "title": "DeviceApproveBody",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/raccha-ai-openapi.yaml#/components/schemas/DeviceApproveBody",
  "type": "object",
  "required": [
    "decision",
    "user_code"
  ],
  "properties": {
    "credential_type": {
      "description": "Required when decision == \"approve\": \"owner_key\" or \"access_key\".",
      "default": null,
      "type": [
        "string",
        "null"
      ]
    },
    "decision": {
      "description": "\"approve\" or \"deny\".",
      "type": "string"
    },
    "device_name": {
      "description": "Becomes the minted credential's `label` — identifies and lets the human revoke this device later via the existing revoke path.",
      "default": "",
      "type": "string"
    },
    "role_ids": {
      "description": "Required (non-empty) when credential_type == \"access_key\".",
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "user_code": {
      "type": "string"
    }
  }
}