{
  "info": {
    "name": "OpenSteward Admin API",
    "description": "Operator-facing REST surface backing the admin UI. JWT-authenticated; every route emits an OpenAPI operation derived from its Zod validator.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_postman_id": "c72ac9f9-732c-4886-95a8-74c7488104ec"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "{{baseUrl}}",
      "type": "default"
    },
    {
      "key": "adminApiJwt",
      "value": "",
      "type": "secret"
    },
    {
      "key": "tenantId",
      "value": "",
      "type": "default"
    },
    {
      "key": "vertical",
      "value": "accounting",
      "type": "default"
    },
    {
      "key": "platform",
      "value": "",
      "type": "default"
    },
    {
      "key": "resourceId",
      "value": "",
      "type": "default"
    }
  ],
  "item": [
    {
      "name": "Other",
      "description": "",
      "item": [
        {
          "name": "GET /version",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/version",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "version"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "api-keys",
      "description": "",
      "item": [
        {
          "name": "List tenant API keys (active + revoked)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/api-keys",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "api-keys"
              ],
              "query": [
                {
                  "key": "tenantId",
                  "value": "{{tenantId}}",
                  "disabled": true
                },
                {
                  "key": "mode",
                  "value": "live",
                  "disabled": true
                }
              ]
            },
            "description": "List developer API keys (both active and revoked) for the deployment, optionally filtered to one tenant via `tenantId` and to one key mode via `mode`. Operator role or higher — an operator can check whether a key is active without being able to mint one. Returns key metadata only; the plaintext secret is never included."
          },
          "response": []
        },
        {
          "name": "Mint a new tenant API key (plaintext returned once)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/api-keys",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "api-keys"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantId\": \"\",\n  \"label\": \"\",\n  \"scopes\": [\n    \"\"\n  ],\n  \"mode\": \"live\",\n  \"expiresAt\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Mint a new tenant-scoped developer API key. Admin role required. The response includes the plaintext key **once** — it is not stored and cannot be retrieved again. Returns `400` if `tenantId` is missing. Writes an `api_key.mint` audit entry."
          },
          "response": []
        },
        {
          "name": "Rotate a tenant API key (replacement plaintext returned once)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/api-keys/:id/rotate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "api-keys",
                ":id",
                "rotate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"overlapSeconds\": 0,\n  \"expiresAt\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Mint a replacement key with the same tenant, label, scopes and mode, and schedule the old key’s revocation after a grace window (default 24h) in which both keys work — no downtime gap while the new key is rolled out. Admin role required. The response includes the replacement’s plaintext **once**. Returns `404` when the key does not exist, is revoked or expired, or was already rotated inside its grace window. Writes an `api_key.rotate` audit entry."
          },
          "response": []
        },
        {
          "name": "Revoke a tenant API key",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/api-keys/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "api-keys",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Permanently revoke a tenant API key by id, taking effect immediately. Admin role required. Returns `404` if no key matches the id. Writes an `api_key.revoke` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "audit",
      "description": "",
      "item": [
        {
          "name": "Every audit action the registry knows",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/audit/actions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "audit",
                "actions"
              ]
            },
            "description": "The typed action vocabulary, for building filter UIs without hand-typing exact dotted action literals. Admin role required."
          },
          "response": []
        },
        {
          "name": "List audit-log entries, newest first",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/audit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "audit"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "action",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "user_id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "target_id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Column to order by: one of `time`, `user`, `action`, `vertical`, `target`. An unrecognised value is ignored and the default order (newest first) is used. `user` orders by the stored `user_id`, not the username resolved for display.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "",
                  "description": "Sort direction: `asc` or `desc`. Any other value (including omitted) is ascending.",
                  "disabled": true
                },
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "description": "Case-insensitive substring match against the vertical the action touched.",
                  "disabled": true
                }
              ]
            },
            "description": "List operator audit-log entries (paginated, newest first; `limit` capped at 200). Admin role required. Supports filtering by `action`, `user_id`, `target_id` (exact match on the acted-on id — “everything that happened to key X”), `vertical` (case-insensitive substring), and a `from`/`to` date range (ISO-8601 or epoch-ms), plus `sort`/`dir` to order the result. Filters and ordering are applied in SQL before the page slice, so `meta.total` reflects the filtered set and every page reflects the requested order."
          },
          "response": []
        },
        {
          "name": "Export audit-log entries as CSV or JSON",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/audit/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "audit",
                "export"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "action",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "user_id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "target_id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Column to order by: one of `time`, `user`, `action`, `vertical`, `target`. An unrecognised value is ignored and the default order (newest first) is used. `user` orders by the stored `user_id`, not the username resolved for display.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "",
                  "description": "Sort direction: `asc` or `desc`. Any other value (including omitted) is ascending.",
                  "disabled": true
                },
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "description": "Case-insensitive substring match against the vertical the action touched.",
                  "disabled": true
                },
                {
                  "key": "format",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "Export the (optionally filtered) audit log as a downloadable `csv` (default) or `json` attachment, supporting the same filters as the list endpoint. Admin role required. Streamed from a SQLite cursor so large logs do not materialise at once, and the export itself is recorded as an `audit.export` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "auth",
      "description": "",
      "item": [
        {
          "name": "Sign in with username + password",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"\",\n  \"password\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exchange a username and password for a JWT used to authenticate subsequent admin-api calls. No prior authentication required. Subject to lockout after repeated failures (returns `429`, with a `Retry-After` header for temporary locks). Returns `400` if either field is missing, `401` on invalid credentials, and `403` when local login is disabled and the account is not the pinned break-glass admin (SSO-only). Writes a `user.login` audit entry on success."
          },
          "response": []
        },
        {
          "name": "Whether any admin user exists yet (first-run check)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/auth/has-users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "has-users"
              ]
            },
            "description": "Read-only check the setup wizard uses to decide whether to show the first-run form. No authentication required and no side effects. Returns `{ hasUsers: false }` on a fresh deployment, `{ hasUsers: true }` once the first admin has been created."
          },
          "response": []
        },
        {
          "name": "First-run admin bootstrap (only succeeds when no users exist)",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/auth/setup",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "setup"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"\",\n  \"password\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Bootstrap the first `admin` account on a fresh deployment and return a JWT for it. Only succeeds while the user table is empty — returns `409` once any user exists. When the server is started with a `BOOTSTRAP_TOKEN`, the matching token must be supplied in the `X-Bootstrap-Token` header (else `401`), so a fresh or wiped deployment cannot be claimed by an attacker. When NO token is configured, setup is refused from non-loopback addresses (`403`) — a remote first-run must carry a `BOOTSTRAP_TOKEN`; only a caller on the deployment host may set up tokenless. The created admin is auto-pinned as the break-glass account so SSO can be locked down later without losing password access. Returns `400` if username or password is missing."
          },
          "response": []
        },
        {
          "name": "Return the calling user, with permissions and tenant scope",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/auth/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "me"
              ]
            },
            "description": "Return the decoded JWT claims (id, username, role) for the currently authenticated operator, plus the caller's effective role (`roleId`, `roleName`), `permissions` and tenant `scope`. The last three are read from the database on each call (cached for a few seconds), so they reflect a role or scope change made since the token was issued. Any authenticated operator may call this; useful for confirming a token is valid and discovering what the caller may do. Returns `401` if the token is missing or invalid."
          },
          "response": []
        }
      ]
    },
    {
      "name": "company-info",
      "description": "",
      "item": [
        {
          "name": "Read the company-info record (auth-required)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/company-info",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "company-info"
              ]
            },
            "description": "Read the full company-info record (branding plus operator settings) so the admin UI can render the navbar logo and settings forms. Any authenticated operator. Returns `data: null` when no record has been saved yet."
          },
          "response": []
        },
        {
          "name": "Upsert the company-info record",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/company-info",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "company-info"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"legalName\": \"\",\n  \"description\": \"\",\n  \"website\": \"\",\n  \"logoDataUrl\": \"\",\n  \"primaryColor\": \"\",\n  \"secondaryColor\": \"\",\n  \"fontFamily\": \"\",\n  \"fontDataUrl\": \"\",\n  \"fontUrl\": \"\",\n  \"faviconDataUrl\": \"\",\n  \"hideAttribution\": \"\",\n  \"supportEmail\": \"\",\n  \"privacyPolicyUrl\": \"\",\n  \"termsOfServiceUrl\": \"\",\n  \"addressLine1\": \"\",\n  \"addressLine2\": \"\",\n  \"city\": \"\",\n  \"region\": \"\",\n  \"postalCode\": \"\",\n  \"country\": \"\",\n  \"baseUrl\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create or replace the single company-info record (branding and operator settings). Admin role required. Returns `400` with validation issues if the body fails schema validation. Writes a `company_info.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Reset the company-info record to the defaults",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/company-info",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "company-info"
              ]
            },
            "description": "Delete the company-info record (branding and operator settings), returning the deployment to the defaults it ships with: `GET /api/company-info` answers `data: null` again and every branded surface falls back to OpenSteward's own. Admin role required. Idempotent — resetting when nothing is saved also answers `204`. Writes a `company_info.reset` audit entry."
          },
          "response": []
        },
        {
          "name": "Public branding subset (no auth)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/company-info/public",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "company-info",
                "public"
              ]
            },
            "description": "Return only the public branding subset (name, logo, colours, support email, privacy/ToS links, base URL) with **no authentication**. Consumed server-to-server by the hosted Connect Link page to render the host's brand. Sensitive operator settings are never exposed here."
          },
          "response": []
        }
      ]
    },
    {
      "name": "connect-link-templates",
      "description": "",
      "item": [
        {
          "name": "List Connect Link templates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-link-templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-link-templates"
              ],
              "query": [
                {
                  "key": "tenantId",
                  "value": "{{tenantId}}",
                  "disabled": true
                }
              ]
            },
            "description": "List Connect Link templates (reusable presets that define what a generated link lets a customer connect), optionally filtered by `tenantId`. Any authenticated operator."
          },
          "response": []
        },
        {
          "name": "Create a Connect Link template",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-link-templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-link-templates"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantId\": \"\",\n  \"name\": \"\",\n  \"description\": \"\",\n  \"linkMode\": \"pinned\",\n  \"allowedVerticals\": [\n    \"\"\n  ],\n  \"allowedPlatforms\": [\n    {\n      \"vertical\": \"\",\n      \"slug\": \"\"\n    }\n  ],\n  \"scopeGroupId\": \"\",\n  \"expiryDays\": 0,\n  \"oneTimeOnly\": false,\n  \"redirectUrl\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a Connect Link template defining the link mode, allowed verticals/platforms, scope group, expiry, and redirect for links generated from it. Operator role or higher. Returns `400` if `tenantId`/`name` is missing or `linkMode` is invalid, and `409` if a template with that name already exists for the tenant. Writes a `connect_link_template.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Read one Connect Link template",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-link-templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-link-templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read a single Connect Link template by id. Any authenticated operator. Returns `400` for a non-numeric id and `404` if the template does not exist."
          },
          "response": []
        },
        {
          "name": "Update a Connect Link template",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-link-templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-link-templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"linkMode\": \"pinned\",\n  \"allowedVerticals\": [\n    \"\"\n  ],\n  \"allowedPlatforms\": [\n    {\n      \"vertical\": \"\",\n      \"slug\": \"\"\n    }\n  ],\n  \"scopeGroupId\": \"\",\n  \"expiryDays\": 0,\n  \"oneTimeOnly\": false,\n  \"redirectUrl\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Update a Connect Link template; omitted fields are left unchanged. Operator role or higher. Returns `400` for a non-numeric id or invalid `linkMode`, and `404` if the template does not exist. Writes a `connect_link_template.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete a Connect Link template",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-link-templates/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-link-templates",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete a Connect Link template by id. Operator role or higher. Returns `400` for a non-numeric id and `404` if the template does not exist. Writes a `connect_link_template.delete` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "connect-sessions",
      "description": "",
      "item": [
        {
          "name": "List Connect Link sessions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-sessions"
              ],
              "query": [
                {
                  "key": "tenantId",
                  "value": "{{tenantId}}",
                  "disabled": true
                },
                {
                  "key": "endUserId",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "List Connect Link sessions (the hosted authorization flows end-users complete to link an integration), with optional filters for `tenantId`, `endUserId`, `status`, and `limit`/`offset` pagination. Any authenticated operator."
          },
          "response": []
        },
        {
          "name": "Mint a Connect Link session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-sessions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantId\": \"\",\n  \"label\": \"\",\n  \"endUserId\": \"\",\n  \"customerEmail\": \"\",\n  \"customerDisplayName\": \"\",\n  \"allowedVerticals\": [\n    \"\"\n  ],\n  \"allowedPlatforms\": [\n    {\n      \"vertical\": \"\",\n      \"slug\": \"\"\n    }\n  ],\n  \"redirectUrl\": \"\",\n  \"expiresAt\": 0,\n  \"oneTimeOnly\": false,\n  \"syncSchedule\": {\n    \"mode\": \"default\",\n    \"intervalMinutes\": 0\n  },\n  \"scopes\": [\n    \"\"\n  ],\n  \"scopePolicy\": \"read_only\",\n  \"allowSelfRegister\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Mint a new Connect Link session and return its hosted authorization URL to hand to an end-user. Operator role or higher. The requesting operator is recorded as `created_by`. Writes a `connect_session.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Read one Connect Link session",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-sessions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-sessions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read a single Connect Link session by id, including its current status. Any authenticated operator. Returns `404` if the session does not exist."
          },
          "response": []
        },
        {
          "name": "Revoke a Connect Link session",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connect-sessions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connect-sessions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Revoke a Connect Link session by id, invalidating its authorization URL immediately. Operator role or higher. Writes a `connect_session.revoke` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "connections",
      "description": "",
      "item": [
        {
          "name": "List connections across every configured vertical",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connections"
              ],
              "query": [
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "platform",
                  "value": "{{platform}}",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "description": "Case-insensitive substring match against the connection id and label. An id prefix is enough, which is what an operator pastes from a support ticket or a `?connection_id=` call.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Column to order by: one of `label`, `id`, `vertical`, `platform`, `status`, `tenant`, `created`. An unrecognised value is ignored and the default order (most recently updated first) is used.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "",
                  "description": "Sort direction: `asc` or `desc`. Any other value (including omitted) is ascending.",
                  "disabled": true
                },
                {
                  "key": "f_label",
                  "value": "",
                  "description": "Case-insensitive substring match against the label.",
                  "disabled": true
                },
                {
                  "key": "f_id",
                  "value": "",
                  "description": "Case-insensitive substring match against the connection id.",
                  "disabled": true
                },
                {
                  "key": "f_vertical",
                  "value": "",
                  "description": "Exact match against the vertical.",
                  "disabled": true
                },
                {
                  "key": "f_status",
                  "value": "",
                  "description": "Exact match against the connection status.",
                  "disabled": true
                },
                {
                  "key": "f_platform",
                  "value": "",
                  "description": "Case-insensitive substring match against the platform slug.",
                  "disabled": true
                },
                {
                  "key": "f_tenant",
                  "value": "",
                  "description": "Exact match against the tenant id.",
                  "disabled": true
                }
              ]
            },
            "description": "List all active integration connections aggregated across every configured vertical, with optional filters for `vertical`, `status`, `platform`, per-column filters (`f_label`, `f_id`, `f_vertical`, `f_status`, `f_platform`, `f_tenant`), a `search` over connection id and label, and `sort`/`dir` to order the result. Filters apply before pagination, so `meta.total` reflects the filtered set, and sorting is applied before the slice, so every page reflects the requested order. A tenant-restricted caller sees only connections owned by its granted tenants (and verticals); connections with no tenant are hidden from it. Any authenticated operator."
          },
          "response": []
        },
        {
          "name": "Fetch a single connection",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connections/:vertical/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connections",
                ":vertical",
                ":id"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Fetch one connection by its vertical and id. Any authenticated operator. Returns `404` if the vertical is unknown, no connection with that id exists in it, or the connection belongs to a tenant outside the caller's scope."
          },
          "response": []
        },
        {
          "name": "Rename a connection",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connections/:vertical/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connections",
                ":vertical",
                ":id"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Rename a connection by vertical and id. The label is the only mutable field — it is what the admin UI and `GET /api/connections?search=` match on, so it is how an operator tells two connections to the same platform apart. Send `null` to clear it. Operator role or higher. Returns `404` if the vertical is unknown or the connection is not found, and `409` if another connection for the same tenant and platform already carries that label. Writes a `connection.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Revoke a connection",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connections/:vertical/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connections",
                ":vertical",
                ":id"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Revoke a connection by vertical and id, deleting its stored credentials. Operator role or higher. Returns `404` if the vertical is unknown or the connection is not found. Writes a `connection.delete` audit entry."
          },
          "response": []
        },
        {
          "name": "Set a connection's sync schedule",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/connections/:vertical/:id/sync-schedule",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "connections",
                ":vertical",
                ":id",
                "sync-schedule"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mode\": \"default\",\n  \"intervalMinutes\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Choose how often a connection's data is re-synced: `default` (the deployment interval), `custom` (every `intervalMinutes`, 15–43200), `trigger_only` (only when a sync is requested — never automatically) or `once` (one sync when connected). Takes effect on the scheduler's next tick. Operator role or higher. Returns `404` if the vertical is unknown, the connection is not found, or it belongs to a tenant outside the caller's scope; `400` for an invalid schedule. Writes a `connection.sync_schedule` audit entry with the previous and new schedule."
          },
          "response": []
        }
      ]
    },
    {
      "name": "dashboard-tasks",
      "description": "",
      "item": [
        {
          "name": "List cleared dashboard tasks",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboard-tasks/dismissals",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboard-tasks",
                "dismissals"
              ]
            },
            "description": "Every dashboard task that has been cleared, with the fingerprint it was cleared at. The dashboard hides a task only when both the key and the fingerprint match. Any authenticated operator. A tenant-restricted user sees only the keys whose connection or sync job is inside their scope."
          },
          "response": []
        },
        {
          "name": "Clear dashboard tasks",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboard-tasks/dismissals",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboard-tasks",
                "dismissals"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    {\n      \"key\": \"\",\n      \"fingerprint\": \"\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Clear 1..50 dashboard tasks deployment-wide. Also acknowledges the matching unacknowledged notifications (`credential_expired` for `conn:expired:*`, `platform_credentials_invalid` for `platform:creds:*`), and the health poller will not re-raise them while the fingerprint is unchanged. Operator role or higher; Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. `platform:creds:*` and `wizard:*` keys need the admin role, and one such key in the batch makes the whole request `403` with nothing stored. Writes a `dashboard_task.dismiss` audit entry."
          },
          "response": []
        },
        {
          "name": "Un-clear a dashboard task",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboard-tasks/dismissals/:key",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboard-tasks",
                "dismissals",
                ":key"
              ],
              "variable": [
                {
                  "key": "key",
                  "value": "",
                  "description": "Task key to un-clear (URL-encode it: keys contain `:` and may contain `/`)."
                }
              ]
            },
            "description": "Remove one clear so the task shows on the dashboard again (the Undo behind a clear). Operator role or higher; Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. `platform:creds:*` and `wizard:*` keys need the admin role (`403` otherwise). Returns `404` when the key was not cleared. Writes a `dashboard_task.undismiss` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "dashboards",
      "description": "",
      "item": [
        {
          "name": "List dashboards",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards"
              ]
            },
            "description": "The built-in dashboards, then every dashboard shared with you (your own, those shared with a tenant in your access, those shared with everyone; an admin with access to every tenant sees all), most recently updated first. Requires `dashboards:view`."
          },
          "response": []
        },
        {
          "name": "Create a dashboard",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"audience\": {\n    \"kind\": \"private\",\n    \"tenants\": [\n      \"\"\n    ]\n  },\n  \"pinnedTenants\": \"\",\n  \"widgets\": [\n    {\n      \"metricId\": \"\",\n      \"title\": \"\",\n      \"chart\": \"number\",\n      \"width\": 0,\n      \"currency\": \"\",\n      \"granularity\": \"auto\",\n      \"compare\": false\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a dashboard from up to 24 widgets, each naming a catalog metric, a chart type and a width (1–12 columns). Shared per `audience` (default `private`); `everyone` needs `dashboards:share_all`, and a caller with restricted access may share with and pin only tenants in that access (`403`). Requires `dashboards:edit`. `400` for a metric not in your catalog, a chart that is not one of its metric's `charts` (`Chart <chart> does not fit <metric>`) or an unknown tenant. Writes `dashboard.create` and, when shared or pinned, `dashboard.share` audit entries."
          },
          "response": []
        },
        {
          "name": "List the metric catalog",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/metrics",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "metrics"
              ]
            },
            "description": "Every metric a widget can chart in your scope: built-in system metrics and per-vertical metrics over stored records. Metrics never read personal-data fields. Requires `dashboards:view`."
          },
          "response": []
        },
        {
          "name": "Compute one metric",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/metrics/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "metrics",
                ":id"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "First day.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "Last day.",
                  "disabled": true
                },
                {
                  "key": "dashboard",
                  "value": "",
                  "description": "The dashboard this widget belongs to: applies its pinned tenants (your scope ∩ its pins). 404 when you cannot see it.",
                  "disabled": true
                },
                {
                  "key": "currency",
                  "value": "",
                  "description": "Keep only this currency (ISO 4217): money metrics keep its amounts, counts with a currency field count only its records, other metrics ignore it.",
                  "disabled": true
                },
                {
                  "key": "granularity",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "compare",
                  "value": "0",
                  "description": "`1` adds `previous`: the same metric over the prior equal-length range.",
                  "disabled": true
                },
                {
                  "key": "connection",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "platform",
                  "value": "{{platform}}",
                  "disabled": true
                },
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "One metric over the connections in your tenant scope, for the days `from`..`to` (inclusive, `YYYY-MM-DD`; default the last 30 days, at most 366). Money is never combined across currencies: every money series, total and KPI carries its currency, and `currency` keeps only one. `granularity` sets the buckets of a series over time and `compare=1` adds `previous`, the prior equal-length range. Results are cached for 60 seconds per metric, scope and parameters. Requires `dashboards:view`. `404` for a metric outside your scope, `400` for a bad range or parameter, `409` in passthrough mode. Pass `dashboard` to apply that dashboard's pinned tenants (your scope ∩ its pins), and `connection` and/or `platform` to narrow further to one connection and/or one adapter (system metrics included), kept to `vertical` when given; a connection outside your scope yields no data, and the result echoes the filter as `filter`. `connection` and `platform` also need `connections:read` (`403` otherwise)."
          },
          "response": []
        },
        {
          "name": "List currencies to filter by",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/currencies",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "currencies"
              ],
              "query": [
                {
                  "key": "dashboard",
                  "value": "",
                  "description": "The dashboard this widget belongs to: applies its pinned tenants (your scope ∩ its pins). 404 when you cannot see it.",
                  "disabled": true
                },
                {
                  "key": "connection",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "platform",
                  "value": "{{platform}}",
                  "disabled": true
                },
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "disabled": true
                }
              ]
            },
            "description": "The distinct currencies (ISO 4217, sorted) across the money and currency fields the metric catalog reads, over the connections in your tenant scope — the choices for a dashboard's currency filter and a widget's currency pin. Pass `dashboard` to narrow to that dashboard's pinned tenants (your scope ∩ its pins), and `connection` and/or `platform` (kept to `vertical` when given) to list only that connection's or adapter's currencies. Cached for 60 seconds per scope and filter. Requires `dashboards:view`, and `connections:read` too with `connection` or `platform` (`403` otherwise). `400` for a malformed `connection`, `platform` or `vertical`, `404` for a dashboard you cannot see, `409` in passthrough mode."
          },
          "response": []
        },
        {
          "name": "List connections to filter a dashboard by",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/connections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "connections"
              ],
              "query": [
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "disabled": true
                },
                {
                  "key": "platform",
                  "value": "{{platform}}",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "description": "Case-insensitive substring of the connection id or label; an exact id is listed first.",
                  "disabled": true
                },
                {
                  "key": "dashboard",
                  "value": "",
                  "description": "The dashboard this widget belongs to: applies its pinned tenants (your scope ∩ its pins). 404 when you cannot see it.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "How many connections to list: 1–200, default 50.",
                  "disabled": true
                }
              ]
            },
            "description": "The connections in your tenant scope that a dashboard's connection filter can offer, with the adapters among them — narrowed to `vertical`, to a stored dashboard's pinned tenants when `dashboard` is given (your scope ∩ its pins), to one adapter with `platform`, and by `search`, a case-insensitive substring of the connection id or label (an id prefix is enough). `platforms` lists the adapters of the vertical's connections you can see, with counts, ignoring `search` and `platform`. Connections carry only an id, a label, an adapter and a vertical: never a tenant id, a status or a credential, and a connection outside your scope is absent even when searched for by its exact id. `limit` caps the list (default 50, at most 200; other values are clamped); `total` counts every match. Requires `dashboards:view` and `connections:read`. `400` for an unknown vertical or a malformed adapter, `404` for a dashboard you cannot see."
          },
          "response": []
        },
        {
          "name": "Read one dashboard",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "A built-in dashboard, or one shared with you. Requires `dashboards:view`. `404` for an unknown id or a dashboard not shared with you."
          },
          "response": []
        },
        {
          "name": "Edit a dashboard",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"audience\": {\n    \"kind\": \"private\",\n    \"tenants\": [\n      \"\"\n    ]\n  },\n  \"pinnedTenants\": \"\",\n  \"widgets\": [\n    {\n      \"metricId\": \"\",\n      \"title\": \"\",\n      \"chart\": \"number\",\n      \"width\": 0,\n      \"currency\": \"\",\n      \"granularity\": \"auto\",\n      \"compare\": false\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Edit your own dashboard (admins may edit any); omitted fields are unchanged. Requires `dashboards:edit`. `409` for a built-in dashboard, `403` for someone else’s or a sharing change you may not make, `400` for an unknown tenant, a metric not in your catalog or a chart that does not fit its metric, `404` when it does not exist or is not visible to you. Writes a `dashboard.update` audit entry, and `dashboard.share` when the audience or pins change."
          },
          "response": []
        },
        {
          "name": "Delete a dashboard",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete your own dashboard (admins may delete any). Requires `dashboards:edit`. `409` for a built-in, `403` for someone else’s, `404` when it does not exist. Writes a `dashboard.delete` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "data",
      "description": "",
      "item": [
        {
          "name": "Summarise stored data per connection",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/data/summary",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "data",
                "summary"
              ]
            },
            "description": "List every connection in your tenant scope with the resource types the data store holds for it: record counts, the newest change and when each type was last fully synced. Requires `data:read`. Answers `409` (`DATA_STORE_DISABLED`) when the deployment runs in passthrough mode."
          },
          "response": []
        },
        {
          "name": "Describe a stored resource type",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/data/schema/:vertical/:type",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "data",
                "schema",
                ":vertical",
                ":type"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "{{vertical}}"
                },
                {
                  "key": "type",
                  "value": ""
                }
              ]
            },
            "description": "Fields of a stored resource type with their classification (`public`, `internal`, `pii`, `financial`, `secret`) and whether you may filter on them. Requires `data:read`. `404` for an unknown type or one outside your scope."
          },
          "response": []
        },
        {
          "name": "List stored records",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/data/connections/:id/resources/:type",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "data",
                "connections",
                ":id",
                "resources",
                ":type"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "",
                  "description": "Cursor from the previous page’s `meta.nextCursor`.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Page size, 1–200 (default 50).",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "updated_at",
                  "description": "Sort key.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "asc",
                  "description": "Sort direction.",
                  "disabled": true
                },
                {
                  "key": "filters",
                  "value": "",
                  "description": "JSON array of `{ path, op, value }` with `op` one of `eq`, `contains`, `gt`, `lt`, `is_null`. Only searchable fields (see the schema route) are accepted.",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Free-text search over the record id and every searchable field.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "type",
                  "value": ""
                }
              ]
            },
            "description": "One cursor-paginated page of stored records of a type on a connection, masked by field classification (personal data is never revealed here). Supports `filters`, free-text `q`, `sort` and `dir`. Requires `data:read`. `404` when the connection is unknown or outside your tenant scope; `400` `FIELD_NOT_SEARCHABLE` for a filter on a field you may not search; `409` in passthrough mode."
          },
          "response": []
        },
        {
          "name": "Export stored records as CSV or NDJSON",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/data/connections/:id/resources/:type/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "data",
                "connections",
                ":id",
                "resources",
                ":type",
                "export"
              ],
              "query": [
                {
                  "key": "sort",
                  "value": "updated_at",
                  "description": "Sort key.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "asc",
                  "description": "Sort direction.",
                  "disabled": true
                },
                {
                  "key": "filters",
                  "value": "",
                  "description": "JSON array of `{ path, op, value }` with `op` one of `eq`, `contains`, `gt`, `lt`, `is_null`. Only searchable fields (see the schema route) are accepted.",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Free-text search over the record id and every searchable field.",
                  "disabled": true
                },
                {
                  "key": "format",
                  "value": "csv",
                  "description": "Export format (default `csv`).",
                  "disabled": true
                },
                {
                  "key": "include_pii",
                  "value": "true",
                  "description": "Export personal data unmasked. Requires `data:read_pii`; audited.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "type",
                  "value": ""
                }
              ]
            },
            "description": "Stream every stored record of a type on a connection (up to 100,000) as a `csv` or `ndjson` attachment, masked like the list. `include_pii=true` exports personal data unmasked and additionally requires `data:read_pii`. Requires `data:export`. Every export is written to the audit log as `data.export`."
          },
          "response": []
        },
        {
          "name": "Read one stored record (masked)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/data/connections/:id/resources/:type/:rid",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "data",
                "connections",
                ":id",
                "resources",
                ":type",
                ":rid"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "type",
                  "value": ""
                },
                {
                  "key": "rid",
                  "value": ""
                }
              ]
            },
            "description": "One stored record with its row metadata, masked by field classification. To see personal data use the `reveal` route. Requires `data:read`. `404` when the connection, type or record is unknown or outside your scope."
          },
          "response": []
        },
        {
          "name": "Reveal the personal data in one stored record",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/data/connections/:id/resources/:type/:rid/reveal",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "data",
                "connections",
                ":id",
                "resources",
                ":type",
                ":rid",
                "reveal"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "type",
                  "value": ""
                },
                {
                  "key": "rid",
                  "value": ""
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "The stored record with personal data unmasked (secrets are still removed; financial fields follow `data_access.mask_financial`). Requires `data:read` and `data:read_pii`. Every reveal is written to the audit log as `data.pii_reveal`, with the optional `reason`, before the record is returned. The response is `Cache-Control: no-store`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "destinations",
      "description": "",
      "item": [
        {
          "name": "List destination types",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/types",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                "types"
              ]
            },
            "description": "Every destination type with its settings form: the non-secret config and write-only secret fields as JSON Schema (types, defaults, descriptions). Types flagged `experimental` work but may still change; a type listed with `available: false` cannot be created. Requires `destinations:manage`."
          },
          "response": []
        },
        {
          "name": "List destinations",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations"
              ]
            },
            "description": "Destinations whose scope lies inside yours, with their last run. Requires `destinations:manage`. `409` `DATA_STORE_DISABLED` in passthrough mode."
          },
          "response": []
        },
        {
          "name": "Create a destination",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"config\": {},\n  \"secrets\": {},\n  \"scope\": {\n    \"tenants\": \"\",\n    \"verticals\": {},\n    \"maskFinancial\": false\n  },\n  \"includePii\": false,\n  \"intervalSec\": 0,\n  \"enabled\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a destination. `config` and `secrets` follow the type's schemas (`GET /api/destinations/types`); secrets are stored encrypted and never returned. `scope` must lie inside your own (`403` `SCOPE_EXCEEDS_CALLER`); `includePii` needs `data:read_pii` (`403` `PII_NOT_PERMITTED`) and records you as approver. Every host named must be public unless allow-listed (`400` `HOST_NOT_ALLOWED`). Requires `destinations:manage`; audited as `destination.create`."
          },
          "response": []
        },
        {
          "name": "Get a destination",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "One destination. `404` when unknown or outside your scope. Requires `destinations:manage`."
          },
          "response": []
        },
        {
          "name": "Change a destination",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"config\": {},\n  \"scope\": {\n    \"tenants\": \"\",\n    \"verticals\": {},\n    \"maskFinancial\": false\n  },\n  \"includePii\": false,\n  \"intervalSec\": 0,\n  \"enabled\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Change a destination’s name, config, scope, PII setting, interval or enabled state. Changing the config, scope or PII of a PII destination needs `data:read_pii`; turning it off or disabling it does not. Widening the scope does not re-export skipped rows: run a backfill. Requires `destinations:manage`; audited as `destination.update`."
          },
          "response": []
        },
        {
          "name": "Delete a destination",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete a destination with its cursors and run history. Files and rows already exported stay where they are. Requires `destinations:manage`; audited as `destination.delete`."
          },
          "response": []
        },
        {
          "name": "Replace (rotate) destination credentials",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id/credentials",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id",
                "credentials"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"secrets\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Replace every secret of a destination with the ones given (fields left out are cleared). Values are write-only: the response lists only the names set, and the audit row (`destination.credentials_rotate`) records names only. On a PII destination this needs `data:read_pii`. Requires `destinations:manage`."
          },
          "response": []
        },
        {
          "name": "Test a destination connection",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id",
                "test"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Build the sink with the stored credentials and prove it can write: a probe object in the bucket, or `CREATE` on the Postgres schema. A failed test still answers `200` with `ok: false` and the reason. Requires `destinations:manage`; audited as `destination.test`."
          },
          "response": []
        },
        {
          "name": "Run a destination now",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id/run",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id",
                "run"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Start an export run now, outside the schedule. `202` with the run id; `409` `RUN_IN_PROGRESS` when one is already running, `409` `DESTINATION_DISABLED` when it is disabled. Requires `destinations:manage`; audited as `destination.run`."
          },
          "response": []
        },
        {
          "name": "Backfill a destination",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id/backfill",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id",
                "backfill"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"vertical\": \"\",\n  \"resourceType\": \"\",\n  \"run\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Reset the export cursors — all of them, one vertical’s, or one resource type’s — so the next run re-exports every stored record in scope, then start a run unless `run: false`. Consumers should deduplicate on `_pk`. Requires `destinations:manage`; audited as `destination.backfill`."
          },
          "response": []
        },
        {
          "name": "List destination runs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/destinations/:id/runs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "destinations",
                ":id",
                "runs"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "description": "How many runs, newest first, 1–500 (default 50).",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Run history of a destination, newest first: trigger, status, rows and deletions written, files, and the error of a failed run. Requires `destinations:manage`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "end-user-tokens",
      "description": "",
      "item": [
        {
          "name": "List per-end-user MCP tokens",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-user-tokens",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-user-tokens"
              ],
              "query": [
                {
                  "key": "endUserId",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "tenantId",
                  "value": "{{tenantId}}",
                  "disabled": true
                }
              ]
            },
            "description": "List MCP tokens scoped to individual end-users, optionally filtered by `endUserId` or `tenantId`. Operator role or higher. Returns token metadata only; plaintext secrets are never included."
          },
          "response": []
        },
        {
          "name": "Mint a per-end-user MCP token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-user-tokens",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-user-tokens"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"endUserId\": \"\",\n  \"tenantId\": \"\",\n  \"label\": \"\",\n  \"scopes\": [\n    \"\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Mint an MCP token scoped to a single end-user. Operator role or higher. The response includes the plaintext token **once** — it cannot be retrieved again. Returns `400` if `endUserId` or `tenantId` is missing. Writes an `end_user_token.mint` audit entry."
          },
          "response": []
        },
        {
          "name": "Revoke a per-end-user MCP token",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-user-tokens/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-user-tokens",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Revoke a per-end-user MCP token by id, effective immediately. Operator role or higher. Returns `404` if no token matches the id. Writes an `end_user_token.revoke` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "end-users",
      "description": "",
      "item": [
        {
          "name": "List end-users (Connect Link customers)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-users"
              ],
              "query": [
                {
                  "key": "tenantId",
                  "value": "{{tenantId}}",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Column to order by: one of `email`, `displayName`, `externalReference`, `tenantId`, `created`. An unrecognised value is ignored and the default order (most recently created first) is used.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "",
                  "description": "Sort direction: `asc` or `desc`. Any other value (including omitted) is ascending.",
                  "disabled": true
                },
                {
                  "key": "email",
                  "value": "",
                  "description": "Case-insensitive substring match against the email address.",
                  "disabled": true
                },
                {
                  "key": "displayName",
                  "value": "",
                  "description": "Case-insensitive substring match against the display name.",
                  "disabled": true
                },
                {
                  "key": "externalReference",
                  "value": "",
                  "description": "Case-insensitive substring match against the external reference.",
                  "disabled": true
                }
              ]
            },
            "description": "List end-users (the customers who authorize integrations through Connect Link), with optional `tenantId`, free-text `q`, and `limit`/`offset` pagination. Any authenticated operator. PII is omitted from the summary view."
          },
          "response": []
        },
        {
          "name": "Create a new end-user",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-users"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantId\": \"\",\n  \"email\": \"\",\n  \"displayName\": \"\",\n  \"externalReference\": \"\",\n  \"pii\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a new end-user record. Operator role or higher. Writes an `end_user.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Read a single end-user",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-users",
                ":id"
              ],
              "query": [
                {
                  "key": "include_pii",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read one end-user by id. Any authenticated operator. Pass `include_pii=true` to reveal sensitive personal-ID fields — that privileged path requires the **admin** role (returns `403` otherwise) and writes an `end_user.pii_reveal` audit entry. Returns `404` if the end-user does not exist."
          },
          "response": []
        },
        {
          "name": "Patch an end-user",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"displayName\": \"\",\n  \"externalReference\": \"\",\n  \"pii\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Partially update an end-user; only the supplied fields are changed. Operator role or higher. Writes an `end_user.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete an end-user",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/end-users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "end-users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete an end-user record. Admin role required. Writes an `end_user.delete` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "identity-providers",
      "description": "",
      "item": [
        {
          "name": "List configured identity providers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers"
              ]
            },
            "description": "List the configured SSO identity providers (SAML/OIDC) and their enabled state. Admin role required. Secrets are not returned."
          },
          "response": []
        },
        {
          "name": "Create an identity provider",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Register a new SSO identity provider with its protocol-specific config. Admin role required. Returns `400` if the body or protocol config is invalid, and `409` if the slug is already taken. Writes an `sso.provider.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Read one identity provider",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read a single identity provider's configuration by id (secrets redacted). Admin role required. Returns `404` if no provider matches the id."
          },
          "response": []
        },
        {
          "name": "Update an identity provider",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"slug\": \"\",\n  \"enabled\": false,\n  \"config\": \"\",\n  \"secret\": {\n    \"clientSecret\": \"\",\n    \"ldapBindPassword\": \"\",\n    \"spPrivateKey\": \"\",\n    \"spCertificate\": \"\",\n    \"idpCert\": \"\"\n  },\n  \"jitEnabled\": false,\n  \"defaultRole\": \"admin\",\n  \"replaceUnreadableSecret\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Update an identity provider's settings, config, or secret; omitted fields are left unchanged. Admin role required. Returns `404` if the provider is missing, `400` if the protocol config is invalid, and `409` if changing the slug collides with another provider — or if the stored secret bundle cannot be decrypted with the current STORE_SECRET, in which case nothing is written, because merging into an unreadable bundle would discard every secret not resent. Recover by restoring the previous STORE_SECRET (or running rotate-store-secret); or resend every secret with `replaceUnreadableSecret` to replace the bundle outright. Writes an `sso.provider.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete an identity provider",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete an identity provider, disabling SSO logins through it. Admin role required. Returns `404` if no provider matches the id. Writes an `sso.provider.delete` audit entry."
          },
          "response": []
        },
        {
          "name": "SAML SP metadata XML (admin-only)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/metadata",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "metadata"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Return this service's SAML service-provider metadata as `application/xml`, to hand to the IdP during setup (advertises the ACS URL and, when configured, the SP signing certificate). Admin role required. Returns `404` if the provider does not exist or is not a SAML provider."
          },
          "response": []
        },
        {
          "name": "List a provider's role-mapping rules",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/role-mappings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "role-mappings"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "List the role-mapping rules for one provider — the rules that translate IdP claims/groups into local roles on SSO login. Admin role required. Returns `404` if the provider does not exist."
          },
          "response": []
        },
        {
          "name": "Create a role-mapping rule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/role-mappings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "role-mappings"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"priority\": 0,\n  \"claimPath\": \"\",\n  \"matchType\": \"equals\",\n  \"matchValue\": \"\",\n  \"role\": \"admin\",\n  \"roleId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Add a role-mapping rule to a provider, mapping an IdP claim/group to a local role — a built-in `role`, or any role (built-in or custom) by `roleId`. Admin role required. Returns `404` if the provider does not exist, `400` if the rule body is invalid or `roleId` is unknown, and `403` if the role grants a permission or base role you do not hold. Writes an `sso.role_mapping.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete a role-mapping rule",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/role-mappings/:ruleId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "role-mappings",
                ":ruleId"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "ruleId",
                  "value": ""
                }
              ]
            },
            "description": "Delete a single role-mapping rule from a provider. Admin role required. Returns `404` if the rule (or provider) does not exist. Writes an `sso.role_mapping.delete` audit entry."
          },
          "response": []
        },
        {
          "name": "List a provider's scope-mapping rules",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/scope-rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "scope-rules"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "List the scope-mapping rules for one provider — the rules that grant tenant scope from IdP claims/groups on SSO login. Every matching rule applies (the tenants are unioned); when none match, the provider default scope applies. Admin role and `users:manage` required. Returns `404` if the provider does not exist."
          },
          "response": []
        },
        {
          "name": "Create a scope-mapping rule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/scope-rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "scope-rules"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"priority\": 0,\n  \"claimPath\": \"\",\n  \"matchType\": \"equals\",\n  \"matchValue\": \"\",\n  \"tenantIds\": [\n    \"\"\n  ],\n  \"verticals\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Add a scope-mapping rule: users whose claim matches may see the listed tenants (`[\"*\"]` = every tenant), optionally only some verticals. Applied on each SSO login and SCIM group change to users whose scope is IdP-owned (`scopeSource: idp`, the default for JIT and SCIM users). Admin role and `users:manage` required. Returns `404` if the provider does not exist, `400` for an invalid body or unknown tenant, and `403` when the rule grants tenants outside your own scope. Writes an `idp.scope_rule.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete a scope-mapping rule",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/scope-rules/:ruleId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "scope-rules",
                ":ruleId"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "ruleId",
                  "value": ""
                }
              ]
            },
            "description": "Delete a single scope-mapping rule from a provider. Takes effect for each affected user at their next SSO login. Admin role and `users:manage` required. Returns `404` if the rule (or provider) does not exist. Writes an `idp.scope_rule.delete` audit entry."
          },
          "response": []
        },
        {
          "name": "Set a provider's default tenant scope",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/default-scope",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "default-scope"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mode\": \"all\",\n  \"tenantIds\": [\n    \"\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Set the scope SSO users of this provider get when no scope rule matches: `all` tenants (the default, and what every provider had before scope rules existed) or `restricted` to `tenantIds` (empty = no tenants). Admin role and `users:manage` required. Returns `404` if the provider does not exist, `400` for an unknown tenant, and `403` when the scope reaches beyond your own. Writes an `idp.default_scope.update` audit entry."
          },
          "response": []
        },
        {
          "name": "List SCIM bearer tokens for a provider",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/scim-tokens",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "scim-tokens"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "List the SCIM bearer tokens issued for a provider (used by the IdP to provision/deprovision users via SCIM). Admin role required. Plaintext token values are not returned. Returns `404` if the provider does not exist."
          },
          "response": []
        },
        {
          "name": "Mint a SCIM bearer token (plaintext returned once)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/scim-tokens",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "scim-tokens"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Mint a new SCIM bearer token for a provider. Admin role required. The response includes the plaintext token **once** — it cannot be retrieved again. Returns `404` if the provider does not exist. Writes an `sso.scim_token.mint` audit entry."
          },
          "response": []
        },
        {
          "name": "Revoke a SCIM bearer token",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/identity-providers/:id/scim-tokens/:tokenId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "identity-providers",
                ":id",
                "scim-tokens",
                ":tokenId"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "tokenId",
                  "value": ""
                }
              ]
            },
            "description": "Revoke a SCIM bearer token by id, effective immediately. Admin role required. Returns `404` if no token matches the id. Writes an `sso.scim_token.revoke` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "license",
      "description": "",
      "item": [
        {
          "name": "The deployment's license status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/license",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "license"
              ]
            },
            "description": "The license as integration-server evaluates it (state, who it is issued to, expiry, enabled features, limits and usage), as admin-api last read it — cached for a minute, served with `stale: true` while integration-server is not answering. Never contains the license token. Admin role required. 503 `LICENSE_STATUS_UNAVAILABLE` until integration-server has answered once; its message names `ADMIN_SECRET` when that is why."
          },
          "response": []
        }
      ]
    },
    {
      "name": "logos",
      "description": "",
      "item": [
        {
          "name": "Start a platform logo fetch",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/logo-fetch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "logo-fetch"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"force\": false,\n  \"vertical\": \"\",\n  \"slug\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Queue a background job that downloads platform logos from Brandfetch and stores them in the admin database. Returns 202 with the queued job. A full catalog run takes tens of minutes; poll the job for progress. Only one fetch may run at a time."
          },
          "response": []
        },
        {
          "name": "List logo-fetch jobs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/logo-fetch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "logo-fetch"
              ]
            },
            "description": "Recent logo-fetch jobs, newest first. Any authenticated operator may watch a running fetch."
          },
          "response": []
        },
        {
          "name": "Get a logo-fetch job",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/logo-fetch/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "logo-fetch",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}",
                  "description": "Logo-fetch job identifier."
                }
              ]
            },
            "description": "Fetch one logo-fetch job, including its per-vertical progress counters."
          },
          "response": []
        },
        {
          "name": "Cancel a logo-fetch job",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/logo-fetch/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "logo-fetch",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}",
                  "description": "Logo-fetch job identifier."
                }
              ]
            },
            "description": "Ask a logo-fetch job to stop. A queued job is cancelled immediately (200). A running job moves to `cancelling` and stops at its next checkpoint (202) — cancellation is cooperative because the request usually lands on a different replica than the one running the job. Logos already fetched are kept."
          },
          "response": []
        },
        {
          "name": "Stored logo statistics",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/logos/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "logos",
                "status"
              ]
            },
            "description": "How many platform logos this deployment has stored, their total size, and when the newest was fetched."
          },
          "response": []
        },
        {
          "name": "Delete every stored logo",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/logos",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "logos"
              ]
            },
            "description": "Remove all stored platform logos. The catalog falls back to monogram tiles immediately. Provided because storing logos is caching under Brandfetch’s terms, so an operator needs a way to undo it."
          },
          "response": []
        }
      ]
    },
    {
      "name": "notifications",
      "description": "",
      "item": [
        {
          "name": "List unacknowledged notifications",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/notifications",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "notifications"
              ]
            },
            "description": "List notifications that have not yet been acknowledged (e.g. connection errors or sync alerts surfaced to operators). Any authenticated operator. A tenant-restricted user gets none (notifications are not tenant-scoped yet)."
          },
          "response": []
        },
        {
          "name": "Count unread notifications",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/notifications/unread-count",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "notifications",
                "unread-count"
              ]
            },
            "description": "The number of unacknowledged notifications, excluding `credential_expiring` (it auto-heals within a poll, so counting it would keep the header bell from ever reading zero). Any authenticated operator. A tenant-restricted user gets none (notifications are not tenant-scoped yet)."
          },
          "response": []
        },
        {
          "name": "Acknowledge a single notification",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/notifications/:id/acknowledge",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "notifications",
                ":id",
                "acknowledge"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Mark a single notification as acknowledged so it drops out of the unacknowledged list. Operator role or higher. Returns `404` if no notification matches the id. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant."
          },
          "response": []
        },
        {
          "name": "Acknowledge every notification",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/notifications/acknowledge-all",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "notifications",
                "acknowledge-all"
              ]
            },
            "description": "Acknowledge every outstanding notification in one call, clearing the unacknowledged list. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant."
          },
          "response": []
        }
      ]
    },
    {
      "name": "oauth-clients",
      "description": "",
      "item": [
        {
          "name": "List registered identity providers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/issuers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "issuers"
              ]
            },
            "description": "Every identity provider whose OIDC bearer tokens this deployment will accept on `/v1/*`. Operator role or higher — reading which service accounts can reach the deployment does not require the ability to add one."
          },
          "response": []
        },
        {
          "name": "Register an identity provider",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/issuers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "issuers"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"preset\": \"\",\n  \"issuer\": \"\",\n  \"jwksUri\": \"\",\n  \"audience\": \"\",\n  \"subjectClaim\": \"\",\n  \"scopeClaim\": \"\",\n  \"algorithms\": [\n    \"\"\n  ],\n  \"authorityMode\": \"registry\",\n  \"tenantClaim\": \"\",\n  \"allowedTenants\": [\n    \"\"\n  ],\n  \"maxTokenLifetimeS\": 0,\n  \"enabled\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Admin only. Audience is required: without it every token the issuer ever minted for any application would be accepted here."
          },
          "response": []
        },
        {
          "name": "Whether OIDC bearer auth could admit anybody",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/readiness",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "readiness"
              ]
            },
            "description": "Checked before allowing `auth.dev_api_keys_enabled` to be switched off, so that change cannot lock every developer out of a running deployment. Ready means an issuer is enabled, can admit somebody, and has already verified a real token."
          },
          "response": []
        },
        {
          "name": "Claim-name defaults for known identity providers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/presets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "presets"
              ]
            },
            "description": "Keycloak, Auth0, Okta and Entra ID name the subject and scope claims differently. These are the defaults the admin form seeds from; the verifier itself is identical for every issuer."
          },
          "response": []
        },
        {
          "name": "Get one issuer with its clients and scope rules",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/issuers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "issuers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update an identity provider",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/issuers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "issuers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"preset\": \"\",\n  \"issuer\": \"\",\n  \"jwksUri\": \"\",\n  \"audience\": \"\",\n  \"subjectClaim\": \"\",\n  \"scopeClaim\": \"\",\n  \"algorithms\": [\n    \"\"\n  ],\n  \"authorityMode\": \"registry\",\n  \"tenantClaim\": \"\",\n  \"allowedTenants\": [\n    \"\"\n  ],\n  \"maxTokenLifetimeS\": 0,\n  \"enabled\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Delete an identity provider",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/issuers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "issuers",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Removes the issuer along with its registered clients and scope rules. Tokens from it stop being accepted immediately."
          },
          "response": []
        },
        {
          "name": "Read an issuer discovery document",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/discover",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "discover"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"issuer\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Fetches `{issuer}/.well-known/openid-configuration` and reports the signing-key endpoint, without saving anything, so an operator can check a URL before committing to it. The document's own issuer must match what was typed — otherwise a misconfigured or hostile endpoint could point the deployment at somebody else's signing keys."
          },
          "response": []
        },
        {
          "name": "Register a service account",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/issuers/:id/clients",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "issuers",
                ":id",
                "clients"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subject\": \"\",\n  \"tenantId\": \"\",\n  \"label\": \"\",\n  \"scopes\": [\n    \"\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Binds a subject from this issuer to a tenant and a scope set. Deleting the row later cuts off a still-valid token immediately, which is what registry authority buys over reading scopes from the token."
          },
          "response": []
        },
        {
          "name": "Revoke a service account",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/clients/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "clients",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Takes effect on the next request, mid-token: the client row is consulted on every call, so a revoked account stops working before its token expires."
          },
          "response": []
        },
        {
          "name": "Add a scope-mapping rule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/issuers/:id/rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "issuers",
                ":id",
                "rules"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"claimValue\": \"\",\n  \"grantedScope\": \"\",\n  \"priority\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "With no rules the token's scope claim passes through verbatim. Once any rule exists, only mapped values survive — an unmapped one is dropped rather than passed through raw."
          },
          "response": []
        },
        {
          "name": "Delete a scope-mapping rule",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/oauth/rules/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "oauth",
                "rules",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "platforms",
      "description": "",
      "item": [
        {
          "name": "List platforms across every vertical",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/platforms",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "platforms"
              ],
              "query": [
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "List every available platform (integration adapter) across all verticals, with optional `vertical` and free-text `search` filters. Any authenticated operator. Includes each platform's `authType` and enabled state."
          },
          "response": []
        },
        {
          "name": "List operator enable/config state for every platform",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/platforms/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "platforms",
                "status"
              ]
            },
            "description": "List every platform across every vertical with its operator-facing enabled/config state. The all-verticals counterpart of `/api/verticals/{vertical}/platforms`; each row carries the `vertical` it belongs to. Any authenticated operator. Returns `502` if integration-server cannot be reached."
          },
          "response": []
        },
        {
          "name": "List platforms in one vertical",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/verticals/:vertical/platforms",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "verticals",
                ":vertical",
                "platforms"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                }
              ]
            },
            "description": "List the platforms available within a single vertical, with operator-facing enabled/config state. Any authenticated operator. Returns `404` if the vertical is unknown and `502` if integration-server cannot be reached."
          },
          "response": []
        },
        {
          "name": "Read a platform's operator-set config (redacted)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/verticals/:vertical/platforms/:slug/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "verticals",
                ":vertical",
                "platforms",
                ":slug",
                "config"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "slug",
                  "value": "{{platform}}",
                  "description": "Adapter slug identifying an upstream platform, e.g. `fortnox`. See GET /api/platforms."
                }
              ]
            },
            "description": "Read the operator-managed configuration for a platform, with secret fields redacted. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `404` if the vertical or platform is unknown and `502` if integration-server cannot be reached."
          },
          "response": []
        },
        {
          "name": "Set a platform's operator-managed config",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/verticals/:vertical/platforms/:slug/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "verticals",
                ":vertical",
                "platforms",
                ":slug",
                "config"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "slug",
                  "value": "{{platform}}",
                  "description": "Adapter slug identifying an upstream platform, e.g. `fortnox`. See GET /api/platforms."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"config\": {\n    \"authType\": \"\",\n    \"clientId\": \"\",\n    \"clientSecret\": \"\",\n    \"redirectUri\": \"\",\n    \"tokenUrl\": \"\",\n    \"scopes\": \"\",\n    \"apiKey\": \"\",\n    \"username\": \"\",\n    \"password\": \"\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Set or replace the operator-managed configuration (credentials, keyed by `authType`) for a platform. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `404` if the vertical is unknown, `400` if the body lacks a `config` object, and `502` if integration-server cannot be reached. Writes an `adapter.config` audit entry."
          },
          "response": []
        },
        {
          "name": "Enable a platform with operator-supplied config",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/verticals/:vertical/platforms/:slug/enable",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "verticals",
                ":vertical",
                "platforms",
                ":slug",
                "enable"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "slug",
                  "value": "{{platform}}",
                  "description": "Adapter slug identifying an upstream platform, e.g. `fortnox`. See GET /api/platforms."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"config\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Enable a platform for a vertical, optionally applying operator credentials/config; omit `config` for adapters that need none. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `404` if the vertical is unknown and `502` if integration-server cannot be reached. Writes an `adapter.enable` audit entry."
          },
          "response": []
        },
        {
          "name": "Disable a platform",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/verticals/:vertical/platforms/:slug/disable",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "verticals",
                ":vertical",
                "platforms",
                ":slug",
                "disable"
              ],
              "variable": [
                {
                  "key": "vertical",
                  "value": "accounting",
                  "description": "One of the nine verticals OpenSteward maps to a canonical API."
                },
                {
                  "key": "slug",
                  "value": "{{platform}}",
                  "description": "Adapter slug identifying an upstream platform, e.g. `fortnox`. See GET /api/platforms."
                }
              ]
            },
            "description": "Disable a platform for a vertical so it can no longer be connected. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `404` if the vertical is unknown and `502` if integration-server cannot be reached. Writes an `adapter.disable` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "roles",
      "description": "",
      "item": [
        {
          "name": "List the permission catalog",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/permissions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "permissions"
              ]
            },
            "description": "List every permission a role can grant, what it allows, and which built-in roles hold it. Any authenticated user."
          },
          "response": []
        },
        {
          "name": "List roles",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/roles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "roles"
              ]
            },
            "description": "List the three built-in roles followed by every custom role, each with its effective permissions. Requires `roles:manage` or `users:manage`."
          },
          "response": []
        },
        {
          "name": "Create a custom role",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/roles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "roles"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"baseRole\": \"admin\",\n  \"permissions\": [\n    \"connections:read\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a custom role from a base role and a permission set. Requires `roles:manage`. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `403` when the role would grant a permission or base role you do not hold yourself, and `409` when the name is taken (case-insensitively). Writes a `role.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Read one role",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/roles/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "roles",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read a built-in or custom role by id. Requires `roles:manage` or `users:manage`. Returns `404` if no role matches."
          },
          "response": []
        },
        {
          "name": "Edit a custom role",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/roles/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "roles",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"baseRole\": \"admin\",\n  \"permissions\": [\n    \"connections:read\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Edit a custom role; omitted fields are unchanged. A base-role change is applied to every holder at once. A role cannot become admin-based while any holder is limited to specific tenants (`409`): admins always have every tenant. Requires `roles:manage`. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `404` if the role does not exist, `409` for a built-in role (they are immutable) or a taken name, and `403` when either the role as it stands or the edit would grant a permission or base role you do not hold. Holders see the change within seconds; role-gated routes read the current base role from the database, not the sign-in token. Writes a `role.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete a custom role",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/roles/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "roles",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete a custom role. Requires `roles:manage`. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `404` if it does not exist, `403` if it grants more than you hold, and `409` for a built-in role or one still in use — assigned to a user or named by an identity-provider role-mapping rule. Reassign those first. Writes a `role.delete` audit entry."
          },
          "response": []
        },
        {
          "name": "Assign a console user's role",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/:id/role",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                ":id",
                "role"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"roleId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Assign a built-in or custom role to a console user. `users.role` is set to the role’s base role in the same write. Requires `users:manage`. Returns `404` for an unknown user, `400` for an unknown role or an attempt to change your own role, `403` when either the new role or the user’s current role grants more than you hold, or the user sees tenants you cannot, and `409` when it would demote the last password-usable local admin. Permissions change within seconds; role-gated routes read the current base role from the database, not the sign-in token. Making a user an admin gives them every tenant: a tenant restriction is cleared (audited as `scopeCleared`). Writes a `user.role_assign` audit entry."
          },
          "response": []
        },
        {
          "name": "Set a console user's tenant scope",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/:id/scope",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                ":id",
                "scope"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mode\": \"all\",\n  \"grants\": [\n    {\n      \"tenantId\": \"\",\n      \"verticals\": \"\"\n    }\n  ],\n  \"source\": \"manual\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Restrict a console user to specific tenants (optionally specific verticals within them), or give them every tenant with `mode: \"all\"`. Requires `users:manage`. A restricted user sees only granted tenants’ connections, sync jobs and tenants, gets `404` for anything else, and is refused (`403 SCOPE_RESTRICTED`) on surfaces that are not tenant-scoped yet. An admin cannot be restricted (`400`): admins always have every tenant. Returns `404` for an unknown user, `400` for an unknown tenant, and `403` when either the requested scope or the user’s current one reaches beyond yours. Takes effect within seconds. Writes a `user.scope_update` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "runtime-settings",
      "description": "",
      "item": [
        {
          "name": "List runtime settings",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/runtime-settings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "runtime-settings"
              ]
            },
            "description": "List all runtime settings (tunables that can change without a redeploy) with their current values. Any authenticated operator may read — so the setup wizard can show the active mode — but only admins may change them."
          },
          "response": []
        },
        {
          "name": "Update a runtime setting value",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/runtime-settings/:key",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "runtime-settings",
                ":key"
              ],
              "variable": [
                {
                  "key": "key",
                  "value": "rate_limit.api_key.per_minute",
                  "description": "Runtime-setting key — one of the seeded inventory."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Update one runtime setting; the value type is validated against the seeded key. Admin role required. Returns `400` if the body `key` does not match the path key or the value fails validation, and `409` (break-glass) if disabling local login would leave no password-usable local admin. Takes effect promptly via cache invalidation and writes a `runtime_setting.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Reset a runtime setting to its seeded default",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/runtime-settings/:key",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "runtime-settings",
                ":key"
              ],
              "variable": [
                {
                  "key": "key",
                  "value": "rate_limit.api_key.per_minute",
                  "description": "Runtime-setting key — one of the seeded inventory."
                }
              ]
            },
            "description": "Reset a runtime setting back to its seeded default value. Admin role required. Returns `404` if the key is unknown. Writes a `runtime_setting.reset` audit entry and invalidates the downstream settings cache."
          },
          "response": []
        }
      ]
    },
    {
      "name": "schema-status",
      "description": "",
      "item": [
        {
          "name": "Per-namespace _schema_migrations rows for every reachable SQLite db",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/schema-status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "schema-status"
              ]
            },
            "description": "Report the applied `_schema_migrations` rows for each SQLite database this admin-api can reach, grouped by namespace. Admin role required (diagnostic detail not exposed to operator/viewer). Developer diagnostics: migrations apply when each service starts and a failed one stops the boot, so a running service has applied its own. A missing db file is reported as an empty row set rather than an error."
          },
          "response": []
        }
      ]
    },
    {
      "name": "scim",
      "description": "",
      "item": [
        {
          "name": "SCIM 2.0 ServiceProviderConfig discovery doc",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/ServiceProviderConfig",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "ServiceProviderConfig"
              ]
            },
            "description": "SCIM 2.0 `ServiceProviderConfig` discovery document advertising the supported features. Authenticated by a per-provider SCIM bearer token (not the admin JWT); returns `401` if the token is missing or invalid. Called by IdPs during SCIM setup."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 Users list",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Users"
              ],
              "query": [
                {
                  "key": "filter",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "startIndex",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "count",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "List SCIM Users provisioned through the calling provider, supporting `filter` (e.g. `userName eq`) and `startIndex`/`count` pagination per RFC 7644. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Driven by the IdP, not the admin UI."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 User create (provision)",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Users"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Provision a new admin user from a SCIM User resource, creating the local account and identity link. Authenticated by the per-provider SCIM bearer token (`401` if invalid). The user's role is derived from group membership via the provider's role-mapping rules. Writes a SCIM provisioning audit entry."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 User read",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read one SCIM User by id. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Returns `404` if the user is not provisioned through this provider."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 User replace",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Replace a SCIM User resource (PUT). Authenticated by the per-provider SCIM bearer token (`401` if invalid). Returns `404` if the user is not provisioned through this provider. Setting `active: false` deprovisions the user, subject to the break-glass guard."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 User patch (PatchOp)",
          "request": {
            "method": "PATCH",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Apply a SCIM `PatchOp` to a User (e.g. toggle `active` to deactivate). Authenticated by the per-provider SCIM bearer token (`401` if invalid). Returns `404` if the user is unknown; deactivation deprovisions the account, subject to the break-glass guard."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 User delete (deprovision)",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Deprovision (delete) a SCIM User, removing the local account and its identity links. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Returns `409` if deletion would leave no break-glass admin. Writes an `sso.scim.deprovision` audit entry."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 Groups list",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Groups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Groups"
              ],
              "query": [
                {
                  "key": "filter",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "startIndex",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "count",
                  "value": "",
                  "disabled": true
                }
              ]
            },
            "description": "List SCIM Groups for the calling provider, with optional `filter` support per RFC 7644. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Group membership feeds the same role-mapping engine used at login."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 Group create",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Groups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Groups"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a SCIM Group for the calling provider. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Membership changes recompute affected users' roles via the provider's role-mapping rules."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 Group read",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read one SCIM Group by id, including its members. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Returns `404` if the group does not exist for this provider."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 Group patch",
          "request": {
            "method": "PATCH",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Apply a SCIM `PatchOp` to a Group, typically to add or remove members. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Returns `404` if the group is unknown; membership changes recompute affected users' roles."
          },
          "response": []
        },
        {
          "name": "SCIM 2.0 Group delete",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/scim/v2/Groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "scim",
                "v2",
                "Groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete a SCIM Group. Authenticated by the per-provider SCIM bearer token (`401` if invalid). Returns `404` if the group does not exist; removing it recomputes the roles of its former members."
          },
          "response": []
        }
      ]
    },
    {
      "name": "scope-groups",
      "description": "",
      "item": [
        {
          "name": "List scope groups",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/scope-groups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "scope-groups"
              ],
              "query": [
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "disabled": true
                },
                {
                  "key": "platform",
                  "value": "{{platform}}",
                  "disabled": true
                }
              ]
            },
            "description": "List named scope groups (reusable bundles of platform permissions), optionally filtered by `vertical` and/or `platform`. Any authenticated operator."
          },
          "response": []
        },
        {
          "name": "Create a scope group",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/scope-groups",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "scope-groups"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"vertical\": \"\",\n  \"platform\": \"\",\n  \"name\": \"\",\n  \"scopes\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a named scope group for a vertical/platform. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Scopes may be supplied as an array or a delimited string and are normalised to a deduped array. Returns `400` if `vertical`, `platform`, `name`, or a non-empty scope set is missing, and `409` if a group with that name already exists for the platform. Writes a `scope_group.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Update a scope group",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/scope-groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "scope-groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\",\n  \"scopes\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Update a scope group's name and/or scopes; omitted fields are left unchanged. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `400` for a non-numeric id and `404` if the group does not exist. Writes a `scope_group.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete a scope group",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/scope-groups/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "scope-groups",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete a scope group by id. Operator role or higher. Refused (`403 SCOPE_RESTRICTED`) for a user restricted to specific tenants: it affects every tenant. Returns `400` for a non-numeric id and `404` if the group does not exist. Writes a `scope_group.delete` audit entry."
          },
          "response": []
        }
      ]
    },
    {
      "name": "sql-access",
      "description": "",
      "item": [
        {
          "name": "Read-only SQL access status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "status"
              ]
            },
            "description": "Backend, provisioning mode, deployed catalog version, advertised read host and warnings. Answers on SQLite too (`backend: sqlite`), where SQL access is unavailable. Requires `sql_access:manage`."
          },
          "response": []
        },
        {
          "name": "Provision the SQL views",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/provision",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "provision"
              ]
            },
            "description": "Create or update the roles, schemas and views now (managed mode only; `409` `MANUAL_MODE` otherwise — use the provisioning script). Deployment-wide, so it needs an all-tenant scope (`403` `SCOPE_TOO_NARROW`). `409` `POSTGRES_REQUIRED` on SQLite. Requires `sql_access:manage`; audited as `sql_access.provision`."
          },
          "response": []
        },
        {
          "name": "Download the provisioning script",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/provision-script",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "provision-script"
              ]
            },
            "description": "The provisioning SQL as `text/plain` (one `BEGIN … COMMIT` transaction), for manual mode: run it as a role with CREATEROLE. Needs an all-tenant scope. `409` `POSTGRES_REQUIRED` on SQLite. Requires `sql_access:manage`."
          },
          "response": []
        },
        {
          "name": "List the SQL views and columns",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/catalog",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "catalog"
              ]
            },
            "description": "Every view a SQL login can read, with each column’s type in the masked and unmasked schemas and its classification. Requires `data:read`. `409` `POSTGRES_REQUIRED` on SQLite."
          },
          "response": []
        },
        {
          "name": "List SQL principals",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/principals",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "principals"
              ]
            },
            "description": "SQL logins inside your scope (unmasked ones only for `data:read_pii` holders), including revoked and expired ones. Requires `sql_access:manage`. `409` `POSTGRES_REQUIRED` on SQLite."
          },
          "response": []
        },
        {
          "name": "Create a SQL principal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/principals",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "principals"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"\",\n  \"pii\": false,\n  \"scope\": {\n    \"tenants\": \"\",\n    \"verticals\": \"\"\n  },\n  \"expiresAt\": \"\",\n  \"connectionLimit\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a read-only Postgres login. The response carries its password ONCE (`Cache-Control: no-store`); it is never stored or logged — rotate it if lost. The scope must lie inside yours (`403` `SCOPE_EXCEEDS_CALLER`); `pii: true` needs `data:read_pii` (`403` `PII_NOT_ALLOWED`). `409` `NOT_PROVISIONED` before the views exist, `409` `POSTGRES_REQUIRED` on SQLite. Requires `sql_access:manage`; audited as `sql_access.principal_create` (without the password)."
          },
          "response": []
        },
        {
          "name": "Rotate a SQL principal's password",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/principals/:id/rotate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "principals",
                ":id",
                "rotate"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Generate a new password, returned ONCE (`Cache-Control: no-store`). The old one stops working immediately and open sessions are ended. `404` for a principal unknown or outside your scope. Requires `sql_access:manage`; audited as `sql_access.principal_rotate` (without the password)."
          },
          "response": []
        },
        {
          "name": "Revoke a SQL principal",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sql-access/principals/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sql-access",
                "principals",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Revoke a login: it can no longer sign in, loses its grants and scope, and its open sessions are ended. The record stays, marked `revoked`. Requires `sql_access:manage`; audited as `sql_access.principal_revoke`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "sso",
      "description": "",
      "item": [
        {
          "name": "Public list of enabled SSO providers + local-login flag",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/sso/login-options",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sso",
                "login-options"
              ]
            },
            "description": "Public, **unauthenticated** endpoint that returns the enabled SSO providers (no secrets) and whether the local password form should be shown. Consumed by the login page to render its sign-in options."
          },
          "response": []
        },
        {
          "name": "Begin an OIDC / SAML login redirect",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/sso/:slug/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sso",
                ":slug",
                "login"
              ],
              "query": [
                {
                  "key": "return_to",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "slug",
                  "value": "{{platform}}"
                }
              ]
            },
            "description": "Begin an SSO login by redirecting (`302`) to the OIDC or SAML provider identified by `slug`; an optional `return_to` is preserved through the round-trip. Unauthenticated and rate-limited (10/min). Returns `404` if the provider is unknown or disabled, `400` if it does not support redirect login (e.g. LDAP), and `502` if initiation fails."
          },
          "response": []
        },
        {
          "name": "OIDC redirect-callback endpoint",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/sso/:slug/callback",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sso",
                ":slug",
                "callback"
              ],
              "query": [
                {
                  "key": "state",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "slug",
                  "value": "{{platform}}"
                }
              ]
            },
            "description": "OIDC redirect-callback the provider sends the browser back to after authentication. Unauthenticated and rate-limited (10/min). Validates the `state`, provisions/maps the user, then `302`-redirects to the UI completion route with a one-time handoff code. Returns `400` for missing/invalid/expired state, `404` for an unknown provider, and `401` if authentication fails. Writes an `sso.login` audit entry."
          },
          "response": []
        },
        {
          "name": "SAML Assertion Consumer Service (form-POST)",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/sso/:slug/acs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sso",
                ":slug",
                "acs"
              ],
              "variable": [
                {
                  "key": "slug",
                  "value": "{{platform}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"SAMLResponse\": \"\",\n  \"RelayState\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "SAML Assertion Consumer Service: the form-encoded `SAMLResponse` the IdP POSTs after authentication. Unauthenticated and rate-limited (10/min). Validates the assertion, provisions/maps the user, then `302`-redirects to the UI completion route with a one-time handoff code. Returns `400` if `SAMLResponse` is missing, `404` for a non-SAML/unknown provider, `500` if the IdP certificate is unconfigured, and `401` on validation failure. Writes an `sso.login` audit entry."
          },
          "response": []
        },
        {
          "name": "LDAP direct username/password login → JWT",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/sso/:slug/ldap-login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sso",
                ":slug",
                "ldap-login"
              ],
              "variable": [
                {
                  "key": "slug",
                  "value": "{{platform}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"\",\n  \"password\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Authenticate a username/password directly against an LDAP provider and return a JWT (no browser redirect). Unauthenticated and tightly rate-limited (5/min). Returns `400` if a credential is missing, `404` for an unknown/disabled/non-LDAP provider, `401` on invalid credentials, and `403` if JIT provisioning is disabled for a first-time user. Writes an `sso.login` audit entry."
          },
          "response": []
        },
        {
          "name": "Exchange a one-time SSO handoff code for a JWT",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/sso/handoff/exchange",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sso",
                "handoff",
                "exchange"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exchange the one-time handoff code issued at the end of an OIDC/SAML flow for a JWT. Called server-to-server by the admin UI; unauthenticated and rate-limited (30/min). The code is single-use — returns `400` if it is missing, already consumed, or expired."
          },
          "response": []
        }
      ]
    },
    {
      "name": "superset",
      "description": "",
      "item": [
        {
          "name": "Embedded Superset status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/analytics/superset/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "analytics",
                "superset",
                "status"
              ]
            },
            "description": "Whether embedded Apache Superset dashboards are configured, and the browser-facing Superset URL the admin UI embeds from. Requires `dashboards:view`."
          },
          "response": []
        },
        {
          "name": "List embedded Superset dashboards",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/analytics/superset/dashboards",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "analytics",
                "superset",
                "dashboards"
              ]
            },
            "description": "The registered Superset dashboards you may open: those whose extra permission you hold and whose verticals your tenant scope reaches. What each shows is still filtered to your tenants by the guest token. Requires `dashboards:view`. `409 SUPERSET_DISABLED` when Superset is not configured."
          },
          "response": []
        },
        {
          "name": "Choose who sees a Superset dashboard",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/analytics/superset/dashboards/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "analytics",
                "superset",
                "dashboards",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"audience\": {\n    \"kind\": \"private\",\n    \"tenants\": [\n      \"\"\n    ]\n  },\n  \"pinnedTenants\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Set a registered dashboard’s audience (`tenants` or `everyone`; not `private`) and optional pinned tenants, which narrow its guest-token row-level security to viewer scope ∩ pins. The bootstrap job never changes these. Requires `dashboards:share_all` and access to every tenant (`403 SCOPE_RESTRICTED` for a tenant-restricted caller, since registry entries are deployment-wide). `404` for a dashboard you cannot open, `409 SUPERSET_DISABLED` when Superset is not configured. Writes a `superset.share` audit entry."
          },
          "response": []
        },
        {
          "name": "Mint a Superset guest token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/analytics/superset/guest-token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "analytics",
                "superset",
                "guest-token"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"dashboardId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "A guest token for one registered dashboard, valid for 5 minutes, carrying a row-level-security clause that limits every query to your tenant scope, narrowed to the dashboard’s pinned tenants when it has any (no clause only when you see every tenant and it is unpinned). Requires `dashboards:view` (and the dashboard’s extra permission, if any). `404` for a dashboard you may not open, `403 SCOPE_EMPTY` when your access is restricted to no tenants, `409 SUPERSET_DISABLED` when Superset is not configured, `502 SUPERSET_UNAVAILABLE` when Superset refuses or cannot be reached. Writes a `superset.guest_token` audit entry at most once per user and dashboard every 10 minutes."
          },
          "response": []
        }
      ]
    },
    {
      "name": "sync-jobs",
      "description": "",
      "item": [
        {
          "name": "List sync jobs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sync-jobs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sync-jobs"
              ],
              "query": [
                {
                  "key": "vertical",
                  "value": "{{vertical}}",
                  "disabled": true
                },
                {
                  "key": "connection_id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Column to order by: one of `vertical`, `platform`, `connection`, `tenant`, `status`, `created`. An unrecognised value is ignored and the default order (newest first) is used.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "",
                  "description": "Sort direction: `asc` or `desc`. Any other value (including omitted) is ascending.",
                  "disabled": true
                },
                {
                  "key": "platform",
                  "value": "{{platform}}",
                  "description": "Case-insensitive substring match against the platform slug.",
                  "disabled": true
                },
                {
                  "key": "tenant_id",
                  "value": "",
                  "description": "Exact match against the connection's owning tenant id.",
                  "disabled": true
                },
                {
                  "key": "id",
                  "value": "{{resourceId}}",
                  "description": "Case-insensitive substring match against the sync job id.",
                  "disabled": true
                },
                {
                  "key": "connection_id_contains",
                  "value": "",
                  "description": "Case-insensitive substring match against the connection id. Distinct from `connection_id`, which is an exact match: the admin table filters on a prefix of the id its Connection cell shows.",
                  "disabled": true
                }
              ]
            },
            "description": "List data-sync jobs, optionally filtered by `vertical`, `connection_id`, `status`, `platform`, `tenant_id`, `id` and `connection_id_contains`, ordered by `sort`/`dir`, and paged with `page`/`limit`. `meta.total` is the number of rows matching the filter across the whole deployment — a real count, so a caller can page through every one of them. A tenant-restricted caller sees only jobs for its granted tenants. Any authenticated operator."
          },
          "response": []
        },
        {
          "name": "Enqueue a one-off sync job",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sync-jobs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sync-jobs"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"connection_id\": \"\",\n  \"callback_url\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Enqueue a one-off data-sync job for a connection, with an optional completion `callback_url`. Operator role or higher. Responds `202 Accepted` with the queued job. Upstream refusals keep their own status: `409` when a sync is already running for the connection, `404` when the connection is unknown or the deployment runs in `passthrough` mode (no sync engine), `502` when integration-server cannot be reached. `400` if `connection_id` is missing. Writes a `sync_job.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Read one sync job",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sync-jobs/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sync-jobs",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read a single sync job by id, including its status and progress. Any authenticated operator. Returns `404` if the job does not exist."
          },
          "response": []
        },
        {
          "name": "Cancel a running sync job",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/sync-jobs/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "sync-jobs",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Request cancellation of an in-flight sync job. Operator role or higher. Returns `404` if the job does not exist or is not in a cancelable state. Writes a `sync_job.cancel` audit entry."
          },
          "response": []
        },
        {
          "name": "Data-store metrics (resource counts, last sync timestamps, etc.)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/data-store/metrics",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "data-store",
                "metrics"
              ]
            },
            "description": "Return aggregate data-store metrics (resource counts, last-sync timestamps, and similar) for dashboards. Any authenticated operator; deployment-wide, so a tenant-restricted caller gets `403 SCOPE_RESTRICTED`. Responds with `data: null` when integration-server is unreachable so the UI can show an offline banner rather than erroring."
          },
          "response": []
        }
      ]
    },
    {
      "name": "tenants",
      "description": "",
      "item": [
        {
          "name": "Public domain→tenant map (no auth)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/tenant-domains/public",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenant-domains",
                "public"
              ]
            }
          },
          "response": []
        },
        {
          "name": "List tenants",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tenants",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenants"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create a tenant",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tenants",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenants"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"id\": \"\",\n  \"name\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Register a tenant. Operator role. 403 `SCOPE_RESTRICTED` for a tenant-restricted caller; 403 `LICENSE_LIMIT_EXCEEDED` (with `limitKey: 'tenants'`, `limit` and `used`) when the license's tenant limit, which counts `default`, is reached; 409 when the id already exists. Existing tenants are never removed."
          },
          "response": []
        },
        {
          "name": "Rename a tenant",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tenants/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenants",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Delete a tenant (not the default; must have no domains)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tenants/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenants",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List all custom domains",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tenant-domains",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenant-domains"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Attach a custom domain to a tenant",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tenant-domains",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenant-domains"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"domain\": \"\",\n  \"tenantId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Detach a custom domain",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tenant-domains/:domain",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tenant-domains",
                ":domain"
              ],
              "variable": [
                {
                  "key": "domain",
                  "value": ""
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "users",
      "description": "",
      "item": [
        {
          "name": "List admin / operator / viewer accounts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users"
              ]
            },
            "description": "List all admin-console user accounts with their roles and timestamps. Admin role required. Credentials are never returned."
          },
          "response": []
        },
        {
          "name": "Create a new user account",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"\",\n  \"password\": \"\",\n  \"role\": \"admin\",\n  \"email\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a new admin-console user with the given username, password, and role (`admin`, `operator`, or `viewer`), and optionally an email address. Admin role required. Returns `400` for a missing/invalid field (including a malformed email), an over-long username, or a password that fails policy, and `409` if the username is already taken. Writes a `user.create` audit entry, which records that an email was set but never the address."
          },
          "response": []
        },
        {
          "name": "Get one console account",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Read one console account with its identity-provider links and break-glass status. Admin role required. Pass `include_identity=true` to reveal each link’s `externalId` — the subject this account maps to in the identity provider, which is typically a work email. That privileged path writes a `user.pii_reveal` audit entry; without the flag the field is absent, not masked."
          },
          "response": []
        },
        {
          "name": "Change a console account’s role, password and/or email",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"role\": \"admin\",\n  \"password\": \"\",\n  \"email\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Update an existing account in place, preserving the user id and any break-glass pin. Admin role required. Refuses changing your own role (`400`), a demotion that would leave no password-usable local admin (`409`), a password that fails policy (`400`), a malformed email (`400`), and any change to another account that holds more than you (`403`). An email set here is owned by the console and SSO no longer overwrites it; `null` clears it. Writes a `user.update` audit entry (neither the password nor the email address is ever recorded — only `passwordChanged` / `emailChanged` flags)."
          },
          "response": []
        },
        {
          "name": "Delete a user account",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete a user account and any linked SSO identities. Admin role required. Returns `400` if you attempt to delete your own account, `409` if removing this user would leave no break-glass admin, and `404` if no user matches the id. Writes a `user.delete` audit entry."
          },
          "response": []
        },
        {
          "name": "Upload a console user's profile picture",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/:id/avatar",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                ":id",
                "avatar"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"data\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Store a profile picture (PNG, JPEG or WebP, at most 512 KB) for a console account, replacing any existing one — including one fetched from the identity provider, which SSO then no longer replaces. Any signed-in user may set their own; setting another user’s needs `users:manage`, and is refused (`403`) when that account holds more than you or sees tenants outside your scope. The type is identified from the bytes: `415` for anything else (SVG included, whatever the data URL declares), `413` when too large, `400` when `data` is not base64. `404` for an unknown user. Writes a `user.avatar_update` audit entry."
          },
          "response": []
        },
        {
          "name": "Remove a console user's profile picture",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/:id/avatar",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                ":id",
                "avatar"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Remove a console account’s profile picture, whichever source it came from; the console then shows initials. Idempotent (`204` when there was none). Any signed-in user may remove their own; removing another user’s needs `users:manage`, with the same `403` escalation guards as uploading. A picture sourced from the identity provider comes back at the next SSO sign-in if the IdP still sends one. `404` for an unknown user. Writes a `user.avatar_delete` audit entry when a picture was removed."
          },
          "response": []
        }
      ]
    },
    {
      "name": "verticals",
      "description": "",
      "item": [
        {
          "name": "List enabled verticals + per-vertical health",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/verticals",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "verticals"
              ]
            },
            "description": "List the configured verticals along with a live health check for each (e.g. whether its backing service is reachable). Any authenticated operator. Useful for a system-status dashboard."
          },
          "response": []
        }
      ]
    },
    {
      "name": "webhook-subs",
      "description": "",
      "item": [
        {
          "name": "List tenant webhook subscriptions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions"
              ],
              "query": [
                {
                  "key": "tenantId",
                  "value": "{{tenantId}}",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "description": "Case-insensitive substring match over the subscription label and URL. Applied server-side over the whole set, so a match is found regardless of where the row sits in the list.",
                  "disabled": true
                }
              ]
            },
            "description": "List webhook subscriptions (outbound delivery targets for `customer.*` and `connect_link.*` events), optionally filtered by `tenantId` and by a `search` over the label and URL. Operator role or higher. Signing secrets are not included."
          },
          "response": []
        },
        {
          "name": "Create a webhook subscription (secret returned once)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantId\": \"\",\n  \"url\": \"\",\n  \"label\": \"\",\n  \"events\": [\n    \"\"\n  ],\n  \"format\": \"opensteward\",\n  \"headers\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a webhook subscription that delivers events to the given URL. Admin role required. The response includes the signing secret **once** — it is not stored in retrievable form and cannot be fetched again. Returns `400` if `tenantId` or `url` is missing. Writes a `webhook_sub.create` audit entry."
          },
          "response": []
        },
        {
          "name": "Delete a webhook subscription",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Delete a webhook subscription by id, stopping further deliveries immediately. Admin role required. Returns `404` if no subscription matches the id. Writes a `webhook_sub.delete` audit entry."
          },
          "response": []
        },
        {
          "name": "Change a webhook subscription label, payload format or headers",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"format\": \"opensteward\",\n  \"headers\": \"\",\n  \"label\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Change the label, and how deliveries are shaped and authenticated for this subscription. The URL and event list are immutable — recreate the subscription to change those. Headers are replaced wholesale rather than merged, so an operator can remove one; an empty object clears them. Header values are stored encrypted and never returned. Admin role required. Writes a `webhook_sub.update` audit entry."
          },
          "response": []
        },
        {
          "name": "Pause or resume a webhook subscription",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions/:id/paused",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions",
                ":id",
                "paused"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"paused\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Pause (default) or resume a subscription. A paused subscription is retained but receives no deliveries. Admin role required. Writes a `webhook_sub.pause` audit entry."
          },
          "response": []
        },
        {
          "name": "Send a test event to a webhook subscription",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions/:id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions",
                ":id",
                "test"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Sends one synthetic `opensteward.test` event to this subscription, rendered in its own format, signed with its own secret and carrying its custom headers — so a destination can be proven to work without creating real data to trigger a real event. Nothing is queued and no delivery row is written. A receiver that rejects the payload is reported as `ok: false` with its status code rather than as an error. Works on a paused subscription. Admin role required. Writes a `webhook_sub.test` audit entry."
          },
          "response": []
        },
        {
          "name": "Rotate a webhook subscription signing secret",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions/:id/rotate-secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions",
                ":id",
                "rotate-secret"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "Generate a NEW signing secret, replacing the old one. The plaintext is returned **once**. Admin role required. Writes a `webhook_sub.rotate_secret` audit entry."
          },
          "response": []
        },
        {
          "name": "List deliveries for one subscription",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions/:id/deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions",
                ":id",
                "deliveries"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "Filter by delivery status: `pending`, `delivered` or `dead`. An unrecognised value is ignored and no status filter is applied.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Column to order by: one of `eventType`, `eventId`, `status`, `attempts`. An unrecognised value is ignored and the default order (most recent first) is used.",
                  "disabled": true
                },
                {
                  "key": "dir",
                  "value": "",
                  "description": "Sort direction: `asc` or `desc`. Any other value (including omitted) is ascending.",
                  "disabled": true
                },
                {
                  "key": "eventType",
                  "value": "",
                  "description": "Case-insensitive substring match against the event type.",
                  "disabled": true
                },
                {
                  "key": "eventId",
                  "value": "",
                  "description": "Case-insensitive substring match against the event id.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                }
              ]
            },
            "description": "List recent delivery attempts for one subscription, optionally filtered by `status` (`pending`, `delivered`, `dead`), `eventType`, `eventId`, and ordered by `sort`/`dir`, capped by `limit`. Operator role or higher. Filters and sort apply before pagination, so `meta.total` reflects the filtered set and every page reflects the requested order. Useful for diagnosing failed or dead-lettered deliveries."
          },
          "response": []
        },
        {
          "name": "Replay a single webhook delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{adminApiJwt}}",
                "description": "Admin-API JWT minted by POST /api/auth/login."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhook-subscriptions/:id/deliveries/:deliveryId/replay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhook-subscriptions",
                ":id",
                "deliveries",
                ":deliveryId",
                "replay"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{resourceId}}"
                },
                {
                  "key": "deliveryId",
                  "value": ""
                }
              ]
            },
            "description": "Re-enqueue a single past delivery for redelivery, e.g. after the receiver was down. Admin role required. Responds `202 Accepted` with the queued delivery, or `404` if the subscription or delivery is not found. Writes a `webhook_delivery.replay` audit entry."
          },
          "response": []
        }
      ]
    }
  ],
  "event": []
}
