{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/coincover/main/json-schema/coincover-key-generate-request-schema.json",
  "title": "KeyGenerateRequest",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/coincover-retail-openapi-openapi.json#/components/schemas/KeyGenerateRequest",
  "type": "object",
  "properties": {
    "user_identifier": {
      "type": "string",
      "description": "User identifier (REQUIRED)"
    },
    "verification_id": {
      "type": "string",
      "description": "Verification ID from a previous verification. (REQUIRED) Must exist in identity_verifications table and belong to the user associated with the organisation."
    },
    "sign_with": {
      "type": "array",
      "description": "Optional context fields to bind into the enclave signature. public_key is always signed implicitly and must not be included. Every requested field must resolve to a non-empty value, except key_fingerprint which may resolve after generation. Each field may only be listed once.",
      "items": {
        "type": "string",
        "enum": [
          "external_customer_id",
          "external_package_id",
          "pulled_by_id",
          "pulled_by_type",
          "user_id",
          "key_id",
          "key_fingerprint"
        ]
      }
    }
  },
  "required": [
    "user_identifier",
    "verification_id"
  ]
}