{
  "info": {
    "name": "Kira Integration Surface",
    "description": "Kira MCP gateway and webhook ingress. Set the kiraHost and kiraToken collection variables with the values issued at partner onboarding. Docs: https://docs.getrezonate.com",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.1.0"
  },
  "variable": [
    { "key": "kiraHost", "value": "https://your-kira-host.example.com", "type": "string" },
    { "key": "kiraToken", "value": "", "type": "string" },
    { "key": "ingressSecret", "value": "", "type": "string" },
    { "key": "connectionId", "value": "your-connection-id", "type": "string" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{kiraToken}}", "type": "string" }]
  },
  "item": [
    {
      "name": "1. List available tools",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{kiraHost}}/mcp", "host": ["{{kiraHost}}"], "path": ["mcp"] },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/list\"\n}"
        },
        "description": "Discovers the tools enabled for your tenant. Requires the Kira-issued bearer credential (kiraToken variable)."
      }
    },
    {
      "name": "2. Call a read tool",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{kiraHost}}/mcp", "host": ["{{kiraHost}}"], "path": ["mcp"] },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"connector_search_record\",\n    \"arguments\": { \"phone\": \"+61400000000\" }\n  }\n}"
        },
        "description": "Replace the tool name with one returned by tools/list. Tool output is in result.content[0].text."
      }
    },
    {
      "name": "3. Call a write tool (idempotent)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{kiraHost}}/mcp", "host": ["{{kiraHost}}"], "path": ["mcp"] },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 3,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"connector_log_interaction\",\n    \"arguments\": {\n      \"externalId\": \"external-record-id\",\n      \"subject\": \"Membership enquiry\",\n      \"idempotencyKey\": \"conv-abc-turn-4\"\n    }\n  }\n}"
        },
        "description": "Write tools require an idempotencyKey so retried calls do not create duplicate records."
      }
    },
    {
      "name": "4. Webhook ingress (configured at onboarding)",
      "request": {
        "method": "POST",
        "auth": {
          "type": "bearer",
          "bearer": [{ "key": "token", "value": "{{ingressSecret}}", "type": "string" }]
        },
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": {
          "raw": "{{kiraHost}}/webhooks/partner/{{connectionId}}",
          "host": ["{{kiraHost}}"],
          "path": ["webhooks", "partner", "{{connectionId}}"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"tenantId\": \"your-tenant-id\",\n  \"event\": \"membership.lapsed\",\n  \"externalId\": \"external-record-id\",\n  \"payload\": {}\n}"
        },
        "description": "Example of the inbound event pattern. The concrete route and the ingress secret are provisioned during partner onboarding; expect HTTP 202 with { scheduled: true }."
      }
    }
  ]
}
