{
  "info": {
    "name": "Frod Antifraud API",
    "description": "Publishable fk_pk_* for network collect; secret fk_sk_* for assess/email.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "http://127.0.0.1:8788" },
    { "key": "secretKey", "value": "fk_sk_test_demo" },
    { "key": "publishableKey", "value": "fk_pk_growth_demo" },
    { "key": "growthSecret", "value": "fk_sk_growth_demo" }
  ],
  "item": [
    {
      "name": "Health",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/v1/health"
      }
    },
    {
      "name": "Schema",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/v1/schema"
      }
    },
    {
      "name": "Assess email (secret)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-Api-Key", "value": "{{secretKey}}" },
          { "key": "Content-Type", "value": "application/json" },
          { "key": "Idempotency-Key", "value": "postman-{{$timestamp}}" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"email\": \"user@mailinator.com\",\n  \"policy\": \"balanced\",\n  \"context\": { \"flow\": \"signup\" }\n}"
        },
        "url": "{{baseUrl}}/v1/assess"
      }
    },
    {
      "name": "Email reputation (secret)",
      "request": {
        "method": "GET",
        "header": [{ "key": "X-Api-Key", "value": "{{secretKey}}" }],
        "url": "{{baseUrl}}/v1/email/user@mailinator.com"
      }
    },
    {
      "name": "Create network session (publishable)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-Api-Key", "value": "{{publishableKey}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{ \"policy\": \"balanced\" }"
        },
        "url": "{{baseUrl}}/v1/network/sessions"
      }
    },
    {
      "name": "Assess with session (growth secret)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-Api-Key", "value": "{{growthSecret}}" },
          { "key": "Content-Type", "value": "application/json" },
          { "key": "Idempotency-Key", "value": "postman-live-{{$timestamp}}" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"email\": \"user@mailinator.com\",\n  \"session_id\": \"{{session_id}}\",\n  \"context\": { \"flow\": \"signup\" }\n}"
        },
        "url": "{{baseUrl}}/v1/assess"
      }
    }
  ]
}
