{
  "info": {
    "_postman_id": "80e29bbc-d839-4f20-9cbd-1d0aa4547dd8",
    "name": "AuthenChain Public API v1.0.0",
    "description": "Generated deterministically from /openapi/authenchain-v1.json. Start with Sign, then Verify and Lookup.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.authenchain.com",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    },
    {
      "key": "idempotencyKey",
      "value": "sign:{{$guid}}",
      "type": "string"
    },
    {
      "key": "contentHash",
      "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "type": "string"
    },
    {
      "key": "signature",
      "value": "",
      "type": "string"
    },
    {
      "key": "publicKeyId",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Sign content provenance",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}",
            "type": "text"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"content_hash\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"metadata\": {\n    \"issuer\": \"generation-worker\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/provenance/sign",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "provenance",
            "sign"
          ]
        },
        "description": "POST /api/provenance/sign"
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "if (pm.response.code === 200) {",
              "  const value = pm.response.json();",
              "  pm.collectionVariables.set('contentHash', value.content_hash);",
              "  pm.collectionVariables.set('signature', value.signature);",
              "  pm.collectionVariables.set('publicKeyId', value.public_key_id);",
              "}"
            ]
          }
        }
      ]
    },
    {
      "name": "Verify signed provenance",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"content_hash\": \"{{contentHash}}\",\n  \"metadata\": {\n    \"issuer\": \"postman-sandbox\"\n  },\n  \"signature\": \"{{signature}}\",\n  \"public_key_id\": \"{{publicKeyId}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/provenance/verify",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "provenance",
            "verify"
          ]
        },
        "description": "POST /api/provenance/verify"
      }
    },
    {
      "name": "Verify an external record binding",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"external_system\": \"customer-ledger\",\n  \"external_record_id\": \"record-123\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/provenance/verify-external-record",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "provenance",
            "verify-external-record"
          ]
        },
        "description": "POST /api/provenance/verify-external-record"
      }
    },
    {
      "name": "Look up a published SHA-256 hash",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/public/evidence/lookup?hash={{contentHash}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "public",
            "evidence",
            "lookup"
          ],
          "query": [
            {
              "key": "hash",
              "value": "{{contentHash}}"
            }
          ]
        },
        "description": "GET /api/public/evidence/lookup"
      }
    },
    {
      "name": "Cryptographically verify an Evidence Pack",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"evidencePack\": {\n    \"proofs\": [],\n    \"evidenceEnvelope\": {}\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/public/evidence/verify",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "public",
            "evidence",
            "verify"
          ]
        },
        "description": "POST /api/public/evidence/verify"
      }
    },
    {
      "name": "Get trusted Evidence Pack signing keys",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/public/evidence/trust-root",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "public",
            "evidence",
            "trust-root"
          ]
        },
        "description": "GET /api/public/evidence/trust-root"
      }
    }
  ]
}
