{
  "info": {
    "name": "ELYSÉA Core REST API",
    "description": "Générée depuis la spécification OpenAPI du SDK (Elysea-infrastruture/elysea-sdk@510cab01, docs/openapi.yaml). Renseignez baseUrl (fournie à l'activation), apiKey et apiSecret dans les variables de la collection — jamais dans un fichier partagé. Le secret HMAC est obligatoire pour toutes les routes /sdk/*.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": ""
    },
    {
      "key": "apiKey",
      "value": ""
    },
    {
      "key": "apiSecret",
      "value": ""
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Signature ELYSÉA (routes /sdk/*) : HMAC-SHA256 de « horodatage:corps » avec apiSecret — comme le SDK.",
          "if (pm.request.url.getPath().startsWith('/sdk/')) {",
          "  const ts = Date.now().toString();",
          "  const corps = pm.request.body && pm.request.body.raw ? pm.request.body.raw : '';",
          "  const secret = pm.collectionVariables.get('apiSecret');",
          "  if (!secret) throw new Error('Variable apiSecret vide : renseignez-la (jamais dans un fichier partagé).');",
          "  const sig = CryptoJS.HmacSHA256(ts + ':' + corps, secret).toString(CryptoJS.enc.Hex);",
          "  pm.request.headers.upsert({ key: 'X-Elysea-Api-Key', value: pm.collectionVariables.get('apiKey') });",
          "  pm.request.headers.upsert({ key: 'X-Elysea-Timestamp', value: ts });",
          "  pm.request.headers.upsert({ key: 'X-Elysea-Signature', value: 'sha256=' + sig });",
          "  pm.request.headers.upsert({ key: 'X-Elysea-Api-Version', value: '2026-06-15' });",
          "}"
        ]
      }
    }
  ],
  "item": [
    {
      "name": "POST /sdk/chat/pipeline — ELYSÉA canonical pipeline",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/chat/pipeline",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "chat",
            "pipeline"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : pipelineRun"
      }
    },
    {
      "name": "POST /sdk/memory/summary — User memory summary (Garantie K)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/memory/summary",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "memory",
            "summary"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : memorySummary"
      }
    },
    {
      "name": "POST /sdk/memory/tag — Memory contextual tags",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/memory/tag",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "memory",
            "tag"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : memoryTags"
      }
    },
    {
      "name": "POST /sdk/memory/write — Memory write (P7 — consentToken required)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/memory/write",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "memory",
            "write"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : memoryWrite"
      }
    },
    {
      "name": "DELETE /sdk/memory/delete — Memory deletion — GDPR Art. 17 (P7 — consentToken required)",
      "request": {
        "method": "DELETE",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/memory/delete",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "memory",
            "delete"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : memoryDelete"
      }
    },
    {
      "name": "GET /sdk/identity/capabilities — Available canonical capabilities",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/identity/capabilities",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "identity",
            "capabilities"
          ]
        },
        "description": "operationId : identityCapabilities"
      }
    },
    {
      "name": "POST /sdk/identity/resolve — Identity resolution JWT → coreUserId",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/identity/resolve",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "identity",
            "resolve"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : identityResolve"
      }
    },
    {
      "name": "POST /sdk/guardian/audit — Guardian audit (B1)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sdk/guardian/audit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sdk",
            "guardian",
            "audit"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : guardianAudit"
      }
    },
    {
      "name": "GET /verify/{appId} — TrustMark verification for an app (public)",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/verify/:appId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "verify",
            ":appId"
          ]
        },
        "description": "operationId : verifyApp"
      }
    },
    {
      "name": "POST /verify/attestation — Cryptographic attestation verification (public)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/verify/attestation",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "verify",
            "attestation"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : verifyAttestation"
      }
    },
    {
      "name": "POST /widget/chat — Widget chat (publishable key pk_)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/widget/chat",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "widget",
            "chat"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "operationId : widgetChat"
      }
    }
  ]
}
