{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flint-network/json-schema/flint-network-passport-issue-request-schema.json",
  "title": "PassportIssueRequest",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flint-network-openapi.json#/components/schemas/PassportIssueRequest",
  "type": "object",
  "required": [
    "agent"
  ],
  "properties": {
    "agent": {
      "type": "object",
      "description": "Agent identity. Signed into the passport.",
      "properties": {
        "agent_id": {
          "type": "string"
        },
        "agent_name": {
          "type": "string"
        },
        "controller_id": {
          "type": "string"
        },
        "controller_type": {
          "type": "string",
          "enum": [
            "user",
            "organization"
          ]
        },
        "wallet_address": {
          "type": "string"
        },
        "attestations": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "controller_name": {
          "type": "string",
          "maxLength": 120,
          "description": "Optional human-readable display label for the controller, signed into the passport identity right after controller_type. Distinct from controller_id: controller_id is the accountable identifier, controller_name is a display label. Null when not supplied."
        }
      }
    },
    "mandate": {
      "type": "object",
      "description": "Mutable spend authority captured at issue. NOT part of the passport signature.",
      "properties": {
        "allowed_actions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "commerce_purchase",
              "checkout.purchase",
              "invoice.pay",
              "subscription.renew",
              "refund.request",
              "quote.retrieve",
              "x402_verification_purchase",
              "stablecoin_transfer",
              "paid_api_access",
              "x402_request",
              "agent_checkout",
              "delegated_spending",
              "project.read",
              "ALL"
            ],
            "description": "One FLINT mandate vocabulary action (see api/lib/mandate-actions.js), or the \"ALL\" preset. \"ALL\" (case-insensitive) or the legacy alias \"all_commerce_v1\" expands server-side to the full vocabulary list at mint or update time; the stored mandate keeps the expanded allowed_actions and also records preset: \"ALL\" so a client can render one checkbox instead of the full list. A string outside this vocabulary is kept for backward compatibility but is reported back in mandate_warnings and will not match any scan until it is added to the vocabulary or aliased."
          }
        },
        "max_transaction_amount": {
          "type": "number"
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "supersede_management_token": {
      "type": "string",
      "description": "Optional. The management_token (raw claim token) of a specific prior UNCLAIMED passport with the same agent_id and controller_id. Presenting it authorizes superseding that prior passport at mint even with no authenticated session, since it proves possession of that prior's own claim link. Without it, and without a session whose controller_assurance is verified or command, a remint that reuses a prior's agent_id and controller_id does not supersede that prior; the prior is left alone and reported back in related_passports with a warning instead."
    }
  }
}