{
  "openapi": "3.1.0",
  "info": {
    "title": "Confrmo API",
    "version": "1",
    "description": "The routes a relying party calls to sign people in with Confrmo, and the open lookups anybody can call. Every route here is live and answers today. Sign-in calls carry your App Secret as a bearer token: Authorization: Bearer sk_live_... Partner item calls carry the App ID and App Secret as X-App-Id and X-App-Secret. Ledger issuer calls carry a separate Ledger API key as X-API-Key. Confrmo issues all of these on request; keep every one of them on your server, never in a browser or an app. Errors come back as JSON with an error field, usually a short code such as {\"error\": \"not_found\"} and sometimes a sentence or an extra message field. The HTTP status tells you the class of problem. The public lookups allow 60 requests a minute and answer 429 rate_limited beyond that. A route that does not exist answers 404 with a plain page rather than JSON."
  },
  "servers": [
    {
      "url": "https://api.confrmo.com"
    }
  ],
  "paths": {
    "/auth/luna/session/start": {
      "post": {
        "summary": "Start a sign-in session",
        "tags": [
          "Confrmo Connect: sign-in"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "login, register or pair. Defaults to login."
                  },
                  "action": {
                    "type": "string",
                    "description": "Optional. confirm, identity or url."
                  },
                  "rpDomain": {
                    "type": "string",
                    "description": "Optional. The domain the person is signing in to."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"sid\": \"sess_3f9a1c0b7d2e4a6f8b1c\",\n  \"status\": \"pending\",\n  \"type\": \"login\",\n  \"rpDomain\": \"example.com\",\n  \"expiresAt\": \"2026-10-01T18:03:00.000Z\",\n  \"ttlSeconds\": 90,\n  \"vcode\": { \"uti\": \"...\", \"pngUrl\": \"/auth/luna/session/sess_3f9a1c0b7d2e4a6f8b1c/vcode.png\" },\n  \"openUrl\": \"https://api.confrmo.com/auth/luna/open?sid=sess_3f9a1c0b7d2e4a6f8b1c\"\n}"
              }
            }
          },
          "400": {
            "description": "type or action is not one of the allowed values"
          },
          "401": {
            "description": "Missing or malformed Bearer App Secret, or Invalid App Secret"
          }
        }
      }
    },
    "/auth/luna/session/{sid}/vcode.png": {
      "get": {
        "summary": "The VCode image to show the person",
        "tags": [
          "Confrmo Connect: sign-in"
        ],
        "description": "Scanning it with the Confrmo app opens the approval. On a phone, link to openUrl instead. Answers 410 once the session has expired or been consumed.",
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "image/png": {}
            }
          },
          "404": {
            "description": "Unknown session"
          },
          "410": {
            "description": "Session expired or already consumed"
          }
        }
      }
    },
    "/auth/luna/session/{sid}/status": {
      "get": {
        "summary": "Poll until the person approves",
        "tags": [
          "Confrmo Connect: sign-in"
        ],
        "description": "Poll every second or two. Status moves from pending to approved, denied or expired.",
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"sid\": \"sess_3f9a1c0b7d2e4a6f8b1c\",\n  \"status\": \"approved\",\n  \"expiresAt\": \"2026-10-01T18:03:00.000Z\",\n  \"approvedAt\": \"2026-10-01T18:01:12.000Z\"\n}"
              }
            }
          },
          "404": {
            "description": "Session not found"
          }
        }
      }
    },
    "/auth/luna/session/{sid}/consume": {
      "post": {
        "summary": "Find out who signed in",
        "tags": [
          "Confrmo Connect: sign-in"
        ],
        "description": "Call once, from your server, after status is approved. userHandle is stable for one person in your application and different in every other application, so it cannot be used to follow somebody between sites. identityAssurance is set only when the person's passport has been checked.",
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"message\": \"Session consumed\",\n  \"sid\": \"sess_3f9a1c0b7d2e4a6f8b1c\",\n  \"userHandle\": \"9c1e4f0a6b2d8e3f7a5c1b9d0e2f4a6c8b1d3e5f7a9c0b2d4e6f8a1c3e5b7d9f\",\n  \"presentedEmail\": \"person@example.com\",\n  \"approvedAt\": \"2026-10-01T18:01:12.000Z\",\n  \"intent\": null,\n  \"identityAssurance\": \"IDENTITY_CHECKED_AGAINST_PASSPORT\",\n  \"identityCheckedAt\": \"2026-09-12T10:22:41.000Z\",\n  \"authenticatorAssurance\": \"DEVICE_KEY_SIGNED\"\n}"
              }
            }
          },
          "404": {
            "description": "Unknown session, or a session started by another application"
          },
          "409": {
            "description": "Session already consumed, or not approved"
          }
        }
      }
    },
    "/auth/luna/rp/profile-photo": {
      "get": {
        "summary": "The person's profile photo, if they have one",
        "tags": [
          "Confrmo Connect: sign-in"
        ],
        "parameters": [
          {
            "name": "userHandle",
            "in": "query",
            "required": true,
            "description": "The 64 character userHandle from consume.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"photoUrl\": \"https://names.confrmo.com/...\"\n}"
              }
            }
          },
          "400": {
            "description": "E_BAD_HANDLE"
          },
          "404": {
            "description": "E_NO_PHOTO"
          }
        }
      }
    },
    "/api/v1/assets/register": {
      "post": {
        "summary": "Register an asset",
        "tags": [
          "Ledger: issuers"
        ],
        "description": "Every registration is signed and starts the asset's audit trail. Pass document_sha256 to bind a document without sending it.",
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Required."
                  },
                  "asset_type": {
                    "type": "string",
                    "description": "Required."
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional."
                  },
                  "code": {
                    "type": "string",
                    "description": "Optional. Your own code, in the form XXXX-XXXXXX-XX or CL-XXXX-XXXX."
                  },
                  "document_url": {
                    "type": "string",
                    "description": "Optional."
                  },
                  "document_sha256": {
                    "type": "string",
                    "description": "Optional."
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Optional."
                  },
                  "transaction_ref": {
                    "type": "string",
                    "description": "Optional."
                  },
                  "transaction_date": {
                    "type": "string",
                    "description": "Optional."
                  },
                  "event_starts_at": {
                    "type": "string",
                    "description": "Optional, for tickets."
                  },
                  "event_venue": {
                    "type": "string",
                    "description": "Optional, for tickets."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"asset_id\": \"ast_3f9a1c2b7d4e\",\n  \"code\": \"CL-7KQM-4HTP\",\n  \"verify_url\": \"https://ledger.confrmo.com/verify/CL-7KQM-4HTP\",\n  \"badge\": \"Verified by Confrmo\"\n}"
              }
            }
          },
          "400": {
            "description": "missing_fields, invalid_code_format"
          },
          "409": {
            "description": "code_or_vcode_already_registered"
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/assets/{assetId}/vcode": {
      "post": {
        "summary": "Attach a VCode to one of your assets",
        "tags": [
          "Ledger: issuers"
        ],
        "description": "One VCode per asset. Print or display the image; scanning it opens the live record.",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"asset_id\": \"ast_3f9a1c2b7d4e\",\n  \"code\": \"7F3K-9QXM2P-4H\",\n  \"previous_code\": \"CL-7KQM-4HTP\",\n  \"uti\": \"...\",\n  \"vcode_image_url\": \"/ledger/vcode/ast_3f9a1c2b7d4e.png\",\n  \"verify_url\": \"https://ledger.confrmo.com/verify/7F3K-9QXM2P-4H\"\n}"
              }
            }
          },
          "409": {
            "description": "vcode_already_attached"
          },
          "502": {
            "description": "vcode_mint_failed"
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/ledger/vcode/{assetId}.png": {
      "get": {
        "summary": "The asset's VCode image",
        "tags": [
          "Ledger: issuers"
        ],
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": true,
            "description": "Optional, up to 1024.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "image/png": {}
            }
          },
          "404": {
            "description": "no_vcode"
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/assets/{assetId}/ownership/assign": {
      "post": {
        "summary": "Assign an owner, or approve a pending ownership claim",
        "tags": [
          "Ledger: issuers"
        ],
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string",
                    "description": "A pending claim from GET /api/v1/issuer/ownership/pending. Or send user_id instead."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"asset_id\": \"ast_3f9a1c2b7d4e\",\n  \"claim_id\": \"own_8c2d1e\",\n  \"status\": \"approved\",\n  \"label\": \"It's Mine by Confrmo\"\n}"
              }
            }
          },
          "400": {
            "description": "claim_id_or_user_id_required"
          },
          "404": {
            "description": "claim_not_found"
          },
          "409": {
            "description": "claim_not_pending"
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/assets/{assetId}/ownership/{claimId}/reject": {
      "post": {
        "summary": "Reject an ownership claim",
        "tags": [
          "Ledger: issuers"
        ],
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"claim_id\": \"own_8c2d1e\",\n  \"status\": \"rejected\"\n}"
              }
            }
          },
          "404": {
            "description": "claim_not_found"
          },
          "409": {
            "description": "claim_not_pending"
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/assets/{assetId}/transfer": {
      "post": {
        "summary": "Move ownership to another Confrmo user",
        "tags": [
          "Ledger: issuers"
        ],
        "description": "Takes effect immediately and is written to the audit trail. A transfer between owners, with the owner's approval in the app, is started by the owner in Confrmo rather than through this API.",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"asset_id\": \"ast_3f9a1c2b7d4e\",\n  \"transferred_to\": \"...\",\n  \"claim_id\": \"own_...\"\n}"
              }
            }
          },
          "400": {
            "description": "to_user_id_required"
          },
          "409": {
            "description": "asset_not_active"
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/assets/{assetId}/revoke": {
      "post": {
        "summary": "Revoke an asset. /flag and /reinstate work the same way.",
        "tags": [
          "Ledger: issuers"
        ],
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"asset_id\": \"ast_3f9a1c2b7d4e\",\n  \"status\": \"revoked\"\n}"
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/issuer/assets": {
      "get": {
        "summary": "List your assets",
        "tags": [
          "Ledger: issuers"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Optional search. Up to 200 results.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"assets\": [ { \"asset_id\": \"ast_3f9a1c2b7d4e\", \"code\": \"CL-7KQM-4HTP\", ... } ]\n}"
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/issuer/ownership/pending": {
      "get": {
        "summary": "Ownership claims waiting for you",
        "tags": [
          "Ledger: issuers"
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"pending\": [ ... ]\n}"
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/issuer/assets/{assetId}/audit": {
      "get": {
        "summary": "An asset's audit trail",
        "tags": [
          "Ledger: issuers"
        ],
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"asset_id\": \"ast_3f9a1c2b7d4e\",\n  \"chain_intact\": true,\n  \"entries\": [ { ..., \"anchor\": { ... }, \"proof_url\": \"...\" } ]\n}"
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/issuer/me": {
      "get": {
        "summary": "Which issuer and scopes your key belongs to",
        "tags": [
          "Ledger: issuers"
        ],
        "security": [
          {
            "ledgerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"client\": { \"id\": \"...\", \"name\": \"...\", \"role\": \"issuer\", \"scopes\": [\"register\", \"lookup\", \"ownership\", \"transfer\"] },\n  \"issuer\": { ... }\n}"
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/api/v1/ledger/anchors": {
      "get": {
        "summary": "Public anchors of the Ledger",
        "tags": [
          "Ledger: issuers"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"chain\": \"VDM\",\n  \"anchors\": [ ... ]\n}"
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "https://ledger.confrmo.com"
        }
      ]
    },
    "/partner/items": {
      "post": {
        "summary": "Offer an item to a person",
        "tags": [
          "Partner items: It's Mine"
        ],
        "security": [
          {
            "appId": [],
            "appSecret": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipientCode": {
                    "type": "string",
                    "description": "The person's Confrmo code."
                  },
                  "name": {
                    "type": "string",
                    "description": "Required."
                  },
                  "itemType": {
                    "type": "string",
                    "description": "ticket, vehicle, watch_jewellery, electronics, art_collectibles, luxury_goods, document, property, equipment or other."
                  },
                  "serialNumber": {
                    "type": "string",
                    "description": "Optional."
                  },
                  "contactEmail": {
                    "type": "string",
                    "description": "Optional."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"ok\": true,\n  \"item\": { \"id\": \"itm_...\", \"name\": \"Founders Edition watch\", \"vcode_number\": \"CIY-4F2A-9B1C\", \"ledger_code\": \"...\", \"verify_url\": \"...\" },\n  \"offer\": { \"status\": \"pending\", \"recipient\": \"resolved\" }\n}"
              }
            }
          },
          "400": {
            "description": "name is required, or itemType must be one of the listed values"
          },
          "401": {
            "description": "app credentials required, or invalid app credentials"
          },
          "404": {
            "description": "recipient_not_found"
          }
        }
      }
    },
    "/api/v1/assets/lookup/{code}": {
      "get": {
        "summary": "Look up a Ledger asset by its code",
        "tags": [
          "Open lookups"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"product\": \"...\",\n  \"badge\": \"...\",\n  \"asset\": { ... },\n  \"issuer\": { ... },\n  \"verification\": { \"signature_valid\": true, \"verified\": true, \"checked_at\": \"...\" }\n}"
              }
            }
          },
          "404": {
            "description": "not_found"
          },
          "429": {
            "description": "rate_limited"
          }
        },
        "x-rate-limit": "60 requests a minute"
      }
    },
    "/verify/items/{code}": {
      "get": {
        "summary": "Check an item record",
        "tags": [
          "Open lookups"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{\n  \"ok\": true,\n  \"verifiedBy\": \"Confrmo\",\n  \"item\": { ... }\n}"
              }
            }
          },
          "404": {
            "description": "not_found"
          }
        }
      }
    },
    "/ping": {
      "get": {
        "summary": "Liveness check",
        "tags": [
          "Service"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{ \"data\": \"ok\" }"
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "summary": "API version",
        "tags": [
          "Service"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "example": "{ \"data\": \"1.0.0\" }"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      },
      "ledgerKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "appId": {
        "type": "apiKey",
        "in": "header",
        "name": "X-App-Id"
      },
      "appSecret": {
        "type": "apiKey",
        "in": "header",
        "name": "X-App-Secret"
      }
    }
  }
}