{
  "openapi": "3.1.0",
  "info": {
    "title": "Clams API",
    "description": "Bitcoin accounting API — manage connections, journals, metadata, reports and more.\n## Authentication\nMost endpoints require `Authorization: Bearer <token>` (JWT access token).\n- Auth quickstart: [authentication.md](../auth/authentication.md)\n- Auth API (Swagger UI): [docs](../auth/)\n- Auth OpenAPI JSON: [openapi.json](../auth/openapi.json)\nBasic flow: login in browser, exchange the `aud=svc` token for an audience-scoped access token + refresh token, then refresh as needed.",
    "license": {
      "name": ""
    },
    "version": "1.0.2"
  },
  "paths": {
    "/v1/feedback": {
      "post": {
        "tags": [
          "Feedback"
        ],
        "operationId": "submit_feedback",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitFeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Feedback accepted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "operationId": "health",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthBody"
                }
              }
            }
          }
        },
        "security": [
          {}
        ]
      }
    },
    "/v1/notifications/stream": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "operationId": "notification_stream_docs",
        "parameters": [
          {
            "name": "operation_id",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/OperationId"
            },
            "example": "01890bfa-1111-7000-8000-000000000001"
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent notification stream",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationEvent"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Too many streams",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "501": {
            "description": "Notifications unavailable",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/operations/{operation_id}": {
      "get": {
        "tags": [
          "Operations"
        ],
        "operationId": "get_operation",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/OperationId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Operation record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Operation not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/operations/{operation_id}/cancel": {
      "post": {
        "tags": [
          "Operations"
        ],
        "operationId": "cancel_operation",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/OperationId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "204": {
            "description": "Operation canceled",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Operation not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/profiles": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "operationId": "list_profiles_for_subject",
        "responses": {
          "200": {
            "description": "Profiles for subject",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProfileRecord"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/profiles/resolve": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "operationId": "resolve_profile_scope",
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "profile",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved profile scope",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileScope"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Profile not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/reports/disclaimer": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "report_disclaimer",
        "responses": {
          "200": {
            "description": "Current verified report disclaimer",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiReportDisclaimerMetadata"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Legal manifest unavailable",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/user-settings": {
      "get": {
        "tags": [
          "Settings"
        ],
        "operationId": "get_user_settings",
        "responses": {
          "200": {
            "description": "User settings",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSettings"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Settings"
        ],
        "operationId": "set_user_settings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "User settings updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspace-invites/accept": {
      "post": {
        "tags": [
          "Workspace Invites"
        ],
        "operationId": "accept_workspace_invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptWorkspaceInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Invite accepted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptWorkspaceInviteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Invite not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspace-invites/{invite_id}": {
      "delete": {
        "tags": [
          "Workspace Invites"
        ],
        "operationId": "revoke_workspace_invite",
        "parameters": [
          {
            "name": "invite_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceInviteId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "204": {
            "description": "Invite revoked",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Invite not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "list_workspaces",
        "responses": {
          "200": {
            "description": "Workspace list",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkspaceRecord"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "create_workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Workspace created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "get_workspace",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete a workspace",
        "description": "Deletes a workspace and performs best-effort cleanup of related profiles, memberships, invites, settings, and storage.",
        "operationId": "delete_workspace",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "204": {
            "description": "Workspace deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/invites": {
      "get": {
        "tags": [
          "Workspace Invites"
        ],
        "operationId": "list_workspace_invites",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace invites page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_WorkspaceInviteView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Workspace Invites"
        ],
        "operationId": "create_workspace_invite",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Invite created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceInviteView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/members": {
      "get": {
        "tags": [
          "Workspace Members"
        ],
        "operationId": "list_workspace_members",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace members page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_WorkspaceMemberView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/members/{member_subject_id}": {
      "put": {
        "tags": [
          "Workspace Members"
        ],
        "operationId": "set_workspace_member_access",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "member_subject_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubjectId"
            },
            "example": "00000000-0000-5000-8000-000000000000"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetWorkspaceMemberAccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Workspace member updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceMemberView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Member not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workspace Members"
        ],
        "operationId": "remove_workspace_member",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "member_subject_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubjectId"
            },
            "example": "00000000-0000-5000-8000-000000000000"
          }
        ],
        "responses": {
          "204": {
            "description": "Workspace member removed",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Member not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles": {
      "post": {
        "tags": [
          "Profiles"
        ],
        "operationId": "create_profile",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProfileBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Profile created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/setup": {
      "post": {
        "tags": [
          "Profiles"
        ],
        "operationId": "setup_profile",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileSetupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Profile created with settings",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "operationId": "get_profile",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Profile record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Profile not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Profiles"
        ],
        "summary": "Delete a profile",
        "description": "Deletes a profile and performs best-effort cleanup of related memberships, invites, settings, and storage.",
        "operationId": "delete_profile",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "204": {
            "description": "Profile deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Profile not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Profiles"
        ],
        "summary": "Update a profile label",
        "description": "Use this endpoint for label-only edits. Clients that need to change both the label and profile settings in one serialized backend mutation should call `/v1/workspaces/{workspace_id}/profiles/{profile_id}/updates` instead.",
        "operationId": "update_profile_label",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Profile updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Profile not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/accounts": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "operationId": "list_accounts",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Account page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AccountRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Accounts"
        ],
        "operationId": "create_account",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Account created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/accounts/{account_id}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "operationId": "get_account",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Account record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Accounts"
        ],
        "operationId": "delete_account",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Account deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Accounts"
        ],
        "operationId": "update_account",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Account updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/assets": {
      "get": {
        "tags": [
          "Assets"
        ],
        "operationId": "list_assets",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Asset list",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AssetRecord"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/authorization/paid-read": {
      "post": {
        "tags": [
          "Profiles"
        ],
        "operationId": "require_paid_profile_read",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            }
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Paid profile read authorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Entitlement claim is stale",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/authorization/paid-write": {
      "post": {
        "tags": [
          "Profiles"
        ],
        "operationId": "require_paid_profile_write",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            }
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Paid profile write authorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and writable profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Entitlement claim is stale",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/chain-sources": {
      "get": {
        "tags": [
          "Chain Sources"
        ],
        "operationId": "list_chain_sources",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chain sources page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Chain Sources"
        ],
        "operationId": "create_chain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertOnchainBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Chain source created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/chain-sources/{chain_source_id}": {
      "put": {
        "tags": [
          "Chain Sources"
        ],
        "operationId": "update_chain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "chain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertOnchainBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Chain source updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Chain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Chain Sources"
        ],
        "operationId": "delete_chain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "chain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Chain source deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Chain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Chain Sources"
        ],
        "operationId": "update_chain_source_with_input",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "chain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OnchainUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Chain source updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Chain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/chain-sources/{chain_source_id}/select": {
      "put": {
        "tags": [
          "Chain Sources"
        ],
        "operationId": "select_chain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "chain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Chain source selected",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Chain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "list_connections",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connections page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PublicConnectionRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "create_connection",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConnectionBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Connection created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicConnectionRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionConfigApiErrorBody"
                },
                "example": {
                  "code": "invalid_connection_config",
                  "details": {
                    "code": "missing_credential",
                    "connection_kind": "CoreLn",
                    "field": "rune",
                    "hint": "Provide the Commando rune under `config.rune`.",
                    "message": "commando transport requires a non-empty `config.rune`",
                    "path": [
                      "config",
                      "rune"
                    ],
                    "retryable_with_user_input": true,
                    "stage": "validate"
                  },
                  "message": "commando transport requires a non-empty `config.rune`",
                  "request_id": "req_123",
                  "retry_after_seconds": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/kinds": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "list_connection_kinds",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Connection kinds",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionKind"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/kinds/{kind}/validate": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "validate_connection_config",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateConfigBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Configuration validated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NormalizedConfigurationBody"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionConfigApiErrorBody"
                },
                "example": {
                  "code": "invalid_connection_config",
                  "details": {
                    "code": "empty_value",
                    "connection_kind": "Nwc",
                    "field": "uri",
                    "hint": "Provide a full nostr+walletconnect URI.",
                    "message": "uri must not be empty or whitespace",
                    "path": [
                      "uri"
                    ],
                    "retryable_with_user_input": true,
                    "stage": "validate"
                  },
                  "message": "uri must not be empty or whitespace",
                  "request_id": "req_123",
                  "retry_after_seconds": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/resolve": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "resolve_connection_id",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved connection id",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveConnectionBody"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/sync": {
      "post": {
        "tags": [
          "Operations"
        ],
        "operationId": "start_sync_all_connections",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_sync_timeout_secs",
            "in": "query",
            "description": "Override per-connection timeout in seconds for this sync operation.\nWhen omitted, the engine uses its configured default timeout.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "sync_parallelism",
            "in": "query",
            "description": "Override bulk sync parallelism for this operation.\nValid values are >=1 and must not exceed the engine's configured maximum.\nWhen omitted, the engine default is used.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "force_full_sync",
            "in": "query",
            "description": "Ignore any stored checkpoints for this sync operation only.\nWhen omitted, incremental sync behavior is used.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Sync started",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Sync already running",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Too many active sync operations queued",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}": {
      "delete": {
        "tags": [
          "Connections"
        ],
        "operationId": "delete_connection",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "204": {
            "description": "Connection deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Connections"
        ],
        "operationId": "update_connection",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnectionBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Connection updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicConnectionRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionConfigApiErrorBody"
                },
                "example": {
                  "code": "invalid_connection_config",
                  "details": {
                    "code": "invalid_format",
                    "connection_kind": "Lnd",
                    "field": "addr",
                    "hint": "Use `https://host:port`; `.onion` hosts may use `tcp://`.",
                    "message": "grpc config.addr must include a URL scheme",
                    "path": [
                      "config",
                      "addr"
                    ],
                    "retryable_with_user_input": true,
                    "stage": "validate"
                  },
                  "message": "grpc config.addr must include a URL scheme",
                  "request_id": "req_123",
                  "retry_after_seconds": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/auth": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "get_connection_auth_status",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Connection OAuth status. Null means this connection has no stored OAuth authorization state.",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionAuthStatusResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/auth/authorize": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "start_connection_authorization",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionOAuthAuthorizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Connection OAuth authorization start",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOAuthAuthorizeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/auth/callback": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "complete_connection_authorization",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionOAuthCallbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Connection OAuth callback completion",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOAuthCallbackResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/auth/disconnect": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "disconnect_connection_authorization",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Connection OAuth authorization disconnected. Null means no OAuth authorization state existed.",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionAuthStatusResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/config-export": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "export_connection_config",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Unredacted connection configuration export",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionConfigExport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/discover": {
      "post": {
        "tags": [
          "Operations"
        ],
        "operationId": "start_discover_connection",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_sync_timeout_secs",
            "in": "query",
            "description": "Override per-connection timeout in seconds for this discovery operation.\nWhen omitted, the engine uses its configured default timeout.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionDiscoverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Discovery started",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Sync already running",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Too many active sync operations queued",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/imports/csv": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "import_connection_csv",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CsvImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "CSV import accepted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionCsvImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionConfigApiErrorBody"
                },
                "example": {
                  "code": "invalid_connection_config",
                  "details": {
                    "code": "invalid_format",
                    "connection_kind": "Address",
                    "field": "config",
                    "hint": "Update the stored connection configuration to valid JSON.",
                    "message": "connection configuration is not valid JSON: EOF while parsing an object at line 1 column 1",
                    "path": [
                      "config"
                    ],
                    "retryable_with_user_input": true,
                    "stage": "csv_import"
                  },
                  "message": "connection configuration is not valid JSON: EOF while parsing an object at line 1 column 1",
                  "request_id": "req_123",
                  "retry_after_seconds": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/imports/json": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "import_connection_json",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportJsonBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Connection data imported",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicConnectionRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionConfigApiErrorBody"
                },
                "example": {
                  "code": "invalid_connection_config",
                  "details": {
                    "code": "invalid_format",
                    "connection_kind": "CoreLn",
                    "field": "config",
                    "hint": "Update the stored connection configuration to valid JSON.",
                    "message": "connection configuration is not valid JSON: EOF while parsing an object at line 1 column 1",
                    "path": [
                      "config"
                    ],
                    "retryable_with_user_input": true,
                    "stage": "import"
                  },
                  "message": "connection configuration is not valid JSON: EOF while parsing an object at line 1 column 1",
                  "request_id": "req_123",
                  "retry_after_seconds": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/connections/{connection_id}/sync": {
      "post": {
        "tags": [
          "Operations"
        ],
        "operationId": "start_sync_connection",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "connection_sync_timeout_secs",
            "in": "query",
            "description": "Override per-connection timeout in seconds for this sync operation.\nWhen omitted, the engine uses its configured default timeout.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "force_full_sync",
            "in": "query",
            "description": "Ignore any stored checkpoint for this sync operation only.\nWhen omitted, incremental sync behavior is used.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Sync started",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Sync already running",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Too many active sync operations queued",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/event-counts": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "count_journal_events",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest journal event counts summary",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEventCountSummary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/events": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "list_journal_events",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 10
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Optional start timestamp in RFC3339.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Optional end timestamp in RFC3339.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event_kind",
            "in": "query",
            "description": "Optional journal event kind filter.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "description": "Optional tag identifiers (repeatable).",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "note_contains",
            "in": "query",
            "description": "Optional case-insensitive note substring.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "description": "Optional account identifier filter.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "description": "Optional connection identifier filter.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Journal event list page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_JournalEventListItem"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/events/{event_id}": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "get_event_details",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "description": "Event identifier present in the journals snapshot.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "evt-123"
          }
        ],
        "responses": {
          "200": {
            "description": "Journal event details",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEventDetails"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Journal event not found in latest snapshot (or canonical record missing)",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/process": {
      "post": {
        "tags": [
          "Journals"
        ],
        "operationId": "process_journal",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Journal processed",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalRunOutcome"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/process/operation": {
      "post": {
        "tags": [
          "Operations"
        ],
        "operationId": "start_process_journals",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "202": {
            "description": "Journal processing started",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license and profile capacity required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Profile operation already running",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Too many active operations queued",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/quarantine-resolutions": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "list_quarantine_resolutions",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quarantine resolutions page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalQuarantineResolutionPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/quarantines": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "list_quarantines",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Journal quarantines page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalQuarantinePage"
                }
              }
            }
          },
          "204": {
            "description": "No journals run exists yet",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/quarantines/{event_kind}/{event_id}": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "get_quarantine_event",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "transaction"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tx-123"
          }
        ],
        "responses": {
          "200": {
            "description": "Single journal quarantine event",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalQuarantineEvent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Quarantine event not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/quarantines/{event_kind}/{event_id}/resolution": {
      "put": {
        "tags": [
          "Journals"
        ],
        "operationId": "put_quarantine_resolution",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "transaction"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tx-123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetJournalQuarantineResolutionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Quarantine resolution upserted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalQuarantineResolutionRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Quarantine event not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Journals"
        ],
        "operationId": "delete_quarantine_resolution",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "transaction"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tx-123"
          }
        ],
        "responses": {
          "204": {
            "description": "Quarantine resolution deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/transfers": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "list_manual_transfer_links",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Manual transfer link page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualTransferLinkPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Journals"
        ],
        "operationId": "create_manual_transfer_link",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManualTransferLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Manual transfer link created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualTransferLinkRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Endpoint event not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Endpoint already linked",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/journals/transfers/{link_id}": {
      "get": {
        "tags": [
          "Journals"
        ],
        "operationId": "get_manual_transfer_link",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "link_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "v1:d2l0aGRyYXdhbDph:ZGVwb3NpdDpi"
          }
        ],
        "responses": {
          "200": {
            "description": "Manual transfer link",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualTransferLinkRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Manual transfer link not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Journals"
        ],
        "operationId": "delete_manual_transfer_link",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "link_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "v1:d2l0aGRyYXdhbDph:ZGVwb3NpdDpi"
          }
        ],
        "responses": {
          "204": {
            "description": "Manual transfer link deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "operationId": "list_metadata",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataPage_MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Metadata"
        ],
        "operationId": "create_metadata",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetadataCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Metadata record created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "operationId": "get_metadata",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Metadata"
        ],
        "operationId": "update_metadata",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetadataUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Metadata record updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Metadata"
        ],
        "operationId": "delete_metadata",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata record deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}/adjustments": {
      "post": {
        "tags": [
          "Metadata"
        ],
        "operationId": "add_metadata_adjustment",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMetadataAdjustment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Metadata adjustment added",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}/adjustments/{entry_signature}": {
      "delete": {
        "tags": [
          "Metadata"
        ],
        "operationId": "remove_metadata_adjustment",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entry_signature",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata adjustment removed",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}/btc-fiat-override": {
      "put": {
        "tags": [
          "Metadata"
        ],
        "operationId": "set_metadata_btc_fiat_override",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMetadataBtcFiatOverride"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Metadata BTC-fiat override set",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}/btc-fiat-rate": {
      "put": {
        "tags": [
          "Metadata"
        ],
        "operationId": "set_metadata_btc_fiat_rate",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMetadataBtcFiatRate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Metadata BTC-fiat rate set",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Metadata"
        ],
        "operationId": "clear_metadata_btc_fiat_rate",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata BTC-fiat rate cleared",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}/excluded": {
      "put": {
        "tags": [
          "Metadata"
        ],
        "operationId": "set_metadata_excluded",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMetadataExcluded"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Metadata excluded flag set",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}/note": {
      "put": {
        "tags": [
          "Metadata"
        ],
        "operationId": "set_metadata_note",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMetadataNote"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Metadata note set",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Metadata"
        ],
        "operationId": "clear_metadata_note",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata note cleared",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/records/{event_id}/tags/{tag_id}": {
      "post": {
        "tags": [
          "Metadata"
        ],
        "operationId": "add_metadata_tag",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TagId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata tag added",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Metadata"
        ],
        "operationId": "remove_metadata_tag",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TagId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata tag removed",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Metadata record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/tags": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "operationId": "list_tags",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata tags page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Metadata"
        ],
        "operationId": "create_tag",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Tag created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/metadata/tags/{tag_id}": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "operationId": "get_tag",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TagId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Metadata"
        ],
        "operationId": "delete_tag",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TagId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Metadata"
        ],
        "operationId": "update_tag",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TagId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Tag updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/onchain/sources": {
      "get": {
        "tags": [
          "Onchain"
        ],
        "operationId": "list_onchain_sources",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Onchain sources page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Onchain"
        ],
        "operationId": "create_onchain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertOnchainBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Onchain source created",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/onchain/sources/{onchain_source_id}": {
      "put": {
        "tags": [
          "Onchain"
        ],
        "operationId": "update_onchain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "onchain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertOnchainBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Onchain source updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Onchain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Onchain"
        ],
        "operationId": "delete_onchain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "onchain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Onchain source deleted",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Onchain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Onchain"
        ],
        "operationId": "update_onchain_source_with_input",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "onchain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OnchainUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Onchain source updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOnchainDataSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Onchain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/onchain/sources/{onchain_source_id}/select": {
      "put": {
        "tags": [
          "Onchain"
        ],
        "operationId": "select_onchain_source",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "onchain_source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Onchain source selected",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Onchain source not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/profile-settings": {
      "get": {
        "tags": [
          "Settings"
        ],
        "operationId": "get_profile_settings",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Profile settings",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Profile settings not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Settings"
        ],
        "operationId": "set_profile_settings",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Profile settings updated",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Profile settings not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/channels": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_channels",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Channel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/channels/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_channel",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Channel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Channel record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/deposits": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_deposits",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deposit records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Deposit"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/deposits/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_deposit",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deposit record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Deposit"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Deposit record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/forwards": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_forwards",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Forward records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Forward"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/forwards/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_forward",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Forward record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Forward"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Forward record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/invoices": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_invoices",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Invoice"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/invoices/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_invoice",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Invoice"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Invoice record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/pays": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_pays",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Pay"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/pays/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_pay",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Pay"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Payment record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/peg-bridges": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_peg_bridges",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Peg bridge records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_PegBridge"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Records"
        ],
        "operationId": "create_peg_bridge",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManualPegBridgeCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Created peg bridge record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_PegBridge"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "412": {
            "description": "Missing canonical side or amount mismatch",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/peg-bridges/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_peg_bridge",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Peg bridge record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_PegBridge"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Peg bridge record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Records"
        ],
        "operationId": "delete_peg_bridge",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Peg bridge delete result",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PegBridgeDeleteResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/trades": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_trades",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trade records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Trade"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/trades/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_trade",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trade record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Trade"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Trade record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/transactions": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_transactions",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Transaction"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/transactions/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_transaction",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Transaction"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Transaction record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/utxos": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_utxos",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          },
          {
            "name": "spent_filter",
            "in": "query",
            "description": "Filter for UTXO spent state when listing records.\nWhen omitted, the default is `all`.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/UtxoSpentFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Utxo records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Utxo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/utxos/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_utxo",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Utxo record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Utxo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Utxo record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/withdrawals": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "list_withdrawals",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1
            },
            "example": 100
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "description": "Optional connection filter (UUID v7) to restrict results to a single connection.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectionId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Withdrawal records page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPage_Withdrawal"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/records/withdrawals/{canonical_id}": {
      "get": {
        "tags": [
          "Records"
        ],
        "operationId": "get_withdrawal",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "canonical_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Withdrawal record",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalRecord_Withdrawal"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Withdrawal record not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/reports/balance-history": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "balance_history",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/BalanceHistoryInterval"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asset_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Balance history report",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedReport_BalanceHistoryReport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/reports/balance-sheet": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "balance_sheet",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "as_of",
            "in": "query",
            "description": "Optional as-of UTC timestamp (RFC 3339). When present, only journal entries at or before\nthis time are included in the aggregation.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagination",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/RequiredPaginationParams"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Balance sheet report page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedReport_BalanceSheetReportPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/reports/balance-sheet/connection-balances": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "balance_sheet_connection_balances",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "snapshot_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AccountKind"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rollup",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "description": "Optional as-of UTC timestamp (RFC 3339). When present, only journal entries at or before\nthis time are included in the aggregation.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagination",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/RequiredPaginationParams"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Balance sheet connection balances page",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedReport_BalanceSheetConnectionBalancesPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/reports/capital-gains": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "capital_gains_download",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Capital gains CSV export",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "text/csv": {}
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/reports/journal-entries": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "journal_entries_download",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Journal entries CSV export",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "text/csv": {}
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/reports/portfolio-summary": {
      "get": {
        "tags": [
          "Reports"
        ],
        "operationId": "portfolio_summary",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "responses": {
          "200": {
            "description": "Portfolio summary report",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedReport_PortfolioSummaryReport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "Active Clams license required",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/workspaces/{workspace_id}/profiles/{profile_id}/updates": {
      "patch": {
        "tags": [
          "Profiles"
        ],
        "summary": "Update a profile label and settings under one mutation lock",
        "description": "Use this endpoint when a caller needs the label change and settings patch application to be serialized under the same profile mutation lock. The server applies the patch against the current stored settings while holding that lock, preventing stale client snapshots from overwriting concurrent profile-settings mutations.",
        "operationId": "update_profile_with_settings",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WorkspaceId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          },
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProfileId"
            },
            "example": "018f7d3c-5a3b-7c2b-9c8a-cc5a0e2f1a2b"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileWithSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Combined profile update outcome",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateProfileWithSettingsResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Profile not found",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "x-request-id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for correlating logs"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptWorkspaceInviteRequest": {
        "type": "object",
        "description": "Request payload for accepting a workspace invite.",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "Invite token received by the user."
          }
        }
      },
      "AcceptWorkspaceInviteResponse": {
        "type": "object",
        "description": "Response payload returned after accepting a workspace invite.",
        "required": [
          "workspace_id",
          "workspace_label",
          "access",
          "profiles"
        ],
        "properties": {
          "access": {
            "$ref": "#/components/schemas/WorkspaceInviteAccess",
            "description": "Access level granted by the invite."
          },
          "profiles": {
            "$ref": "#/components/schemas/WorkspaceInviteProfiles",
            "description": "Profile selection granted by the invite."
          },
          "workspace_id": {
            "$ref": "#/components/schemas/WorkspaceId",
            "description": "Workspace identifier that was joined."
          },
          "workspace_label": {
            "type": "string",
            "description": "Workspace label for display."
          }
        }
      },
      "AccountAdjustment": {
        "type": "object",
        "description": "Manual account adjustment linked to a metadata record.",
        "required": [
          "entry_signature",
          "account_id",
          "timestamp"
        ],
        "properties": {
          "account_id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Override account identifier."
          },
          "entry_signature": {
            "type": "string",
            "description": "Entry signature from the journals snapshot."
          },
          "timestamp": {
            "type": "string",
            "description": "RFC3339 timestamp for the adjustment."
          }
        }
      },
      "AccountCreate": {
        "type": "object",
        "description": "Account creation request payload.",
        "required": [
          "parent_id",
          "label"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional ASCII description for the new account."
          },
          "label": {
            "type": "string",
            "description": "Human-readable label for the new account."
          },
          "parent_id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Parent identifier under which the new account will be linked."
          }
        }
      },
      "AccountId": {
        "type": "string",
        "format": "uuid",
        "description": "Canonical identifier used for all accounts ensuring UUID v7 semantics."
      },
      "AccountKind": {
        "type": "string",
        "description": "Enumerates the supported account categories aligned with root taxonomy.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted [`AccountRecord`] values.",
        "enum": [
          "assets",
          "liabilities",
          "equity",
          "income",
          "expenses"
        ]
      },
      "AccountRecord": {
        "type": "object",
        "description": "Canonical record representation persisted across all APIs.",
        "required": [
          "id",
          "root_id",
          "role",
          "kind",
          "label",
          "immutable"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description."
          },
          "id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Unique account identifier."
          },
          "immutable": {
            "type": "boolean",
            "description": "Whether the account is immutable."
          },
          "kind": {
            "$ref": "#/components/schemas/AccountKind",
            "description": "Account category (Assets, Liabilities, etc.)."
          },
          "label": {
            "type": "string",
            "description": "Human-readable label."
          },
          "parent_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccountId",
                "description": "Parent account identifier (None for root accounts)."
              }
            ]
          },
          "role": {
            "$ref": "#/components/schemas/AccountRole",
            "description": "Account role (Root, Default, Custom)."
          },
          "root_id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Root category account identifier."
          }
        }
      },
      "AccountRole": {
        "type": "string",
        "description": "Enumerates account roles used to derive immutability rules.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted [`AccountRecord`] values.",
        "enum": [
          "root",
          "default",
          "custom"
        ]
      },
      "AccountUpdate": {
        "type": "object",
        "description": "Mutable update payload for an existing account.",
        "properties": {
          "description": {
            "$ref": "#/components/schemas/DescriptionUpdate",
            "description": "Update instructions for the description."
          },
          "label": {
            "$ref": "#/components/schemas/LabelUpdate",
            "description": "Update instructions for the label."
          },
          "parent": {
            "$ref": "#/components/schemas/ParentUpdate",
            "description": "Update instructions for the parent linkage."
          }
        }
      },
      "AddMetadataAdjustment": {
        "type": "object",
        "description": "Request body used to add or replace an account adjustment.",
        "required": [
          "entry_signature",
          "account_id"
        ],
        "properties": {
          "account_id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Override account identifier."
          },
          "entry_signature": {
            "type": "string",
            "description": "Entry signature from the journals snapshot."
          },
          "timestamp": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC3339 timestamp for the adjustment (defaults to now when omitted)."
          }
        }
      },
      "ApiErrorBody": {
        "type": "object",
        "description": "Error payload returned by REST handlers.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable error code for programmatic handling."
          },
          "details": {
            "description": "Optional machine-readable error details.\nFor `invalid_connection_config`, this is a serialized\n[`ConnectionConfigErrorDetail`] and is the source of truth. `message`\nmirrors `details.message` for display."
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message."
          },
          "request_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional request identifier for support."
          },
          "retry_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional retry hint in seconds.",
            "minimum": 0
          }
        }
      },
      "ArchiveType": {
        "type": "string",
        "description": "Fixed archive type enumeration scoped to replay domains.\nValues follow the naming used throughout the workspace (e.g. `Invoices`, `Pays`).",
        "enum": [
          "Invoices",
          "Pays",
          "Transactions",
          "Utxos",
          "Forwards",
          "OpenChannels",
          "ClosedChannels",
          "Deposits",
          "Withdrawals",
          "Imports"
        ]
      },
      "AssetClass": {
        "type": "string",
        "description": "Broad economic class used to select asset behavior without making the asset code enum closed.",
        "enum": [
          "bitcoin",
          "fiat",
          "stablecoin",
          "commodity",
          "equity",
          "bond",
          "other"
        ]
      },
      "AssetCode": {
        "type": "string"
      },
      "AssetId": {
        "type": "string",
        "format": "uuid",
        "description": "Canonical asset identifier backed by a UUID v7 value."
      },
      "AssetIssuerRecord": {
        "type": "object",
        "description": "Issuer metadata exposed with cataloged assets.",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable issuer code."
          },
          "name": {
            "type": "string",
            "description": "Human-readable issuer name."
          }
        }
      },
      "AssetRecord": {
        "type": "object",
        "description": "Canonical asset record exposed by the engine API.",
        "required": [
          "id",
          "code",
          "name",
          "class",
          "native_precision",
          "display_precision",
          "valuation_policy"
        ],
        "properties": {
          "class": {
            "$ref": "#/components/schemas/AssetClass",
            "description": "Broad class that controls asset-specific behavior."
          },
          "code": {
            "$ref": "#/components/schemas/AssetCode",
            "description": "Canonical asset code."
          },
          "display_precision": {
            "type": "integer",
            "format": "int32",
            "description": "Default display precision for user-facing amounts.",
            "minimum": 0
          },
          "id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Canonical asset identifier (UUID v7)."
          },
          "issuer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetIssuerRecord",
                "description": "Optional issuer metadata for issued assets."
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "Human-readable asset name."
          },
          "native_precision": {
            "type": "integer",
            "format": "int32",
            "description": "Native fractional precision for the asset.",
            "minimum": 0
          },
          "valuation_policy": {
            "$ref": "#/components/schemas/ValuationPolicy",
            "description": "Valuation policy used by reports."
          }
        }
      },
      "AssetReference": {
        "oneOf": [
          {
            "type": "object",
            "description": "Built-in BTC or fiat asset reference.",
            "required": [
              "System"
            ],
            "properties": {
              "System": {
                "type": "object",
                "description": "Built-in BTC or fiat asset reference.",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "$ref": "#/components/schemas/AssetCode",
                    "description": "Closed system asset code."
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "Liquid asset reference keyed by network and Elements asset id.",
            "required": [
              "Liquid"
            ],
            "properties": {
              "Liquid": {
                "type": "object",
                "description": "Liquid asset reference keyed by network and Elements asset id.",
                "required": [
                  "network",
                  "asset_id"
                ],
                "properties": {
                  "asset_id": {
                    "type": "string",
                    "description": "Elements asset id as exposed by Liquid/LWK."
                  },
                  "network": {
                    "type": "string",
                    "description": "Liquid network name, such as `liquid` or `testnet`."
                  }
                }
              }
            }
          }
        ],
        "description": "Source-system reference that resolves to an accounting asset identifier."
      },
      "BalanceHistoryInterval": {
        "type": "string",
        "description": "Sampling interval used when constructing balance history points.",
        "enum": [
          "hour",
          "day",
          "week",
          "month"
        ]
      },
      "BalanceHistoryIssues": {
        "type": "object",
        "description": "Issues detected while computing balance history.",
        "required": [
          "unknown_account_rows",
          "unknown_account_ids_sample"
        ],
        "properties": {
          "unknown_account_ids_sample": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountId"
            },
            "description": "Sample of offending account identifiers capped at a small fixed size."
          },
          "unknown_account_rows": {
            "type": "integer",
            "description": "Number of journal rows that referenced unknown or deleted accounts.",
            "minimum": 0
          }
        }
      },
      "BalanceHistoryPoint": {
        "type": "object",
        "description": "Single sampled balance point for an asset.",
        "required": [
          "timestamp",
          "balance"
        ],
        "properties": {
          "balance": {
            "type": "string",
            "description": "Net balance at `timestamp` in the asset's native units (msat scale for BTC)."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BalanceHistoryRange": {
        "type": "object",
        "description": "Effective time range sampled by the report.",
        "required": [
          "start",
          "end"
        ],
        "properties": {
          "end": {
            "type": "string",
            "format": "date-time"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BalanceHistoryReport": {
        "type": "object",
        "description": "Top-level balance history report for a workspace profile.",
        "required": [
          "workspace_id",
          "profile_id",
          "snapshot_path",
          "snapshot_timestamp",
          "non_final",
          "interval",
          "series",
          "issues"
        ],
        "properties": {
          "account_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccountId",
                "description": "Optional account subtree filter applied to the report."
              }
            ]
          },
          "applied_range": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BalanceHistoryRange",
                "description": "Effective sampled time range after defaulting omitted bounds from snapshot data."
              }
            ]
          },
          "asset_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetId",
                "description": "Optional asset filter applied to the report."
              }
            ]
          },
          "connection_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConnectionId",
                "description": "Optional connection filter applied to the report."
              }
            ]
          },
          "interval": {
            "$ref": "#/components/schemas/BalanceHistoryInterval",
            "description": "Effective sampling interval used by the report."
          },
          "issues": {
            "$ref": "#/components/schemas/BalanceHistoryIssues",
            "description": "Metadata describing data quality issues encountered during computation."
          },
          "non_final": {
            "type": "boolean"
          },
          "profile_id": {
            "type": "string",
            "format": "uuid"
          },
          "requested_end": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Inclusive user-supplied UTC end timestamp when present."
          },
          "requested_start": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Inclusive user-supplied UTC start timestamp when present."
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceHistorySeries"
            },
            "description": "Per-asset sampled balance series."
          },
          "snapshot_path": {
            "type": "string"
          },
          "snapshot_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "BalanceHistorySeries": {
        "type": "object",
        "description": "One asset series in the balance history report.",
        "required": [
          "asset_id",
          "asset_code",
          "points"
        ],
        "properties": {
          "asset_code": {
            "$ref": "#/components/schemas/AssetCode"
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId"
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceHistoryPoint"
            }
          }
        }
      },
      "BalanceSheetAmount": {
        "type": "object",
        "description": "Per asset balance aggregates for a single account or ledger section.",
        "required": [
          "asset_id",
          "asset",
          "debit_total",
          "credit_total",
          "net"
        ],
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/ReportAssetDisplay",
            "description": "Display metadata for the asset."
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Asset in which the balance is denominated."
          },
          "credit_total": {
            "type": "string",
            "description": "Total credits summed from all postings for this asset."
          },
          "debit_total": {
            "type": "string",
            "description": "Total debits summed from all postings for this asset."
          },
          "net": {
            "type": "string",
            "description": "Net balance computed as `debit_total` minus `credit_total`."
          }
        }
      },
      "BalanceSheetConnectionBalance": {
        "type": "object",
        "description": "Per-connection balance aggregates for asset postings within an account kind.",
        "required": [
          "kind",
          "balances"
        ],
        "properties": {
          "account_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccountId",
                "description": "Account identifier for the balances included in this row.\n\nOlder callers that construct rows by hand may leave this unset, but computed rows include it."
              }
            ]
          },
          "account_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Account label for the balances included in this row."
          },
          "account_path": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Root-to-account labels for the balances included in this row."
          },
          "balances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetAmount"
            },
            "description": "Per asset balances for this connection."
          },
          "connection_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConnectionId",
                "description": "Connection identifier for this aggregate. `None` represents postings without a connection."
              }
            ]
          },
          "connection_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Snapshot-era connection label for this aggregate.\n`None` when the connection was unassigned or no persisted label metadata is available for\nthe snapshot timestamp."
          },
          "fiat_valuation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BalanceSheetFiatValuation",
                "description": "Estimated fiat value of this connection's net balances.\n\n`None` when exchange rates are unavailable, fiat conversion was not requested, or no\nnon-zero balance in the row could be converted."
              }
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/AccountKind",
            "description": "Root category of the balances included in this row."
          }
        }
      },
      "BalanceSheetConnectionBalancesPage": {
        "type": "object",
        "description": "Paginated response of per-connection balance aggregates for a balance sheet snapshot.",
        "required": [
          "workspace_id",
          "profile_id",
          "snapshot_path",
          "snapshot_timestamp",
          "non_final",
          "included_kinds",
          "rollup",
          "items"
        ],
        "properties": {
          "account_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccountId",
                "description": "Optional account id used to restrict results."
              }
            ]
          },
          "as_of_timestamp": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional as-of cutoff that was applied when computing this report."
          },
          "fiat_excluded_assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValuationExcludedAsset"
            },
            "description": "Assets excluded from fiat conversion due to unsupported paths or missing rates."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more pages are available after this one."
          },
          "included_kinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountKind"
            },
            "description": "Account kinds that were included when computing this report."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetConnectionBalance"
            },
            "description": "Per-connection balances by account kind."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor token for the next page, when present."
          },
          "non_final": {
            "type": "boolean",
            "description": "Flag indicating whether the underlying snapshot is marked non final."
          },
          "profile_id": {
            "type": "string",
            "format": "uuid",
            "description": "Profile within the workspace."
          },
          "rollup": {
            "type": "boolean",
            "description": "Flag indicating whether descendant accounts are included."
          },
          "snapshot_path": {
            "type": "string",
            "description": "Path to the underlying journals snapshot file."
          },
          "snapshot_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp derived from the snapshot path or metadata."
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid",
            "description": "Workspace that owns the report."
          }
        }
      },
      "BalanceSheetFiatValuation": {
        "type": "object",
        "description": "Estimated fiat value for a connection balance row.\nThe amount is not a held balance. It is the estimated market value of the row's net asset\nbalances using rates at `valuation_timestamp`.",
        "required": [
          "currency",
          "amount",
          "valuation_timestamp"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Estimated value of the row's net balances in `currency`."
          },
          "currency": {
            "$ref": "#/components/schemas/FiatCurrency",
            "description": "Fiat currency used to denominate the estimated value."
          },
          "valuation_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp used for exchange-rate lookup."
          }
        }
      },
      "BalanceSheetIssues": {
        "type": "object",
        "description": "Issues detected while computing the balance sheet.",
        "required": [
          "unknown_account_rows",
          "unknown_account_ids_sample"
        ],
        "properties": {
          "unknown_account_ids_sample": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountId"
            },
            "description": "Sample of offending account identifiers capped at a small fixed size."
          },
          "unknown_account_rows": {
            "type": "integer",
            "description": "Number of journal rows that referenced unknown or deleted accounts.",
            "minimum": 0
          }
        }
      },
      "BalanceSheetReportPage": {
        "type": "object",
        "description": "Paginated balance sheet response with flattened rows.",
        "required": [
          "workspace_id",
          "profile_id",
          "snapshot_path",
          "snapshot_timestamp",
          "non_final",
          "included_kinds",
          "totals",
          "issues",
          "items"
        ],
        "properties": {
          "as_of_timestamp": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional as-of cutoff that was applied when computing this report."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more pages are available after this one."
          },
          "included_kinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountKind"
            },
            "description": "Account kinds that were included when computing this report."
          },
          "issues": {
            "$ref": "#/components/schemas/BalanceSheetIssues",
            "description": "Metadata describing data quality issues encountered during computation."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetRow"
            },
            "description": "Flattened account rows in pre-order traversal."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor token for the next page, when present."
          },
          "non_final": {
            "type": "boolean",
            "description": "Flag indicating whether the underlying snapshot is marked non final."
          },
          "profile_id": {
            "type": "string",
            "format": "uuid",
            "description": "Profile within the workspace."
          },
          "snapshot_path": {
            "type": "string",
            "description": "Path to the underlying journals snapshot file."
          },
          "snapshot_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp derived from the snapshot path or metadata."
          },
          "totals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetAmount"
            },
            "description": "Per asset totals for the entire ledger given the included kinds."
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid",
            "description": "Workspace that owns the report."
          }
        }
      },
      "BalanceSheetRow": {
        "type": "object",
        "description": "Flattened balance sheet row emitted in pre-order traversal for pagination.",
        "required": [
          "account_id",
          "kind",
          "label",
          "depth",
          "balances"
        ],
        "properties": {
          "account_id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Identifier of the account represented by this row."
          },
          "balances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetAmount"
            },
            "description": "Per asset balances for this account including all postings attributed to it."
          },
          "depth": {
            "type": "integer",
            "description": "Depth in the pre-order traversal where 0 represents a root node.",
            "minimum": 0
          },
          "kind": {
            "$ref": "#/components/schemas/AccountKind",
            "description": "Root category of the account."
          },
          "label": {
            "type": "string",
            "description": "Human readable account label."
          },
          "parent_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccountId",
                "description": "Optional parent account identifier."
              }
            ]
          }
        }
      },
      "BillingLimitExceededDetails": {
        "type": "object",
        "description": "Structured payload for profile or billing-capacity failures.",
        "required": [
          "metric",
          "limit",
          "used",
          "requested"
        ],
        "properties": {
          "entitlement_revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Authoritative entitlement revision used for the access decision.",
            "minimum": 0
          },
          "instance_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Instance whose shared capacity was checked, when known."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum current usage allowed.",
            "minimum": 0
          },
          "metric": {
            "$ref": "#/components/schemas/BillingLimitMetric",
            "description": "Limit metric that was exceeded."
          },
          "offer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Self-service offer that can add capacity, when known."
          },
          "profile_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProfileId",
                "description": "Profile rejected by deterministic capacity selection, when applicable."
              }
            ]
          },
          "profile_ordinal": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "One-based position in the deterministic oldest-first live-profile ordering.",
            "minimum": 0
          },
          "requested": {
            "type": "integer",
            "format": "int32",
            "description": "Additional units requested by the failed operation.",
            "minimum": 0
          },
          "used": {
            "type": "integer",
            "format": "int32",
            "description": "Usage observed by the rejecting component.",
            "minimum": 0
          },
          "valid_from_epoch": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Epoch seconds from which the active capacity interval applies.",
            "minimum": 0
          },
          "valid_until_epoch": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Epoch seconds at which the current limit expires or must be recomputed.",
            "minimum": 0
          }
        }
      },
      "BillingLimitMetric": {
        "type": "string",
        "description": "Billing limit that can block a paid workflow.",
        "enum": [
          "profiles"
        ]
      },
      "BitcoinRpcArgs": {
        "type": "object",
        "description": "Configuration parameters for Bitcoin Core RPC connections.",
        "required": [
          "url",
          "rpc_cookie"
        ],
        "properties": {
          "rpc_cookie": {
            "type": "string",
            "description": "Path to Bitcoin Core's authentication cookie file."
          },
          "rpc_password": {
            "type": [
              "string",
              "null"
            ],
            "description": "RPC password (alternative to cookie)."
          },
          "rpc_user": {
            "type": [
              "string",
              "null"
            ],
            "description": "RPC username (alternative to cookie)."
          },
          "timeout_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional request timeout override in seconds.\nRuntime callers may preserve legacy transport-specific defaults when this is not specified.",
            "minimum": 1
          },
          "url": {
            "type": "string",
            "description": "Bitcoin Core RPC endpoint URL (e.g., `<http://localhost:8332>`)."
          }
        }
      },
      "CanonicalPage_Channel": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Channel"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Deposit": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Deposit"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Forward": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Forward"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Invoice": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Invoice"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Pay": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Pay"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_PegBridge": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_PegBridge"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Trade": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Trade"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Transaction": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Transaction"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Utxo": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Utxo"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalPage_Withdrawal": {
        "type": "object",
        "description": "Canonical page returned from list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalRecord_Withdrawal"
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CanonicalRecord_Channel": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical channel payload that surfaces the funding outpoint for secondary indexing.",
            "required": [
              "id",
              "connection_id",
              "capacity",
              "funding_outpoint",
              "opener"
            ],
            "properties": {
              "anchor_output": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Total anchor output amount attributable to the local node, in sats using the msat 3-decimal encoding."
              },
              "capacity": {
                "type": "string",
                "description": "Total channel capacity in sats (msats encoding, must end with \".000\")."
              },
              "close_to_address": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Address funds will be sent to on channel close (any network/format)."
              },
              "close_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ChannelCloseType",
                    "description": "Channel close classification when available."
                  }
                ]
              },
              "closing_tx_hash": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Closing txid (lowercase hex if present)."
              },
              "commitment_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CommitmentType",
                    "description": "Commitment type describing script behavior and fee model when known."
                  }
                ]
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Connection that owns this channel (UUID v7, lower-case hyphenated)."
              },
              "funding_outpoint": {
                "type": "string",
                "description": "On-chain funding outpoint in `<txid>:<vout>` format."
              },
              "id": {
                "type": "string",
                "description": "Opaque external channel identifier (typically 8-byte hex string)."
              },
              "is_dual_funded": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Hint indicating whether the channel was established using dual funding."
              },
              "local_close_fee": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Proven local close fee added to `settlement_receipt_amount`, or `None` when fee attribution is unknown."
              },
              "local_contribution": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Local node funding contribution in sats using the msat 3-decimal encoding when known."
              },
              "opener": {
                "type": "boolean",
                "description": "Whether this node initiated the channel opening."
              },
              "pushed": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Amount pushed to counterparty during channel opening."
              },
              "settle_amount": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Final settlement amount owed to user (if channel is closed). For CLN this is sourced from\n`final_to_us_msat` on closed channels, falling back to `to_us_msat` for compatibility."
              },
              "settlement_receipt_amount": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Local on-chain settlement receipt before any proven local close-fee adjustment."
              }
            }
          }
        }
      },
      "CanonicalRecord_Deposit": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical deposit payload capturing inbound fiat or bitcoin transfers to a managed wallet.",
            "required": [
              "id",
              "connection_id",
              "timestamp",
              "amount",
              "asset_id"
            ],
            "properties": {
              "amount": {
                "type": "string",
                "description": "Gross amount stored at the native precision of `asset_id`.\nNet managed impact = amount - fee."
              },
              "asset_id": {
                "$ref": "#/components/schemas/AssetId",
                "description": "Asset identifier derived from the `assets` crate."
              },
              "btc_destination": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "On-chain address or LN payment hash; equality-based secondary index."
              },
              "btc_txid": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional on-chain transaction id (lowercase 64-char hex)."
              },
              "btc_vout": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Optional on-chain output index within the transaction (0..=65535).",
                "minimum": 0
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Connection identifier (UUID v7, lowercase hyphenated)."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional human-readable description or memo associated with the deposit."
              },
              "fee": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional fee in the same asset using the native precision of `asset_id`."
              },
              "id": {
                "type": "string",
                "description": "Opaque external identifier from the source system."
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Event timestamp (seconds since Unix epoch)."
              },
              "transfer_ref": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional source-provided asset-agnostic transfer identity for linking a\nmanaged withdrawal and deposit that represent the same external movement."
              }
            }
          }
        }
      },
      "CanonicalRecord_Forward": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical routing forward event capturing fees earned for a hop.",
            "required": [
              "id",
              "connection_id",
              "amount",
              "timestamp"
            ],
            "properties": {
              "amount": {
                "type": "string",
                "description": "Routing fee earned (msats encoding)."
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Connection identifier (UUID v7, lowercase hyphenated)."
              },
              "id": {
                "type": "string",
                "description": "Opaque external identifier from the source system."
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "When the forwarding event occurred (seconds since Unix epoch)."
              }
            }
          }
        }
      },
      "CanonicalRecord_Invoice": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical invoice payload representing inbound settlements.",
            "required": [
              "id",
              "connection_id",
              "timestamp",
              "amount"
            ],
            "properties": {
              "amount": {
                "type": "string",
                "description": "Base invoice amount requested from the payer (msats encoding)."
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Connection identifier (UUID v7, lowercase hyphenated)."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional description or memo provided with the invoice."
              },
              "id": {
                "type": "string",
                "description": "Payment hash or external identifier from the source system."
              },
              "settled_amount": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Actual amount settled across all HTLCs when it differs from the base amount (msats encoding)."
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Settlement timestamp expressed in whole seconds."
              },
              "zap": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Indicates whether this invoice represents a Nostr zap."
              }
            }
          }
        }
      },
      "CanonicalRecord_Pay": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical payment payload encapsulating Lightning or on-chain spend events.\n# Identity Model\nThis payload uses a two-level identity scheme:\n- **Canonical ID** (storage key): A unique event identifier that distinguishes\nindividual pay events, even when the same invoice is paid multiple times.\nFormat varies by connector (e.g., `pay:lnd:v1:pi:<index>`).\n- **Correlation ID** (`Pay.id`): The business identifier used for Lightning\ninvoice matching, typically the `payment_hash`. This value may repeat across\nmultiple pay events when the same invoice is paid more than once.\nThis separation allows duplicate pays (same invoice paid twice) to coexist\nin storage while preserving correct journal correlation behavior.",
            "required": [
              "id",
              "connection_id",
              "timestamp",
              "amount",
              "fee"
            ],
            "properties": {
              "amount": {
                "type": "string",
                "description": "Amount sent excluding fees (msats encoding)."
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Connection identifier (UUID v7, lowercase hyphenated)."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional description or memo associated with the payment."
              },
              "destination": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Destination node pubkey; 66-character lowercase hex when present."
              },
              "fee": {
                "type": "string",
                "description": "Total routing fees paid (msats encoding)."
              },
              "id": {
                "type": "string",
                "description": "Correlation identifier for Lightning invoice matching (typically `payment_hash`).\nThis is **not** a unique event identifier. Multiple pay events may share the\nsame `id` when the same invoice is paid more than once. Use the canonical\nstorage ID to distinguish individual pay events."
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Completion timestamp expressed in whole seconds."
              },
              "zap": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Indicates whether this payment was a Nostr zap."
              }
            }
          }
        }
      },
      "CanonicalRecord_PegBridge": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical bridge record linking Bitcoin L1 and Liquid peg activity.",
            "required": [
              "id",
              "bitcoin_connection_id",
              "liquid_connection_id",
              "timestamp",
              "direction",
              "bitcoin_txid",
              "bitcoin_vout",
              "liquid_txid",
              "amount",
              "asset_id",
              "liquid_asset_id",
              "match_source"
            ],
            "properties": {
              "amount": {
                "type": "string",
                "description": "Bridge principal amount using fixed scale `3`."
              },
              "asset_id": {
                "$ref": "#/components/schemas/AssetId",
                "description": "Bitcoin-side asset identifier for bridge principal. This must resolve to system BTC."
              },
              "bitcoin_connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Bitcoin L1 connection participating in the bridge."
              },
              "bitcoin_fee": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional Bitcoin-side fee in the BTC asset."
              },
              "bitcoin_txid": {
                "type": "string",
                "description": "Bitcoin transaction id for the matched L1 outpoint."
              },
              "bitcoin_vout": {
                "type": "integer",
                "format": "int32",
                "description": "Bitcoin output index for the matched L1 outpoint.",
                "minimum": 0
              },
              "confidence": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional diagnostic confidence label from the matcher."
              },
              "direction": {
                "$ref": "#/components/schemas/PegBridgeDirection",
                "description": "Peg direction."
              },
              "id": {
                "type": "string",
                "description": "Stable bridge identifier."
              },
              "liquid_asset_id": {
                "$ref": "#/components/schemas/AssetId",
                "description": "Liquid-side asset identifier for bridge principal. This must resolve to L-BTC."
              },
              "liquid_connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Liquid connection participating in the bridge and canonical envelope owner."
              },
              "liquid_fee": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional Liquid-side fee in the L-BTC asset."
              },
              "liquid_txid": {
                "type": "string",
                "description": "Liquid transaction id carrying peg evidence."
              },
              "match_source": {
                "$ref": "#/components/schemas/PegBridgeMatchSource",
                "description": "Whether the match was automatic or manual."
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Bridge event timestamp."
              }
            }
          }
        }
      },
      "CanonicalRecord_Trade": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical trade execution payload capturing asset conversions and fees.",
            "required": [
              "id",
              "connection_id",
              "timestamp",
              "from_asset_id",
              "from_amount",
              "to_asset_id",
              "to_amount"
            ],
            "properties": {
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Exchange/connection identifier (UUID v7, lowercase hyphenated)."
              },
              "fee_amount": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Fee amount stored at `fee_asset_id` native precision, or `from_asset_id` when absent."
              },
              "fee_asset_id": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AssetId",
                    "description": "Asset used to pay fees, if distinct."
                  }
                ]
              },
              "from_amount": {
                "type": "string",
                "description": "Amount of the \"from\" asset stored at `from_asset_id` native precision."
              },
              "from_asset_id": {
                "$ref": "#/components/schemas/AssetId",
                "description": "Asset being sold."
              },
              "id": {
                "type": "string",
                "description": "Opaque trade execution identifier from the source system."
              },
              "order_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional exchange order identifier."
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Execution timestamp expressed in whole seconds."
              },
              "to_amount": {
                "type": "string",
                "description": "Amount of the \"to\" asset stored at `to_asset_id` native precision."
              },
              "to_asset_id": {
                "$ref": "#/components/schemas/AssetId",
                "description": "Asset being bought."
              },
              "trade_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exchange-specific identifiers."
              }
            }
          }
        }
      },
      "CanonicalRecord_Transaction": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical on-chain transaction capturing confirmed inputs and outputs.",
            "required": [
              "id",
              "connection_id",
              "timestamp",
              "block_height",
              "inputs",
              "outputs"
            ],
            "properties": {
              "block_height": {
                "type": "integer",
                "format": "int32",
                "description": "Confirmed block height where this transaction was included.",
                "minimum": 0
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Wallet/connection that detected this transaction (UUID v7)."
              },
              "id": {
                "type": "string",
                "description": "Transaction txid (lowercase hex on emit)."
              },
              "inputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OnchainInput"
                },
                "description": "Previous outputs being spent."
              },
              "ln_tx_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/LnTransactionType",
                    "description": "Lightning transaction classification when available."
                  }
                ]
              },
              "outputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OnchainOutput"
                },
                "description": "New outputs being created."
              },
              "raw": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RawTransactionMetadata",
                    "description": "Raw consensus metadata when the source exposed enough transaction bytes to retain it."
                  }
                ]
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Confirmation timestamp expressed in whole seconds."
              }
            }
          }
        }
      },
      "CanonicalRecord_Utxo": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical unspent transaction output payload captured by accounting connections.",
            "required": [
              "id",
              "connection_id",
              "amount",
              "address"
            ],
            "properties": {
              "address": {
                "type": "string",
                "description": "Address or script associated with the UTXO (any network/format)."
              },
              "amount": {
                "type": "string",
                "description": "Amount in the UTXO asset's native accounting units."
              },
              "asset_id": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AssetId",
                    "description": "Accounting asset identifier for this UTXO.\n\n`None` represents legacy BTC-only rows persisted before asset-aware canonical records."
                  }
                ]
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Wallet/connection identifier (UUID v7, lowercase hyphenated)."
              },
              "id": {
                "type": "string",
                "description": "Outpoint formatted as `<txid>:<vout>` and serving as the primary identifier."
              },
              "linked_channel_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Channel identifier this UTXO is associated with when known."
              },
              "origin": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UtxoOrigin",
                    "description": "Describes how this UTXO entered the wallet when known (sweep, close, etc.)."
                  }
                ]
              },
              "script_pubkey": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Producing output `ScriptPubKey` as lowercase hex when fetched from the configured on-chain\nsource."
              },
              "source_asset": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/OnchainAssetReference",
                    "description": "Source-chain asset reference used to derive this UTXO.\n\n`None` represents legacy BTC-only rows persisted before source asset tracking."
                  }
                ]
              }
            }
          }
        }
      },
      "CanonicalRecord_Withdrawal": {
        "type": "object",
        "description": "Canonical record envelope that binds a caller-supplied canonical identifier, the owning\nconnection, ordering metadata, and a typed payload together for serialization.",
        "required": [
          "canonical_id",
          "connection_id",
          "ordering_key",
          "payload"
        ],
        "properties": {
          "canonical_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordering_key": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payload": {
            "type": "object",
            "description": "Canonical withdrawal payload capturing outbound fiat or bitcoin transfers from a managed wallet.",
            "required": [
              "id",
              "connection_id",
              "timestamp",
              "amount",
              "asset_id"
            ],
            "properties": {
              "amount": {
                "type": "string",
                "description": "Amount stored at the native precision of `asset_id`."
              },
              "asset_id": {
                "$ref": "#/components/schemas/AssetId",
                "description": "Asset identifier derived from the `assets` crate."
              },
              "btc_destination": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "On-chain address or LN payment hash; equality-based secondary index."
              },
              "btc_txid": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional on-chain transaction id (lowercase 64-char hex)."
              },
              "btc_vout": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Optional on-chain output index within the transaction (0..=65535).",
                "minimum": 0
              },
              "connection_id": {
                "type": "string",
                "format": "uuid",
                "description": "Connection identifier (UUID v7, lowercase hyphenated)."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional human-readable description or memo associated with the withdrawal."
              },
              "fee": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional fee in the same asset using the native precision of `asset_id`."
              },
              "id": {
                "type": "string",
                "description": "Opaque external identifier from the source system."
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Event timestamp expressed in whole seconds."
              },
              "transfer_ref": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional source-provided asset-agnostic transfer identity for linking a\nmanaged withdrawal and deposit that represent the same external movement."
              }
            }
          }
        }
      },
      "ChainSourceFamily": {
        "type": "string",
        "description": "Chain family served by a shared chain source.",
        "enum": [
          "bitcoin",
          "liquid"
        ]
      },
      "Channel": {
        "type": "object",
        "description": "Canonical channel payload that surfaces the funding outpoint for secondary indexing.",
        "required": [
          "id",
          "connection_id",
          "capacity",
          "funding_outpoint",
          "opener"
        ],
        "properties": {
          "anchor_output": {
            "type": [
              "string",
              "null"
            ],
            "description": "Total anchor output amount attributable to the local node, in sats using the msat 3-decimal encoding."
          },
          "capacity": {
            "type": "string",
            "description": "Total channel capacity in sats (msats encoding, must end with \".000\")."
          },
          "close_to_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Address funds will be sent to on channel close (any network/format)."
          },
          "close_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ChannelCloseType",
                "description": "Channel close classification when available."
              }
            ]
          },
          "closing_tx_hash": {
            "type": [
              "string",
              "null"
            ],
            "description": "Closing txid (lowercase hex if present)."
          },
          "commitment_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CommitmentType",
                "description": "Commitment type describing script behavior and fee model when known."
              }
            ]
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection that owns this channel (UUID v7, lower-case hyphenated)."
          },
          "funding_outpoint": {
            "type": "string",
            "description": "On-chain funding outpoint in `<txid>:<vout>` format."
          },
          "id": {
            "type": "string",
            "description": "Opaque external channel identifier (typically 8-byte hex string)."
          },
          "is_dual_funded": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Hint indicating whether the channel was established using dual funding."
          },
          "local_close_fee": {
            "type": [
              "string",
              "null"
            ],
            "description": "Proven local close fee added to `settlement_receipt_amount`, or `None` when fee attribution is unknown."
          },
          "local_contribution": {
            "type": [
              "string",
              "null"
            ],
            "description": "Local node funding contribution in sats using the msat 3-decimal encoding when known."
          },
          "opener": {
            "type": "boolean",
            "description": "Whether this node initiated the channel opening."
          },
          "pushed": {
            "type": [
              "string",
              "null"
            ],
            "description": "Amount pushed to counterparty during channel opening."
          },
          "settle_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Final settlement amount owed to user (if channel is closed). For CLN this is sourced from\n`final_to_us_msat` on closed channels, falling back to `to_us_msat` for compatibility."
          },
          "settlement_receipt_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Local on-chain settlement receipt before any proven local close-fee adjustment."
          }
        }
      },
      "ChannelCloseType": {
        "type": "string",
        "description": "Channel closure classification derived from upstream node semantics.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted canonical channel records.",
        "enum": [
          "mutual",
          "local_force",
          "remote_force",
          "breach",
          "funding_canceled",
          "abandoned",
          "unknown"
        ]
      },
      "CollaborativeMode": {
        "type": "string",
        "description": "Operator-selected mode for collaborative wallet quarantine reconciliation.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted journals state.",
        "enum": [
          "send",
          "transfer"
        ]
      },
      "CommitmentType": {
        "type": "string",
        "description": "Commitment type describing channel script behavior and fee model.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted canonical channel records.",
        "enum": [
          "legacy",
          "static_remote_key",
          "anchors",
          "lease",
          "unknown",
          "zero_fee_commitments"
        ]
      },
      "ConnectionAuthMode": {
        "type": "string",
        "description": "OAuth custody mode selected for a connection authorization lifecycle.",
        "enum": [
          "local_pkce",
          "hosted_broker"
        ]
      },
      "ConnectionAuthStatus": {
        "type": "string",
        "description": "Current authorization status for an OAuth-backed connection.",
        "enum": [
          "needs_authorization",
          "connected",
          "reauthorization_required",
          "revoked",
          "missing_scopes",
          "broker_unavailable",
          "disconnected"
        ]
      },
      "ConnectionAuthStatusResponse": {
        "type": "object",
        "description": "Non-secret connection OAuth authorization status.",
        "required": [
          "connection_id",
          "provider_key",
          "mode",
          "status",
          "requested_scopes",
          "granted_scopes"
        ],
        "properties": {
          "access_token_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "connection_id": {
            "$ref": "#/components/schemas/ConnectionId"
          },
          "credential_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "granted_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "last_authorized_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_refreshed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "mode": {
            "$ref": "#/components/schemas/ConnectionAuthMode"
          },
          "provider_key": {
            "type": "string"
          },
          "refresh_token_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "requested_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionAuthStatus"
          },
          "status_message": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ConnectionConfigApiErrorBody": {
        "type": "object",
        "description": "Error payload returned by REST handlers that may include structured\nconnection-configuration details.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable error code for programmatic handling."
          },
          "details": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConnectionConfigErrorDetail",
                "description": "Optional structured connection-config details.\n\nWhen `code == \"invalid_connection_config\"`, callers should treat this\nas the source of truth."
              }
            ]
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message."
          },
          "request_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional request identifier for support."
          },
          "retry_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional retry hint in seconds.",
            "minimum": 0
          }
        }
      },
      "ConnectionConfigErrorCode": {
        "type": "string",
        "description": "Stable machine-readable reason for a connection-config failure.",
        "enum": [
          "missing_required_field",
          "empty_value",
          "invalid_type",
          "invalid_format",
          "invalid_value",
          "unsupported_value",
          "unsupported_capability",
          "duplicate_value",
          "network_mismatch",
          "missing_credential",
          "authentication_failed",
          "transport_unavailable",
          "external_probe_failed",
          "invalid_mapping",
          "unknown"
        ]
      },
      "ConnectionConfigErrorDetail": {
        "type": "object",
        "description": "Structured machine-readable detail for connection-configuration failures.",
        "required": [
          "connection_kind",
          "stage",
          "code",
          "path",
          "message",
          "retryable_with_user_input"
        ],
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ConnectionConfigErrorCode",
            "description": "Stable machine-readable error code."
          },
          "connection_kind": {
            "$ref": "#/components/schemas/ConnectionKind",
            "description": "Connection kind whose configuration failed validation."
          },
          "field": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional UI-facing field identifier to correct."
          },
          "hint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional user-facing hint for correcting the value."
          },
          "message": {
            "type": "string",
            "description": "Human-readable display message derived from the structured detail."
          },
          "path": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Canonical JSON path segments pointing at the offending value."
          },
          "retryable_with_user_input": {
            "type": "boolean",
            "description": "Whether the caller can retry after collecting user input."
          },
          "stage": {
            "$ref": "#/components/schemas/ConnectionConfigStage",
            "description": "Validation or execution stage that surfaced the error."
          }
        }
      },
      "ConnectionConfigErrorDetailsBody": {
        "type": "object",
        "description": "Structured details returned for `invalid_connection_config` errors.\nThe HTTP error envelope stores this value in `ApiErrorBody.details`.",
        "required": [
          "detail"
        ],
        "properties": {
          "detail": {
            "$ref": "#/components/schemas/ConnectionConfigErrorDetail"
          }
        }
      },
      "ConnectionConfigExport": {
        "type": "object",
        "description": "Secret-bearing configuration payload for a connection portability export.",
        "required": [
          "label",
          "kind"
        ],
        "properties": {
          "configuration": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stored JSON configuration, unredacted."
          },
          "kind": {
            "$ref": "#/components/schemas/ConnectionKind",
            "description": "Connection adapter kind."
          },
          "label": {
            "type": "string",
            "description": "Connection label to use as the import default."
          }
        }
      },
      "ConnectionConfigStage": {
        "type": "string",
        "description": "One lifecycle stage that surfaced a connection-config error.",
        "enum": [
          "validate",
          "create",
          "update",
          "sync",
          "import",
          "csv_import"
        ]
      },
      "ConnectionCsvImportResult": {
        "type": "object",
        "description": "CSV import response payload including the updated connection record and skipped rows.",
        "required": [
          "connection",
          "skipped_rows"
        ],
        "properties": {
          "connection": {
            "$ref": "#/components/schemas/PublicConnectionRecord",
            "description": "Updated connection record."
          },
          "skipped_rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CsvImportSkippedRow"
            },
            "description": "Details for rows ignored during the import."
          }
        }
      },
      "ConnectionDiscoverRequest": {
        "type": "object",
        "description": "Transient request for discovering sparse wallet activity from a selected keychain index.",
        "required": [
          "keychain",
          "from"
        ],
        "properties": {
          "from": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "keychain": {
            "$ref": "#/components/schemas/DiscoverKeychain"
          },
          "to_exclusive": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "ConnectionId": {
        "type": "string",
        "format": "uuid",
        "description": "Connection identifier backed by UUID v7."
      },
      "ConnectionKind": {
        "type": "string",
        "description": "Canonical set of supported connection kinds persisted in connection records.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of existing stored records.",
        "enum": [
          "CoreLn",
          "Lnd",
          "Nwc",
          "XPub",
          "Descriptor",
          "Address",
          "Phoenix",
          "Custom",
          "River",
          "LiquidDescriptor",
          "Phoenixd"
        ]
      },
      "ConnectionOAuthAuthorizeRequest": {
        "type": "object",
        "description": "Request to start a connection OAuth authorization flow.",
        "properties": {
          "mode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConnectionAuthMode"
              }
            ]
          },
          "redirect_uri": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ConnectionOAuthAuthorizeResponse": {
        "type": "object",
        "description": "Response from starting a connection OAuth authorization flow.",
        "required": [
          "authorization_url",
          "state",
          "expires_in",
          "mode"
        ],
        "properties": {
          "authorization_url": {
            "type": "string"
          },
          "credential_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_in": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "mode": {
            "$ref": "#/components/schemas/ConnectionAuthMode"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "ConnectionOAuthCallbackRequest": {
        "type": "object",
        "description": "Provider callback payload for completing local OAuth or polling hosted broker status.",
        "required": [
          "state"
        ],
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "credential_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string"
          }
        }
      },
      "ConnectionOAuthCallbackResponse": {
        "type": "object",
        "description": "Response after completing a connection OAuth authorization callback.",
        "required": [
          "status",
          "granted_scopes"
        ],
        "properties": {
          "credential_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "granted_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionAuthStatus"
          }
        }
      },
      "ConnectionSyncFailure": {
        "type": "object",
        "description": "Records a per-connection failure surfaced by [`OperationResult::SyncAllConnections`].",
        "required": [
          "id",
          "label",
          "kind",
          "error_code",
          "reason"
        ],
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Stable string code for the underlying error."
          },
          "id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Connection identifier that failed to sync."
          },
          "kind": {
            "$ref": "#/components/schemas/ConnectionKind",
            "description": "Connection kind."
          },
          "label": {
            "type": "string",
            "description": "Connection label at the time of the sync attempt."
          },
          "reason": {
            "type": "string",
            "description": "Transport-safe, user-facing reason (best-effort redacted)."
          }
        }
      },
      "CreateConnectionBody": {
        "type": "object",
        "description": "Payload for creating a connection.",
        "required": [
          "label",
          "kind"
        ],
        "properties": {
          "configuration": {},
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "CreateManualTransferLinkRequest": {
        "type": "object",
        "description": "Request payload for creating a manual transfer link between two canonical events.",
        "required": [
          "source_event_kind",
          "source_event_id",
          "destination_event_kind",
          "destination_event_id"
        ],
        "properties": {
          "destination_event_id": {
            "type": "string",
            "description": "Destination canonical event identifier."
          },
          "destination_event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Destination canonical event kind."
          },
          "source_event_id": {
            "type": "string",
            "description": "Source canonical event identifier."
          },
          "source_event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Source canonical event kind."
          },
          "transaction_outpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional selected transaction output when either endpoint is an on-chain transaction."
          }
        }
      },
      "CreateProfileBody": {
        "type": "object",
        "description": "Payload for creating a profile under a workspace.",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string"
          }
        }
      },
      "CreateWorkspaceBody": {
        "type": "object",
        "description": "Payload for creating a workspace.",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string"
          }
        }
      },
      "CreateWorkspaceInviteRequest": {
        "type": "object",
        "description": "Request payload for creating a workspace invite.",
        "required": [
          "invited_email",
          "access",
          "profiles"
        ],
        "properties": {
          "access": {
            "$ref": "#/components/schemas/WorkspaceInviteAccess",
            "description": "Access level granted by the invite."
          },
          "invited_email": {
            "type": "string",
            "description": "Email address the invite should be sent to."
          },
          "profiles": {
            "$ref": "#/components/schemas/WorkspaceInviteProfiles",
            "description": "Profile selection for the invite."
          }
        }
      },
      "CsvImportRequest": {
        "type": "object",
        "description": "Multipart payload for CSV imports.",
        "required": [
          "file"
        ],
        "properties": {
          "content_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional MIME type override."
          },
          "file": {
            "type": "string",
            "description": "CSV file contents."
          },
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional filename override."
          }
        }
      },
      "CsvImportSkippedRow": {
        "type": "object",
        "description": "Row metadata for CSV rows skipped during import.",
        "required": [
          "row_idx",
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason the row was skipped during import."
          },
          "row_idx": {
            "type": "integer",
            "format": "int64",
            "description": "1-based data row index from the CSV (header excluded).",
            "minimum": 0
          }
        }
      },
      "DataSourceId": {
        "type": "string",
        "format": "uuid",
        "description": "Strongly typed onchain data source identifier guaranteeing UUID v7 semantics."
      },
      "Deposit": {
        "type": "object",
        "description": "Canonical deposit payload capturing inbound fiat or bitcoin transfers to a managed wallet.",
        "required": [
          "id",
          "connection_id",
          "timestamp",
          "amount",
          "asset_id"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Gross amount stored at the native precision of `asset_id`.\nNet managed impact = amount - fee."
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Asset identifier derived from the `assets` crate."
          },
          "btc_destination": {
            "type": [
              "string",
              "null"
            ],
            "description": "On-chain address or LN payment hash; equality-based secondary index."
          },
          "btc_txid": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional on-chain transaction id (lowercase 64-char hex)."
          },
          "btc_vout": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Optional on-chain output index within the transaction (0..=65535).",
            "minimum": 0
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection identifier (UUID v7, lowercase hyphenated)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional human-readable description or memo associated with the deposit."
          },
          "fee": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional fee in the same asset using the native precision of `asset_id`."
          },
          "id": {
            "type": "string",
            "description": "Opaque external identifier from the source system."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Event timestamp (seconds since Unix epoch)."
          },
          "transfer_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional source-provided asset-agnostic transfer identity for linking a\nmanaged withdrawal and deposit that represent the same external movement."
          }
        }
      },
      "DescriptionUpdate": {
        "oneOf": [
          {
            "type": "object",
            "description": "Preserve the existing description.",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "keep_existing"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Replace the description with the supplied value.",
            "required": [
              "value",
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "replace"
                ]
              },
              "value": {
                "type": "string",
                "description": "Replace the description with the supplied value."
              }
            }
          },
          {
            "type": "object",
            "description": "Clear the description entirely.",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "clear"
                ]
              }
            }
          }
        ],
        "description": "Update strategy for an account description."
      },
      "DiscoverKeychain": {
        "type": "string",
        "description": "Keychain branch selected by a sparse-wallet discovery request.",
        "enum": [
          "external",
          "internal"
        ]
      },
      "ElectrumArgs": {
        "type": "object",
        "description": "Configuration parameters for Electrum server connections.",
        "required": [
          "url"
        ],
        "properties": {
          "timeout_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Request timeout in seconds.\nDefaults to 10 seconds if not specified. Configured values must remain within\n[`MAX_ELECTRUM_EFFECTIVE_TIMEOUT_SECS`] because the upstream client stores this timeout\nin a `u8`.",
            "maximum": 255,
            "minimum": 1
          },
          "url": {
            "type": "string",
            "description": "Electrum server URL (e.g., `ssl://electrum.blockstream.info:50002`)."
          }
        }
      },
      "ElementsRpcArgs": {
        "type": "object",
        "description": "Configuration parameters for Elements Core RPC connections.",
        "required": [
          "url",
          "rpc_cookie"
        ],
        "properties": {
          "rpc_cookie": {
            "type": "string",
            "description": "Path to Elements Core's authentication cookie file."
          },
          "rpc_password": {
            "type": [
              "string",
              "null"
            ],
            "description": "RPC password (alternative to cookie)."
          },
          "rpc_user": {
            "type": [
              "string",
              "null"
            ],
            "description": "RPC username (alternative to cookie)."
          },
          "timeout_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional request timeout override in seconds.",
            "minimum": 1
          },
          "url": {
            "type": "string",
            "description": "Elements Core RPC endpoint URL (e.g., `<http://localhost:18884>`)."
          }
        }
      },
      "EngineError": {
        "oneOf": [
          {
            "type": "string",
            "description": "Engine has not been initialized yet.",
            "enum": [
              "NotInitialized"
            ]
          },
          {
            "type": "object",
            "description": "Caller failed authentication or provided invalid credentials.",
            "required": [
              "Unauthenticated"
            ],
            "properties": {
              "Unauthenticated": {
                "type": "string",
                "description": "Caller failed authentication or provided invalid credentials."
              }
            }
          },
          {
            "type": "string",
            "description": "Caller is not authorized to perform the requested operation on the target scope.",
            "enum": [
              "NotAuthorized"
            ]
          },
          {
            "type": "string",
            "description": "Workspace/profile context could not be resolved from inputs or defaults.",
            "enum": [
              "MissingProfileContext"
            ]
          },
          {
            "type": "string",
            "description": "Requested resource does not exist within the caller's permitted scopes.",
            "enum": [
              "NotFound"
            ]
          },
          {
            "type": "object",
            "description": "The profile has no processed journals snapshot from which reports can be computed.",
            "required": [
              "JournalSnapshotRequired"
            ],
            "properties": {
              "JournalSnapshotRequired": {
                "$ref": "#/components/schemas/ProfileScope",
                "description": "The profile has no processed journals snapshot from which reports can be computed."
              }
            }
          },
          {
            "type": "string",
            "description": "Request conflicts with existing state.",
            "enum": [
              "Conflict"
            ]
          },
          {
            "type": "object",
            "description": "Request conflicts with existing state with a user-facing reason.",
            "required": [
              "ConflictWithReason"
            ],
            "properties": {
              "ConflictWithReason": {
                "type": "string",
                "description": "Request conflicts with existing state with a user-facing reason."
              }
            }
          },
          {
            "type": "object",
            "description": "Request exceeded rate limits.",
            "required": [
              "RateLimited"
            ],
            "properties": {
              "RateLimited": {
                "type": "string",
                "description": "Request exceeded rate limits."
              }
            }
          },
          {
            "type": "object",
            "description": "Caller lacks an active paid license for this operation.",
            "required": [
              "PaymentRequired"
            ],
            "properties": {
              "PaymentRequired": {
                "type": "object",
                "description": "Caller lacks an active paid license for this operation.",
                "required": [
                  "state",
                  "plan_id"
                ],
                "properties": {
                  "plan_id": {
                    "type": "string",
                    "description": "Plan id required for the paid action."
                  },
                  "state": {
                    "$ref": "#/components/schemas/LicenseEntitlementState",
                    "description": "Current license state."
                  },
                  "valid_until_epoch": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Current or prior license expiry when known.",
                    "minimum": 0
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "Caller has an active license but exceeded a paid billing/capacity limit.",
            "required": [
              "BillingLimitExceeded"
            ],
            "properties": {
              "BillingLimitExceeded": {
                "$ref": "#/components/schemas/BillingLimitExceededDetails",
                "description": "Caller has an active license but exceeded a paid billing/capacity limit."
              }
            }
          },
          {
            "type": "object",
            "description": "Caller has a fresh token whose profile-capacity entitlement is no longer authoritative.",
            "required": [
              "ProfileCapacityRevisionStale"
            ],
            "properties": {
              "ProfileCapacityRevisionStale": {
                "$ref": "#/components/schemas/ProfileCapacityRevisionStaleDetails",
                "description": "Caller has a fresh token whose profile-capacity entitlement is no longer authoritative."
              }
            }
          },
          {
            "type": "object",
            "description": "Request failed a precondition check.",
            "required": [
              "PreconditionFailed"
            ],
            "properties": {
              "PreconditionFailed": {
                "type": "string",
                "description": "Request failed a precondition check."
              }
            }
          },
          {
            "type": "object",
            "description": "Connection configuration is invalid or incomplete.",
            "required": [
              "InvalidConnectionConfig"
            ],
            "properties": {
              "InvalidConnectionConfig": {
                "$ref": "#/components/schemas/ConnectionConfigErrorDetail",
                "description": "Connection configuration is invalid or incomplete."
              }
            }
          },
          {
            "type": "object",
            "description": "Onchain source configuration is invalid or incomplete.",
            "required": [
              "InvalidOnchainSource"
            ],
            "properties": {
              "InvalidOnchainSource": {
                "type": "string",
                "description": "Onchain source configuration is invalid or incomplete."
              }
            }
          },
          {
            "type": "object",
            "description": "Supplied data violates documented invariants or exceeds supported limits.",
            "required": [
              "InvalidInput"
            ],
            "properties": {
              "InvalidInput": {
                "type": "string",
                "description": "Supplied data violates documented invariants or exceeds supported limits."
              }
            }
          },
          {
            "type": "object",
            "description": "Supplied pagination cursor is malformed or incompatible with the target repository.",
            "required": [
              "InvalidCursor"
            ],
            "properties": {
              "InvalidCursor": {
                "type": "string",
                "description": "Supplied pagination cursor is malformed or incompatible with the target repository."
              }
            }
          },
          {
            "type": "object",
            "description": "Unexpected internal error surfaced from core services or storage.\nThe `reason` is intended to be user-facing and must avoid exposing secrets.",
            "required": [
              "Internal"
            ],
            "properties": {
              "Internal": {
                "type": "object",
                "description": "Unexpected internal error surfaced from core services or storage.\nThe `reason` is intended to be user-facing and must avoid exposing secrets.",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "User-facing reason (best-effort redacted)."
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "Error code not recognized by this build of the client/server.\nThis exists for forward compatibility: newer servers may return error codes that older\nclients do not understand.",
            "required": [
              "Unknown"
            ],
            "properties": {
              "Unknown": {
                "type": "object",
                "description": "Error code not recognized by this build of the client/server.\nThis exists for forward compatibility: newer servers may return error codes that older\nclients do not understand.",
                "required": [
                  "code",
                  "reason"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Stable string code as returned by the remote peer."
                  },
                  "reason": {
                    "type": "string",
                    "description": "User-facing reason (best-effort redacted)."
                  }
                }
              }
            }
          }
        ],
        "description": "Unified engine error surface shared by local and remote implementations.\nThis error is intentionally transport-stable: variants carry only data that\ncan be serialized and understood by remote clients."
      },
      "EntrySide": {
        "type": "string",
        "description": "Debit or credit marker.",
        "enum": [
          "debit",
          "credit"
        ]
      },
      "EsploraArgs": {
        "type": "object",
        "description": "Configuration parameters for Esplora (block explorer) HTTP API connections.",
        "required": [
          "url"
        ],
        "properties": {
          "timeout_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Request timeout in seconds.\nDefaults to 10 seconds if not specified.",
            "minimum": 1
          },
          "url": {
            "type": "string",
            "description": "Esplora base URL (e.g., `https://blockstream.info/api`)."
          }
        }
      },
      "FeedbackType": {
        "type": "string",
        "description": "Supported feedback categories for support emails.\n# Examples\n```rust\nuse clams_engine_protocol::feedback::FeedbackType;\nlet kind = FeedbackType::Bug;\nassert_eq!(format!(\"{kind:?}\"), \"Bug\");\n```",
        "enum": [
          "bug",
          "feature",
          "general"
        ]
      },
      "FiatCurrency": {
        "type": "string",
        "description": "Closed set of fiat currency codes accepted by downstream settings and reporting flows.",
        "enum": [
          "USD",
          "EUR",
          "JPY",
          "GBP",
          "CNY",
          "AUD",
          "CAD",
          "CHF",
          "HKD",
          "NZD",
          "SEK",
          "KRW",
          "SGD",
          "MXN",
          "INR",
          "BRL",
          "NOK",
          "ZAR",
          "DKK"
        ]
      },
      "Forward": {
        "type": "object",
        "description": "Canonical routing forward event capturing fees earned for a hop.",
        "required": [
          "id",
          "connection_id",
          "amount",
          "timestamp"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Routing fee earned (msats encoding)."
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection identifier (UUID v7, lowercase hyphenated)."
          },
          "id": {
            "type": "string",
            "description": "Opaque external identifier from the source system."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the forwarding event occurred (seconds since Unix epoch)."
          }
        }
      },
      "GainsAlgorithm": {
        "type": "string",
        "description": "Enumerates the supported gains accounting algorithms persisted with each settings record.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted settings values.",
        "enum": [
          "FIFO",
          "LIFO",
          "HIFO",
          "LOFO",
          "AVG_COST"
        ]
      },
      "HealthBody": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "ImportJsonBody": {
        "type": "object",
        "description": "Payload for importing connection data from JSON archives.",
        "required": [
          "archive_type",
          "network",
          "data"
        ],
        "properties": {
          "archive_type": {
            "$ref": "#/components/schemas/ArchiveType"
          },
          "data": {},
          "network": {
            "type": "string"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "description": "Canonical invoice payload representing inbound settlements.",
        "required": [
          "id",
          "connection_id",
          "timestamp",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Base invoice amount requested from the payer (msats encoding)."
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection identifier (UUID v7, lowercase hyphenated)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description or memo provided with the invoice."
          },
          "id": {
            "type": "string",
            "description": "Payment hash or external identifier from the source system."
          },
          "settled_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actual amount settled across all HTLCs when it differs from the base amount (msats encoding)."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Settlement timestamp expressed in whole seconds."
          },
          "zap": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Indicates whether this invoice represents a Nostr zap."
          }
        }
      },
      "JournalEventBalanceChanges": {
        "type": "object",
        "description": "Summary of BTC balance changes for a journal event.",
        "required": [
          "btc_delta_sats"
        ],
        "properties": {
          "btc_delta_sats": {
            "type": "string",
            "description": "BTC delta in sats using the msat scale (three decimal places)."
          }
        }
      },
      "JournalEventCanonicalRecord": {
        "oneOf": [
          {
            "type": "object",
            "description": "Canonical invoice record.",
            "required": [
              "Invoice"
            ],
            "properties": {
              "Invoice": {
                "$ref": "#/components/schemas/CanonicalRecord_Invoice",
                "description": "Canonical invoice record."
              }
            }
          },
          {
            "type": "object",
            "description": "Canonical payment record.",
            "required": [
              "Pay"
            ],
            "properties": {
              "Pay": {
                "$ref": "#/components/schemas/CanonicalRecord_Pay",
                "description": "Canonical payment record."
              }
            }
          },
          {
            "type": "object",
            "description": "Canonical deposit record.",
            "required": [
              "Deposit"
            ],
            "properties": {
              "Deposit": {
                "$ref": "#/components/schemas/CanonicalRecord_Deposit",
                "description": "Canonical deposit record."
              }
            }
          },
          {
            "type": "object",
            "description": "Canonical withdrawal record.",
            "required": [
              "Withdrawal"
            ],
            "properties": {
              "Withdrawal": {
                "$ref": "#/components/schemas/CanonicalRecord_Withdrawal",
                "description": "Canonical withdrawal record."
              }
            }
          },
          {
            "type": "object",
            "description": "Canonical trade record.",
            "required": [
              "Trade"
            ],
            "properties": {
              "Trade": {
                "$ref": "#/components/schemas/CanonicalRecord_Trade",
                "description": "Canonical trade record."
              }
            }
          },
          {
            "type": "object",
            "description": "Canonical transaction record.",
            "required": [
              "Transaction"
            ],
            "properties": {
              "Transaction": {
                "$ref": "#/components/schemas/CanonicalRecord_Transaction",
                "description": "Canonical transaction record."
              }
            }
          },
          {
            "type": "object",
            "description": "Canonical forward record.",
            "required": [
              "Forward"
            ],
            "properties": {
              "Forward": {
                "$ref": "#/components/schemas/CanonicalRecord_Forward",
                "description": "Canonical forward record."
              }
            }
          },
          {
            "type": "object",
            "description": "Canonical peg bridge record.",
            "required": [
              "PegBridge"
            ],
            "properties": {
              "PegBridge": {
                "$ref": "#/components/schemas/CanonicalRecord_PegBridge",
                "description": "Canonical peg bridge record."
              }
            }
          }
        ],
        "description": "Canonical record variants associated with journal events."
      },
      "JournalEventConnectionCount": {
        "type": "object",
        "description": "Count summary for one connection across grouped journal events.",
        "required": [
          "connection_id",
          "connection_label",
          "total",
          "by_event_kind"
        ],
        "properties": {
          "by_event_kind": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEventKindCount"
            },
            "description": "Per-kind grouped-event counts for this connection."
          },
          "connection_deleted": {
            "type": "boolean",
            "description": "Whether the connection record was missing when the label was resolved.\nThis distinguishes a deleted connection from a live connection whose label happens to be\nthe same as the engine's fallback label."
          },
          "connection_id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Connection identifier associated with the grouped events."
          },
          "connection_label": {
            "type": "string",
            "description": "Human-readable connection label resolved by the engine."
          },
          "total": {
            "type": "integer",
            "description": "Number of grouped events counted for this connection.\nThis total counts a shared event once for every associated connection, so summing\nconnection totals may exceed [`JournalEventCountSummary::unique_total`].",
            "minimum": 0
          }
        }
      },
      "JournalEventCountSummary": {
        "type": "object",
        "description": "Count summary for the latest journals snapshot.",
        "required": [
          "unique_total",
          "by_event_kind",
          "by_connection"
        ],
        "properties": {
          "by_connection": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEventConnectionCount"
            },
            "description": "Per-connection grouped-event counts.\nShared events are counted once per associated connection in this list, so summed\nconnection totals may exceed `unique_total`."
          },
          "by_event_kind": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEventKindCount"
            },
            "description": "Global grouped-event counts by canonical event kind."
          },
          "snapshot_timestamp": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp derived from the snapshot filename used for the summary.\nThis is `None` when the profile has not produced a journals snapshot yet."
          },
          "unique_total": {
            "type": "integer",
            "description": "Count of distinct grouped journal events in the latest snapshot.\nShared events associated with multiple connections are counted once here.",
            "minimum": 0
          }
        }
      },
      "JournalEventDetails": {
        "type": "object",
        "description": "Full journal event detail payload returned by engine APIs.",
        "required": [
          "timestamp",
          "connection_id",
          "connection_label",
          "connections",
          "event_id",
          "event_kind",
          "canonical_record",
          "excluded",
          "tags",
          "entries"
        ],
        "properties": {
          "balance_changes": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JournalEventBalanceChanges",
                "description": "BTC balance changes derived from the journal entries."
              }
            ]
          },
          "canonical_record": {
            "$ref": "#/components/schemas/JournalEventCanonicalRecord",
            "description": "Canonical record associated with the event."
          },
          "connection_id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Connection identifier responsible for the event."
          },
          "connection_label": {
            "type": "string",
            "description": "Human-readable connection label."
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEventListConnection"
            },
            "description": "All connections associated with the event group."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Canonical description derived from the record payload when available."
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEventEntry"
            },
            "description": "Journal postings with resolved labels and adjusted account ids."
          },
          "event_id": {
            "type": "string",
            "description": "Event identifier from the journals snapshot."
          },
          "event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Canonical event kind inferred from the snapshot rows."
          },
          "excluded": {
            "type": "boolean",
            "description": "Whether the event is excluded from reporting."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional metadata note."
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            },
            "description": "Tags resolved for the metadata record."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Canonical timestamp for the event (UTC)."
          },
          "valuation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JournalEventValuation",
                "description": "Fiat valuation summary when exchange rates are available."
              }
            ]
          }
        }
      },
      "JournalEventEntry": {
        "type": "object",
        "description": "Journal entry enriched with resolved labels and adjusted account identifiers.",
        "required": [
          "entry_signature",
          "account_id",
          "account_label",
          "account_kind",
          "asset_id",
          "asset_code",
          "side",
          "amount_sats",
          "is_fee"
        ],
        "properties": {
          "account_id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Account identifier after applying metadata adjustments."
          },
          "account_kind": {
            "$ref": "#/components/schemas/AccountKind",
            "description": "Account kind associated with the posting."
          },
          "account_label": {
            "type": "string",
            "description": "Human-readable account label."
          },
          "amount_sats": {
            "type": "string",
            "description": "Absolute amount in sats using the msat scale (three decimal places)."
          },
          "asset_code": {
            "$ref": "#/components/schemas/AssetCode",
            "description": "Human-readable asset code."
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Asset identifier for the posting."
          },
          "entry_signature": {
            "type": "string",
            "description": "Stable per-posting identifier from the journals snapshot."
          },
          "is_fee": {
            "type": "boolean",
            "description": "Whether the posting represents a fee."
          },
          "side": {
            "$ref": "#/components/schemas/EntrySide",
            "description": "Posting side (debit/credit)."
          }
        }
      },
      "JournalEventKind": {
        "type": "string",
        "description": "Supported canonical fund-movement event kinds.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted journals state.",
        "enum": [
          "deposit",
          "forward",
          "invoice",
          "pay",
          "trade",
          "transaction",
          "withdrawal",
          "peg_bridge"
        ]
      },
      "JournalEventKindCount": {
        "type": "object",
        "description": "Count of grouped journal events for a single canonical event kind.",
        "required": [
          "event_kind",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of grouped events counted for `event_kind`.",
            "minimum": 0
          },
          "event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Canonical event kind."
          }
        }
      },
      "JournalEventListAccount": {
        "type": "object",
        "description": "Account summary for journal event list rendering.",
        "required": [
          "account_id",
          "account_label"
        ],
        "properties": {
          "account_id": {
            "$ref": "#/components/schemas/AccountId",
            "description": "Account identifier included in the event list row."
          },
          "account_label": {
            "type": "string",
            "description": "Human-readable account label."
          }
        }
      },
      "JournalEventListConnection": {
        "type": "object",
        "description": "Connection summary for journal event list rendering.",
        "required": [
          "connection_id",
          "connection_label"
        ],
        "properties": {
          "connection_id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Connection identifier associated with the event."
          },
          "connection_label": {
            "type": "string",
            "description": "Human-readable connection label."
          }
        }
      },
      "JournalEventListItem": {
        "type": "object",
        "description": "Journal event summary row for list endpoints.",
        "required": [
          "timestamp",
          "connections",
          "event_id",
          "event_kind",
          "excluded",
          "tags",
          "accounts"
        ],
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEventListAccount"
            },
            "description": "Accounts referenced by the event after applying metadata adjustments."
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEventListConnection"
            },
            "description": "Connections associated with the event group."
          },
          "event_id": {
            "type": "string",
            "description": "Event identifier from the journals snapshot."
          },
          "event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Canonical event kind inferred from the snapshot rows."
          },
          "excluded": {
            "type": "boolean",
            "description": "Whether the event is excluded from reporting."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional metadata note."
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            },
            "description": "Tags resolved for the metadata record."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Canonical timestamp for the event (UTC)."
          }
        }
      },
      "JournalEventValuation": {
        "type": "object",
        "description": "Fiat valuation summary derived from BTC delta and exchange rates.",
        "required": [
          "fiat_currency",
          "exchange_rate_at_event",
          "exchange_rate_now",
          "cost_basis_fiat",
          "current_market_value_fiat"
        ],
        "properties": {
          "cost_basis_fiat": {
            "type": "string",
            "description": "Fiat value at the event exchange rate."
          },
          "current_market_value_fiat": {
            "type": "string",
            "description": "Fiat value at the current exchange rate."
          },
          "exchange_rate_at_event": {
            "type": "string",
            "description": "Exchange rate at the event timestamp (fiat per BTC)."
          },
          "exchange_rate_now": {
            "type": "string",
            "description": "Exchange rate at the current timestamp (fiat per BTC)."
          },
          "fiat_currency": {
            "$ref": "#/components/schemas/FiatCurrency",
            "description": "Fiat currency used for valuation."
          },
          "percent_change": {
            "type": [
              "string",
              "null"
            ],
            "description": "Percent change expressed as `(current - cost_basis) / cost_basis`."
          }
        }
      },
      "JournalQuarantineEvent": {
        "type": "object",
        "description": "Quarantined canonical event derived from the latest journals run.",
        "required": [
          "event_id",
          "event_kind",
          "timestamp",
          "reasons",
          "reason_guidance",
          "resolution_status"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Canonical fund-movement event identifier."
          },
          "event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Canonical event kind (invoice, pay, transaction, etc.)."
          },
          "reason_guidance": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalQuarantineGuidance"
            },
            "description": "Remediation guidance aligned with `reasons` order."
          },
          "reasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuarantineReason"
            },
            "description": "Stable, de-duplicated quarantine reasons for the event."
          },
          "resolution_status": {
            "$ref": "#/components/schemas/JournalQuarantineResolutionStatus",
            "description": "Status of any persisted resolution attached to this event."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Canonical timestamp for the event (UTC)."
          }
        }
      },
      "JournalQuarantineFlowClass": {
        "type": "string",
        "description": "Guidance flow classification for quarantine remediation.",
        "enum": [
          "manual_reconcile",
          "data_refresh",
          "data_correctness",
          "engine_triage"
        ]
      },
      "JournalQuarantineGuidance": {
        "type": "object",
        "description": "Suggested remediation guidance for a quarantine reason.",
        "required": [
          "flow",
          "suggested_command"
        ],
        "properties": {
          "flow": {
            "$ref": "#/components/schemas/JournalQuarantineFlowClass",
            "description": "Flow class used by CLI/API guidance output."
          },
          "suggested_command": {
            "type": "string",
            "description": "Suggested next command to remediate."
          }
        }
      },
      "JournalQuarantinePage": {
        "type": "object",
        "description": "Page of quarantined journal events for a specific journals run.",
        "required": [
          "run_timestamp",
          "snapshot_path",
          "items"
        ],
        "properties": {
          "items": {
            "$ref": "#/components/schemas/Page_JournalQuarantineEvent",
            "description": "Quarantined events page."
          },
          "run_timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the journals run that produced this quarantine set."
          },
          "snapshot_path": {
            "type": "string",
            "description": "Snapshot path emitted by the run."
          }
        }
      },
      "JournalQuarantineResolutionPage": {
        "type": "object",
        "description": "Page of persisted quarantine resolutions.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "$ref": "#/components/schemas/Page_JournalQuarantineResolutionRecord",
            "description": "Resolution records page."
          }
        }
      },
      "JournalQuarantineResolutionRecord": {
        "type": "object",
        "description": "Persistent operator reconciliation record keyed by `(event_kind, event_id)`.",
        "required": [
          "event_kind",
          "event_id",
          "fingerprint",
          "strategy",
          "created_at_millis",
          "updated_at_millis"
        ],
        "properties": {
          "created_at_millis": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp in Unix milliseconds."
          },
          "event_id": {
            "type": "string",
            "description": "Canonical event identifier."
          },
          "event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Canonical event kind."
          },
          "fingerprint": {
            "type": "string",
            "description": "Deterministic fingerprint used to detect stale resolutions."
          },
          "last_applied_run_timestamp_millis": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Journals run timestamp where this resolution was last auto-applied."
          },
          "strategy": {
            "$ref": "#/components/schemas/JournalQuarantineResolutionStrategy",
            "description": "Operator-selected reconciliation strategy."
          },
          "updated_at_millis": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp in Unix milliseconds."
          }
        }
      },
      "JournalQuarantineResolutionStatus": {
        "type": "string",
        "description": "Resolution activity state for a quarantined event.",
        "enum": [
          "none",
          "active",
          "stale",
          "applied_last_run"
        ]
      },
      "JournalQuarantineResolutionStrategy": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "fee_sats",
              "mode",
              "type"
            ],
            "properties": {
              "fee_sats": {
                "type": "string",
                "description": "Fee paid by the wallet owner, in sats with fixed scale `3`."
              },
              "mode": {
                "$ref": "#/components/schemas/CollaborativeMode",
                "description": "Collaborative reconciliation mode."
              },
              "type": {
                "type": "string",
                "enum": [
                  "collaborative"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "mode",
              "type"
            ],
            "properties": {
              "mode": {
                "$ref": "#/components/schemas/MissingAddressMode",
                "description": "Missing-address reconciliation mode."
              },
              "type": {
                "type": "string",
                "enum": [
                  "missing_address"
                ]
              }
            }
          }
        ],
        "description": "Persisted strategy describing how a quarantined event should be reconciled."
      },
      "JournalRunOutcome": {
        "type": "object",
        "description": "Summary outcome for a journals run.",
        "required": [
          "snapshot_path",
          "quarantined_events",
          "quarantined_events_unresolved",
          "quarantined_events_resolved",
          "quarantined_event_details",
          "non_final"
        ],
        "properties": {
          "non_final": {
            "type": "boolean",
            "description": "True when at least one quarantine occurred."
          },
          "quarantined_event_details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuarantinedEvent"
            },
            "description": "Full detail for each quarantined canonical event for diagnostics."
          },
          "quarantined_events": {
            "type": "integer",
            "description": "Number of canonical events that were quarantined.",
            "minimum": 0
          },
          "quarantined_events_resolved": {
            "type": "integer",
            "description": "Number of quarantined events that were resolved and posted in the run.",
            "minimum": 0
          },
          "quarantined_events_unresolved": {
            "type": "integer",
            "description": "Number of quarantines that remain unresolved for the run.",
            "minimum": 0
          },
          "snapshot_path": {
            "type": "string",
            "description": "Full path to the snapshot written for this run."
          }
        }
      },
      "LabelUpdate": {
        "oneOf": [
          {
            "type": "object",
            "description": "Preserve the existing label.",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "keep_existing"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Replace the label with the supplied value.",
            "required": [
              "value",
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "replace"
                ]
              },
              "value": {
                "type": "string",
                "description": "Replace the label with the supplied value."
              }
            }
          }
        ],
        "description": "Update strategy for an account label."
      },
      "LicenseEntitlementState": {
        "type": "string",
        "description": "License state carried by access-token entitlement claims.",
        "enum": [
          "active",
          "license_required",
          "payment_pending",
          "license_expired"
        ]
      },
      "LnTransactionType": {
        "type": "string",
        "description": "Lightning-aware transaction classification used for journal semantics.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted canonical transaction records.",
        "enum": [
          "funding_tx",
          "commitment_tx_local",
          "commitment_tx_remote",
          "closing_tx_mutual",
          "closing_tx_legacy",
          "htlc_timeout_tx",
          "htlc_success_tx",
          "penalty_tx",
          "anchor_spend_tx",
          "sweep_tx"
        ]
      },
      "LogAttachment": {
        "type": "object",
        "description": "Optional gzipped log attachment metadata for bug reports.\n# Examples\n```rust\nuse clams_engine_protocol::feedback::LogAttachment;\nlet attachment = LogAttachment {\nfilename: \"cli.log.gz\".to_owned(),\ncontent_type: \"application/gzip\".to_owned(),\ncontent_base64: \"H4sIAAAAAAAA...\".to_owned(),\ntruncated: true,\noriginal_bytes: 120_000,\nincluded_bytes: 32_000,\n};\nassert!(attachment.truncated);\n```",
        "required": [
          "filename",
          "content_type",
          "content_base64",
          "truncated",
          "original_bytes",
          "included_bytes"
        ],
        "properties": {
          "content_base64": {
            "type": "string",
            "description": "Base64-encoded gzipped log bytes."
          },
          "content_type": {
            "type": "string",
            "description": "MIME content type of the attachment (for example: `application/gzip`)."
          },
          "filename": {
            "type": "string",
            "description": "Filename presented to the email recipient (for example: `cli.log.gz`)."
          },
          "included_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Number of bytes included from the original log file before gzip.",
            "minimum": 0
          },
          "original_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Size of the original log file in bytes.",
            "minimum": 0
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether older log content was truncated before attachment."
          }
        }
      },
      "ManualPegBridgeCreateRequest": {
        "type": "object",
        "description": "Request payload for manually creating or replacing a canonical peg bridge.",
        "required": [
          "bitcoin_connection_id",
          "liquid_connection_id",
          "direction",
          "bitcoin_txid",
          "bitcoin_vout",
          "liquid_txid",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Bridge principal amount using fixed scale `3`."
          },
          "asset_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetId",
                "description": "Optional BTC economic asset id. When omitted, the engine resolves system BTC."
              }
            ]
          },
          "bitcoin_connection_id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Bitcoin L1 connection participating in the bridge."
          },
          "bitcoin_fee": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Bitcoin-side fee in the BTC asset using fixed scale `3`."
          },
          "bitcoin_txid": {
            "type": "string",
            "description": "Bitcoin transaction id for the matched L1 outpoint."
          },
          "bitcoin_vout": {
            "type": "integer",
            "format": "int32",
            "description": "Bitcoin output index for the matched L1 outpoint.",
            "minimum": 0
          },
          "canonical_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional stable bridge id. When omitted, the engine derives one from the linked txids.\nCustom ids must be URL path-safe because record lookup and deletion address them as a\nsingle route segment."
          },
          "confidence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional operator note or confidence label."
          },
          "direction": {
            "$ref": "#/components/schemas/PegBridgeDirection",
            "description": "Peg direction."
          },
          "liquid_asset_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetId",
                "description": "Optional Liquid-side L-BTC asset id. When omitted, the engine resolves it from Liquid evidence."
              }
            ]
          },
          "liquid_connection_id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Liquid connection participating in the bridge and owning the canonical envelope."
          },
          "liquid_fee": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Liquid-side fee in the L-BTC asset using fixed scale `3`."
          },
          "liquid_txid": {
            "type": "string",
            "description": "Liquid transaction id carrying peg evidence."
          },
          "timestamp": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional bridge timestamp. When omitted, the Liquid transaction timestamp is used."
          }
        }
      },
      "ManualTransferLinkPage": {
        "type": "object",
        "description": "Page of persisted manual transfer links.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "$ref": "#/components/schemas/Page_ManualTransferLinkRecord",
            "description": "Manual transfer link records page."
          }
        }
      },
      "ManualTransferLinkRecord": {
        "type": "object",
        "description": "Persisted manual transfer link returned by engine APIs.",
        "required": [
          "link_id",
          "source_event_kind",
          "source_event_id",
          "destination_event_kind",
          "destination_event_id",
          "source_connection_id",
          "destination_connection_id",
          "asset_id",
          "amount_sats",
          "created_at_millis",
          "updated_at_millis"
        ],
        "properties": {
          "amount_sats": {
            "type": "string",
            "description": "Principal amount in sats with fixed millisatoshi scale."
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Linked asset identifier. Manual transfer links currently require BTC."
          },
          "created_at_millis": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp in Unix milliseconds."
          },
          "destination_connection_id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Destination event connection identifier."
          },
          "destination_event_id": {
            "type": "string",
            "description": "Destination canonical event identifier."
          },
          "destination_event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Destination canonical event kind."
          },
          "link_id": {
            "type": "string",
            "description": "Deterministic link identifier derived from both endpoints."
          },
          "source_connection_id": {
            "$ref": "#/components/schemas/ConnectionId",
            "description": "Source event connection identifier."
          },
          "source_event_id": {
            "type": "string",
            "description": "Source canonical event identifier."
          },
          "source_event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Source canonical event kind."
          },
          "transaction_outpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Selected transaction output, present when a transaction-side endpoint needs disambiguation."
          },
          "updated_at_millis": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp in Unix milliseconds."
          }
        }
      },
      "MetadataBtcFiatOverride": {
        "type": "object",
        "description": "Manual BTC-fiat override attached to metadata.",
        "required": [
          "rate",
          "pair"
        ],
        "properties": {
          "pair": {
            "type": "string",
            "description": "BTC-fiat pair identifying denomination (for example `BTC-USD`)."
          },
          "rate": {
            "type": "string",
            "description": "BTC-fiat rate quoted as fiat per 1 BTC."
          }
        }
      },
      "MetadataCreate": {
        "type": "object",
        "description": "Payload used to create a metadata record.",
        "required": [
          "event_id",
          "excluded",
          "tag_ids",
          "account_adjustments"
        ],
        "properties": {
          "account_adjustments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountAdjustment"
            },
            "description": "Attached account adjustments."
          },
          "btc_fiat_rate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional manual BTC-fiat override (fiat per 1 BTC)."
          },
          "event_id": {
            "type": "string",
            "description": "Canonical event identifier."
          },
          "excluded": {
            "type": "boolean",
            "description": "Whether the event is excluded from reporting."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional human-authored note."
          },
          "tag_ids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagId"
            },
            "description": "Attached tag identifiers."
          }
        }
      },
      "MetadataPage_MetadataRecord": {
        "type": "object",
        "description": "Generic page response for metadata list operations.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Metadata record associated with a canonical event.",
              "required": [
                "event_id",
                "excluded",
                "tag_ids",
                "account_adjustments"
              ],
              "properties": {
                "account_adjustments": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountAdjustment"
                  },
                  "description": "Attached account adjustments."
                },
                "btc_fiat_override": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/MetadataBtcFiatOverride",
                      "description": "Optional manual BTC-fiat override."
                    }
                  ]
                },
                "event_id": {
                  "type": "string",
                  "description": "Canonical event identifier."
                },
                "excluded": {
                  "type": "boolean",
                  "description": "Whether the event is excluded from reporting."
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional human-authored note."
                },
                "tag_ids": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TagId"
                  },
                  "description": "Attached tag identifiers."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "MetadataRecord": {
        "type": "object",
        "description": "Metadata record associated with a canonical event.",
        "required": [
          "event_id",
          "excluded",
          "tag_ids",
          "account_adjustments"
        ],
        "properties": {
          "account_adjustments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountAdjustment"
            },
            "description": "Attached account adjustments."
          },
          "btc_fiat_override": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MetadataBtcFiatOverride",
                "description": "Optional manual BTC-fiat override."
              }
            ]
          },
          "event_id": {
            "type": "string",
            "description": "Canonical event identifier."
          },
          "excluded": {
            "type": "boolean",
            "description": "Whether the event is excluded from reporting."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional human-authored note."
          },
          "tag_ids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagId"
            },
            "description": "Attached tag identifiers."
          }
        }
      },
      "MetadataUpdate": {
        "type": "object",
        "description": "Payload used to update a metadata record.",
        "required": [
          "event_id",
          "excluded",
          "tag_ids",
          "account_adjustments"
        ],
        "properties": {
          "account_adjustments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountAdjustment"
            },
            "description": "Attached account adjustments."
          },
          "btc_fiat_rate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional manual BTC-fiat override (fiat per 1 BTC)."
          },
          "event_id": {
            "type": "string",
            "description": "Canonical event identifier."
          },
          "excluded": {
            "type": "boolean",
            "description": "Whether the event is excluded from reporting."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional human-authored note."
          },
          "tag_ids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagId"
            },
            "description": "Attached tag identifiers."
          }
        }
      },
      "MissingAddressMode": {
        "type": "string",
        "description": "Operator-selected mode for missing-address wallet reconciliation.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted journals state.",
        "enum": [
          "balance_only"
        ]
      },
      "NormalizedConfigurationBody": {
        "type": "object",
        "description": "Response body for normalized connection configurations.",
        "required": [
          "normalized_configuration"
        ],
        "properties": {
          "normalized_configuration": {}
        }
      },
      "NotificationEvent": {
        "type": "object",
        "description": "Notification emitted for a long-running operation.",
        "required": [
          "operation_id",
          "phase",
          "level",
          "message"
        ],
        "properties": {
          "connection_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConnectionId",
                "description": "Connection context when applicable."
              }
            ]
          },
          "level": {
            "$ref": "#/components/schemas/NotificationLevel",
            "description": "Severity level for the event."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message for display."
          },
          "operation_id": {
            "$ref": "#/components/schemas/OperationId",
            "description": "Correlates the notification to an operation."
          },
          "phase": {
            "$ref": "#/components/schemas/NotificationPhase",
            "description": "Lifecycle phase for the event."
          },
          "profile_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProfileId",
                "description": "Profile scope when available."
              }
            ]
          },
          "progress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NotificationProgress",
                "description": "Progress payload when available."
              }
            ]
          },
          "workspace_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WorkspaceId",
                "description": "Workspace scope when available."
              }
            ]
          }
        }
      },
      "NotificationLevel": {
        "type": "string",
        "description": "Severity for a notification event, aligned with tracing levels.",
        "enum": [
          "Trace",
          "Debug",
          "Info",
          "Warn",
          "Error"
        ]
      },
      "NotificationPhase": {
        "type": "string",
        "description": "High-level lifecycle phase for an operation notification.",
        "enum": [
          "Started",
          "Progress",
          "Completed",
          "Failed"
        ]
      },
      "NotificationProgress": {
        "type": "object",
        "description": "Optional progress payload attached to a notification event.",
        "required": [
          "source",
          "scope"
        ],
        "properties": {
          "current": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Completed work units so far (0-based allowed).",
            "minimum": 0
          },
          "phase": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProgressPhase",
                "description": "Current phase of work (for adapter progress)."
              }
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/ProgressScope",
            "description": "Scope of the progress event."
          },
          "source": {
            "$ref": "#/components/schemas/ProgressSource",
            "description": "Origin of the progress event."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Total work units if known.",
            "minimum": 0
          },
          "unit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProgressUnit",
                "description": "Unit for current/total semantics."
              }
            ]
          }
        }
      },
      "OnchainAssetReference": {
        "oneOf": [
          {
            "type": "string",
            "description": "Bitcoin L1 native BTC.",
            "enum": [
              "Bitcoin"
            ]
          },
          {
            "type": "object",
            "description": "Liquid asset identified by network and Elements asset id.",
            "required": [
              "Liquid"
            ],
            "properties": {
              "Liquid": {
                "type": "object",
                "description": "Liquid asset identified by network and Elements asset id.",
                "required": [
                  "network",
                  "asset_id"
                ],
                "properties": {
                  "asset_id": {
                    "type": "string",
                    "description": "Elements asset id as exposed by Liquid/LWK."
                  },
                  "network": {
                    "type": "string",
                    "description": "Liquid network name, such as `liquid` or `testnet`."
                  }
                }
              }
            }
          }
        ],
        "description": "Source-chain asset reference attached to a canonical on-chain row.\nThis preserves the original chain asset identity used to produce a row even when the\naccounting asset id should retain source-chain provenance. For example, Liquid policy-asset\nL-BTC can use its own accounting asset while retaining the Liquid asset id for audit."
      },
      "OnchainDataSourceType": {
        "oneOf": [
          {
            "type": "object",
            "description": "Direct connection to Bitcoin Core RPC.",
            "required": [
              "BitcoinRpc"
            ],
            "properties": {
              "BitcoinRpc": {
                "$ref": "#/components/schemas/BitcoinRpcArgs",
                "description": "Direct connection to Bitcoin Core RPC."
              }
            }
          },
          {
            "type": "object",
            "description": "Electrum server protocol.",
            "required": [
              "Electrum"
            ],
            "properties": {
              "Electrum": {
                "$ref": "#/components/schemas/ElectrumArgs",
                "description": "Electrum server protocol."
              }
            }
          },
          {
            "type": "object",
            "description": "Esplora (block explorer) HTTP API.",
            "required": [
              "Esplora"
            ],
            "properties": {
              "Esplora": {
                "$ref": "#/components/schemas/EsploraArgs",
                "description": "Esplora (block explorer) HTTP API."
              }
            }
          },
          {
            "type": "object",
            "description": "Liquid-aware Esplora HTTP API.",
            "required": [
              "LiquidEsplora"
            ],
            "properties": {
              "LiquidEsplora": {
                "$ref": "#/components/schemas/EsploraArgs",
                "description": "Liquid-aware Esplora HTTP API."
              }
            }
          },
          {
            "type": "object",
            "description": "Liquid-aware Electrum server protocol.",
            "required": [
              "LiquidElectrum"
            ],
            "properties": {
              "LiquidElectrum": {
                "$ref": "#/components/schemas/ElectrumArgs",
                "description": "Liquid-aware Electrum server protocol."
              }
            }
          },
          {
            "type": "object",
            "description": "Elements Core RPC endpoint.",
            "required": [
              "ElementsRpc"
            ],
            "properties": {
              "ElementsRpc": {
                "$ref": "#/components/schemas/ElementsRpcArgs",
                "description": "Elements Core RPC endpoint."
              }
            }
          }
        ],
        "description": "Data source variants for on-chain synchronization.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted on-chain source records."
      },
      "OnchainInput": {
        "type": "object",
        "description": "Canonical on-chain transaction input referencing a previous output.",
        "required": [
          "outpoint"
        ],
        "properties": {
          "outpoint": {
            "type": "string",
            "description": "Previous output being spent, formatted as `<txid>:<vout>`."
          },
          "script_sig": {
            "type": [
              "string",
              "null"
            ],
            "description": "`ScriptSig` bytes as lowercase hex when fetched from the configured on-chain source."
          },
          "witness": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Witness stack items as lowercase hex when fetched from the configured on-chain source.\n`None` means witness data was not fetched. `Some(vec![])` means the witness was fetched and\nwas empty."
          }
        }
      },
      "OnchainOutput": {
        "type": "object",
        "description": "Canonical on-chain transaction output capturing destination and amount.",
        "required": [
          "outpoint",
          "amount",
          "address"
        ],
        "properties": {
          "address": {
            "type": "string",
            "description": "Destination address or script (any network/format)."
          },
          "amount": {
            "type": "string",
            "description": "Amount in the output asset's native accounting units."
          },
          "asset_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetId",
                "description": "Accounting asset identifier for this output.\n\n`None` represents legacy BTC-only rows persisted before asset-aware canonical records."
              }
            ]
          },
          "linked_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Channel identifier this output belongs to when known."
          },
          "outpoint": {
            "type": "string",
            "description": "Unique output identifier in `<txid>:<vout>` format."
          },
          "script_pubkey": {
            "type": [
              "string",
              "null"
            ],
            "description": "`ScriptPubKey` bytes as lowercase hex when fetched from the configured on-chain source."
          },
          "script_role": {
            "$ref": "#/components/schemas/OnchainScriptRole",
            "description": "Classification of the output script per `LIGHTNING_SPEC.md` §2.6–2.7."
          },
          "source_asset": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OnchainAssetReference",
                "description": "Source-chain asset reference used to derive this output.\n\n`None` represents legacy BTC-only rows persisted before source asset tracking."
              }
            ]
          }
        }
      },
      "OnchainScriptRole": {
        "type": "string",
        "description": "Script classification for Lightning-aware on-chain outputs.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted canonical transaction records.",
        "enum": [
          "funding_output",
          "to_local",
          "to_remote",
          "to_local_anchor",
          "to_remote_anchor",
          "offered_htlc",
          "received_htlc",
          "htlc_timeout",
          "htlc_success",
          "closing_output",
          "wallet",
          "unknown",
          "shared_anchor"
        ]
      },
      "OnchainUpdateInput": {
        "type": "object",
        "description": "Onchain update inputs supplied by a caller.",
        "properties": {
          "clear_rpc_cookie": {
            "type": "boolean"
          },
          "clear_rpc_credentials": {
            "type": "boolean"
          },
          "clear_timeout": {
            "type": "boolean"
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "rpc_cookie": {
            "type": [
              "string",
              "null"
            ]
          },
          "rpc_password": {
            "type": [
              "string",
              "null"
            ]
          },
          "rpc_user": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeout_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 1
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OpenApiLegalDocumentSnapshot": {
        "type": "object",
        "required": [
          "document_id",
          "last_updated",
          "current_url",
          "archive_url",
          "canonical_body_url",
          "sha256"
        ],
        "properties": {
          "archive_url": {
            "type": "string"
          },
          "canonical_body_url": {
            "type": "string"
          },
          "current_url": {
            "type": "string"
          },
          "document_id": {
            "type": "string"
          },
          "effective_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_updated": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          }
        }
      },
      "OpenApiReportDisclaimerMetadata": {
        "type": "object",
        "required": [
          "manifest_revision",
          "notice_id",
          "text",
          "document"
        ],
        "properties": {
          "document": {
            "$ref": "#/components/schemas/OpenApiLegalDocumentSnapshot"
          },
          "manifest_revision": {
            "type": "integer",
            "format": "int64",
            "example": 12,
            "minimum": 1
          },
          "notice_id": {
            "type": "string",
            "example": "report_disclaimer_example"
          },
          "text": {
            "type": "string"
          }
        }
      },
      "OperationId": {
        "type": "string",
        "format": "uuid",
        "description": "Opaque identifier for a long-running engine operation."
      },
      "OperationKind": {
        "type": "string",
        "description": "Enumerates supported long-running operations.",
        "enum": [
          "SyncConnection",
          "DiscoverConnection",
          "SyncAllConnections",
          "ProcessJournals"
        ]
      },
      "OperationRecord": {
        "type": "object",
        "description": "Operation record persisted in-memory for inspection by callers.",
        "required": [
          "id",
          "workspace_id",
          "profile_id",
          "kind",
          "status"
        ],
        "properties": {
          "error": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EngineError",
                "description": "Error payload populated when [`OperationStatus::Failed`] or [`OperationStatus::Canceled`]."
              }
            ]
          },
          "id": {
            "$ref": "#/components/schemas/OperationId",
            "description": "Unique identifier for the operation."
          },
          "kind": {
            "$ref": "#/components/schemas/OperationKind",
            "description": "Operation kind discriminant."
          },
          "profile_id": {
            "$ref": "#/components/schemas/ProfileId",
            "description": "Profile whose state the operation reads or mutates."
          },
          "result": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationResult",
                "description": "Successful result, populated when [`OperationStatus::Succeeded`] or\n[`OperationStatus::SucceededWithFailures`]."
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/OperationStatus",
            "description": "Current lifecycle status."
          },
          "workspace_id": {
            "$ref": "#/components/schemas/WorkspaceId",
            "description": "Workspace that owns the operation."
          }
        }
      },
      "OperationResponse": {
        "type": "object",
        "description": "Operation identifier wrapper for async workflow responses.",
        "required": [
          "operation_id"
        ],
        "properties": {
          "operation_id": {
            "$ref": "#/components/schemas/OperationId"
          }
        }
      },
      "OperationResult": {
        "oneOf": [
          {
            "type": "object",
            "description": "Result of `SyncConnection`.",
            "required": [
              "SyncConnection"
            ],
            "properties": {
              "SyncConnection": {
                "type": "object",
                "description": "Result of `SyncConnection`.",
                "required": [
                  "record"
                ],
                "properties": {
                  "record": {
                    "$ref": "#/components/schemas/PublicConnectionRecord"
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "Result of `DiscoverConnection`.",
            "required": [
              "DiscoverConnection"
            ],
            "properties": {
              "DiscoverConnection": {
                "type": "object",
                "description": "Result of `DiscoverConnection`.",
                "required": [
                  "record"
                ],
                "properties": {
                  "record": {
                    "$ref": "#/components/schemas/PublicConnectionRecord"
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "Result of `SyncAllConnections`.",
            "required": [
              "SyncAllConnections"
            ],
            "properties": {
              "SyncAllConnections": {
                "type": "object",
                "description": "Result of `SyncAllConnections`.",
                "required": [
                  "records",
                  "failures"
                ],
                "properties": {
                  "failures": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ConnectionSyncFailure"
                    },
                    "description": "Per-connection failures encountered during the bulk sync."
                  },
                  "records": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicConnectionRecord"
                    },
                    "description": "Successfully synced connection records."
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "Result of `ProcessJournals`.",
            "required": [
              "ProcessJournals"
            ],
            "properties": {
              "ProcessJournals": {
                "type": "object",
                "description": "Result of `ProcessJournals`.",
                "required": [
                  "outcome"
                ],
                "properties": {
                  "outcome": {
                    "$ref": "#/components/schemas/JournalRunOutcome"
                  }
                }
              }
            }
          }
        ],
        "description": "Successful result payloads for long-running operations."
      },
      "OperationStatus": {
        "type": "string",
        "description": "Tracks the lifecycle state of an operation.",
        "enum": [
          "Queued",
          "Running",
          "Succeeded",
          "SucceededWithFailures",
          "Failed",
          "Canceled"
        ]
      },
      "Page_AccountRecord": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Canonical record representation persisted across all APIs.",
              "required": [
                "id",
                "root_id",
                "role",
                "kind",
                "label",
                "immutable"
              ],
              "properties": {
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional description."
                },
                "id": {
                  "$ref": "#/components/schemas/AccountId",
                  "description": "Unique account identifier."
                },
                "immutable": {
                  "type": "boolean",
                  "description": "Whether the account is immutable."
                },
                "kind": {
                  "$ref": "#/components/schemas/AccountKind",
                  "description": "Account category (Assets, Liabilities, etc.)."
                },
                "label": {
                  "type": "string",
                  "description": "Human-readable label."
                },
                "parent_id": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/AccountId",
                      "description": "Parent account identifier (None for root accounts)."
                    }
                  ]
                },
                "role": {
                  "$ref": "#/components/schemas/AccountRole",
                  "description": "Account role (Root, Default, Custom)."
                },
                "root_id": {
                  "$ref": "#/components/schemas/AccountId",
                  "description": "Root category account identifier."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_JournalEventListItem": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Journal event summary row for list endpoints.",
              "required": [
                "timestamp",
                "connections",
                "event_id",
                "event_kind",
                "excluded",
                "tags",
                "accounts"
              ],
              "properties": {
                "accounts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JournalEventListAccount"
                  },
                  "description": "Accounts referenced by the event after applying metadata adjustments."
                },
                "connections": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JournalEventListConnection"
                  },
                  "description": "Connections associated with the event group."
                },
                "event_id": {
                  "type": "string",
                  "description": "Event identifier from the journals snapshot."
                },
                "event_kind": {
                  "$ref": "#/components/schemas/JournalEventKind",
                  "description": "Canonical event kind inferred from the snapshot rows."
                },
                "excluded": {
                  "type": "boolean",
                  "description": "Whether the event is excluded from reporting."
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional metadata note."
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Tag"
                  },
                  "description": "Tags resolved for the metadata record."
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Canonical timestamp for the event (UTC)."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_JournalQuarantineEvent": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Quarantined canonical event derived from the latest journals run.",
              "required": [
                "event_id",
                "event_kind",
                "timestamp",
                "reasons",
                "reason_guidance",
                "resolution_status"
              ],
              "properties": {
                "event_id": {
                  "type": "string",
                  "description": "Canonical fund-movement event identifier."
                },
                "event_kind": {
                  "$ref": "#/components/schemas/JournalEventKind",
                  "description": "Canonical event kind (invoice, pay, transaction, etc.)."
                },
                "reason_guidance": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JournalQuarantineGuidance"
                  },
                  "description": "Remediation guidance aligned with `reasons` order."
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QuarantineReason"
                  },
                  "description": "Stable, de-duplicated quarantine reasons for the event."
                },
                "resolution_status": {
                  "$ref": "#/components/schemas/JournalQuarantineResolutionStatus",
                  "description": "Status of any persisted resolution attached to this event."
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Canonical timestamp for the event (UTC)."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_JournalQuarantineResolutionRecord": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Persistent operator reconciliation record keyed by `(event_kind, event_id)`.",
              "required": [
                "event_kind",
                "event_id",
                "fingerprint",
                "strategy",
                "created_at_millis",
                "updated_at_millis"
              ],
              "properties": {
                "created_at_millis": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Creation timestamp in Unix milliseconds."
                },
                "event_id": {
                  "type": "string",
                  "description": "Canonical event identifier."
                },
                "event_kind": {
                  "$ref": "#/components/schemas/JournalEventKind",
                  "description": "Canonical event kind."
                },
                "fingerprint": {
                  "type": "string",
                  "description": "Deterministic fingerprint used to detect stale resolutions."
                },
                "last_applied_run_timestamp_millis": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Journals run timestamp where this resolution was last auto-applied."
                },
                "strategy": {
                  "$ref": "#/components/schemas/JournalQuarantineResolutionStrategy",
                  "description": "Operator-selected reconciliation strategy."
                },
                "updated_at_millis": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Last update timestamp in Unix milliseconds."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_ManualTransferLinkRecord": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Persisted manual transfer link returned by engine APIs.",
              "required": [
                "link_id",
                "source_event_kind",
                "source_event_id",
                "destination_event_kind",
                "destination_event_id",
                "source_connection_id",
                "destination_connection_id",
                "asset_id",
                "amount_sats",
                "created_at_millis",
                "updated_at_millis"
              ],
              "properties": {
                "amount_sats": {
                  "type": "string",
                  "description": "Principal amount in sats with fixed millisatoshi scale."
                },
                "asset_id": {
                  "$ref": "#/components/schemas/AssetId",
                  "description": "Linked asset identifier. Manual transfer links currently require BTC."
                },
                "created_at_millis": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Creation timestamp in Unix milliseconds."
                },
                "destination_connection_id": {
                  "$ref": "#/components/schemas/ConnectionId",
                  "description": "Destination event connection identifier."
                },
                "destination_event_id": {
                  "type": "string",
                  "description": "Destination canonical event identifier."
                },
                "destination_event_kind": {
                  "$ref": "#/components/schemas/JournalEventKind",
                  "description": "Destination canonical event kind."
                },
                "link_id": {
                  "type": "string",
                  "description": "Deterministic link identifier derived from both endpoints."
                },
                "source_connection_id": {
                  "$ref": "#/components/schemas/ConnectionId",
                  "description": "Source event connection identifier."
                },
                "source_event_id": {
                  "type": "string",
                  "description": "Source canonical event identifier."
                },
                "source_event_kind": {
                  "$ref": "#/components/schemas/JournalEventKind",
                  "description": "Source canonical event kind."
                },
                "transaction_outpoint": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Selected transaction output, present when a transaction-side endpoint needs disambiguation."
                },
                "updated_at_millis": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Last update timestamp in Unix milliseconds."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_PublicConnectionRecord": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Non-secret connection metadata returned by ordinary API operations.",
              "required": [
                "id",
                "label",
                "kind"
              ],
              "properties": {
                "checkpoint": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "$ref": "#/components/schemas/ConnectionId"
                },
                "kind": {
                  "$ref": "#/components/schemas/ConnectionKind"
                },
                "label": {
                  "type": "string"
                },
                "last_sync_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_PublicOnchainDataSource": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "On-chain source metadata safe to return from ordinary API operations.\nEndpoint URLs and authentication material are intentionally absent because URLs can embed\ncredentials or provider tokens. Callers can still identify the source variant and see which\noptional settings are configured.",
              "required": [
                "id",
                "label",
                "source"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "source": {
                  "$ref": "#/components/schemas/PublicOnchainDataSourceType"
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_Tag": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Tag record returned by metadata APIs.",
              "required": [
                "id",
                "code",
                "label",
                "is_system"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Canonical tag code (lowercase)."
                },
                "id": {
                  "$ref": "#/components/schemas/TagId",
                  "description": "Tag identifier."
                },
                "is_system": {
                  "type": "boolean",
                  "description": "True when the tag is system-managed and immutable."
                },
                "label": {
                  "type": "string",
                  "description": "Display label for the tag."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_WorkspaceInviteView": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "API-safe representation of a workspace invite.",
              "required": [
                "id",
                "workspace_id",
                "invited_email",
                "access",
                "profiles",
                "status",
                "created_at",
                "expires_at"
              ],
              "properties": {
                "access": {
                  "$ref": "#/components/schemas/WorkspaceInviteAccess",
                  "description": "Access level granted by the invite."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the invite was created."
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the invite expires."
                },
                "id": {
                  "$ref": "#/components/schemas/WorkspaceInviteId",
                  "description": "Invite identifier."
                },
                "invited_email": {
                  "type": "string",
                  "description": "Normalized invitee email captured for display."
                },
                "profiles": {
                  "$ref": "#/components/schemas/WorkspaceInviteProfiles",
                  "description": "Profile selection bound to the invite."
                },
                "redeemed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the invite was redeemed."
                },
                "redeemed_subject_id": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/SubjectId",
                      "description": "Subject that redeemed the invite."
                    }
                  ]
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the invite was revoked."
                },
                "status": {
                  "$ref": "#/components/schemas/WorkspaceInviteStatus",
                  "description": "Derived status for the invite."
                },
                "workspace_id": {
                  "$ref": "#/components/schemas/WorkspaceId",
                  "description": "Workspace to which the invite grants access."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_WorkspaceMemberView": {
        "type": "object",
        "description": "Page response for list operations.\nPagination is cursor-based; callers can pass the returned `next` cursor\nto resume listing after the last item in the current page.",
        "required": [
          "items",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Access policy view for a workspace member.\n# Examples\n```\nuse clams_engine_protocol::{\nSubjectId, WorkspaceInviteAccess, WorkspaceInviteProfiles, WorkspaceMemberView,\n};\nuse uuid::Uuid;\nlet subject_id = SubjectId::from_namespaced(&Uuid::NAMESPACE_URL, b\"member\");\nlet view = WorkspaceMemberView {\nsubject_id,\naccess: WorkspaceInviteAccess::Read,\nprofiles: WorkspaceInviteProfiles::All,\n};\nassert!(matches!(view.access, WorkspaceInviteAccess::Read));\n```",
              "required": [
                "subject_id",
                "access",
                "profiles"
              ],
              "properties": {
                "access": {
                  "$ref": "#/components/schemas/WorkspaceInviteAccess",
                  "description": "Effective access level for the member."
                },
                "profiles": {
                  "$ref": "#/components/schemas/WorkspaceInviteProfiles",
                  "description": "Effective profile selection for the member."
                },
                "subject_id": {
                  "$ref": "#/components/schemas/SubjectId",
                  "description": "Subject identifier for the member."
                }
              }
            }
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ParentUpdate": {
        "oneOf": [
          {
            "type": "object",
            "description": "Preserve the existing parent linkage.",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "keep_existing"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Move the account beneath the supplied parent.",
            "required": [
              "value",
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "move_to"
                ]
              },
              "value": {
                "$ref": "#/components/schemas/AccountId",
                "description": "Move the account beneath the supplied parent."
              }
            }
          }
        ],
        "description": "Update strategy for an account parent."
      },
      "Pay": {
        "type": "object",
        "description": "Canonical payment payload encapsulating Lightning or on-chain spend events.\n# Identity Model\nThis payload uses a two-level identity scheme:\n- **Canonical ID** (storage key): A unique event identifier that distinguishes\nindividual pay events, even when the same invoice is paid multiple times.\nFormat varies by connector (e.g., `pay:lnd:v1:pi:<index>`).\n- **Correlation ID** (`Pay.id`): The business identifier used for Lightning\ninvoice matching, typically the `payment_hash`. This value may repeat across\nmultiple pay events when the same invoice is paid more than once.\nThis separation allows duplicate pays (same invoice paid twice) to coexist\nin storage while preserving correct journal correlation behavior.",
        "required": [
          "id",
          "connection_id",
          "timestamp",
          "amount",
          "fee"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount sent excluding fees (msats encoding)."
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection identifier (UUID v7, lowercase hyphenated)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description or memo associated with the payment."
          },
          "destination": {
            "type": [
              "string",
              "null"
            ],
            "description": "Destination node pubkey; 66-character lowercase hex when present."
          },
          "fee": {
            "type": "string",
            "description": "Total routing fees paid (msats encoding)."
          },
          "id": {
            "type": "string",
            "description": "Correlation identifier for Lightning invoice matching (typically `payment_hash`).\nThis is **not** a unique event identifier. Multiple pay events may share the\nsame `id` when the same invoice is paid more than once. Use the canonical\nstorage ID to distinguish individual pay events."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Completion timestamp expressed in whole seconds."
          },
          "zap": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Indicates whether this payment was a Nostr zap."
          }
        }
      },
      "PegBridge": {
        "type": "object",
        "description": "Canonical bridge record linking Bitcoin L1 and Liquid peg activity.",
        "required": [
          "id",
          "bitcoin_connection_id",
          "liquid_connection_id",
          "timestamp",
          "direction",
          "bitcoin_txid",
          "bitcoin_vout",
          "liquid_txid",
          "amount",
          "asset_id",
          "liquid_asset_id",
          "match_source"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Bridge principal amount using fixed scale `3`."
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Bitcoin-side asset identifier for bridge principal. This must resolve to system BTC."
          },
          "bitcoin_connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Bitcoin L1 connection participating in the bridge."
          },
          "bitcoin_fee": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Bitcoin-side fee in the BTC asset."
          },
          "bitcoin_txid": {
            "type": "string",
            "description": "Bitcoin transaction id for the matched L1 outpoint."
          },
          "bitcoin_vout": {
            "type": "integer",
            "format": "int32",
            "description": "Bitcoin output index for the matched L1 outpoint.",
            "minimum": 0
          },
          "confidence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional diagnostic confidence label from the matcher."
          },
          "direction": {
            "$ref": "#/components/schemas/PegBridgeDirection",
            "description": "Peg direction."
          },
          "id": {
            "type": "string",
            "description": "Stable bridge identifier."
          },
          "liquid_asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Liquid-side asset identifier for bridge principal. This must resolve to L-BTC."
          },
          "liquid_connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Liquid connection participating in the bridge and canonical envelope owner."
          },
          "liquid_fee": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Liquid-side fee in the L-BTC asset."
          },
          "liquid_txid": {
            "type": "string",
            "description": "Liquid transaction id carrying peg evidence."
          },
          "match_source": {
            "$ref": "#/components/schemas/PegBridgeMatchSource",
            "description": "Whether the match was automatic or manual."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Bridge event timestamp."
          }
        }
      },
      "PegBridgeDeleteResult": {
        "type": "object",
        "description": "Result returned after deleting a canonical peg bridge.",
        "required": [
          "deleted"
        ],
        "properties": {
          "deleted": {
            "type": "boolean",
            "description": "Whether a bridge existed and was deleted."
          }
        }
      },
      "PegBridgeDirection": {
        "type": "string",
        "description": "Direction of the cross-chain peg movement.\nNew variants must be appended to the end of this enum. Reordering variants\nbreaks bincode decoding of persisted canonical peg bridge records.",
        "enum": [
          "peg_in",
          "peg_out"
        ]
      },
      "PegBridgeMatchSource": {
        "type": "string",
        "description": "Source that established the peg bridge match.\nNew variants must be appended to the end of this enum. Reordering variants\nbreaks bincode decoding of persisted canonical peg bridge records.",
        "enum": [
          "automatic",
          "manual"
        ]
      },
      "PortfolioAssetBalance": {
        "type": "object",
        "description": "Per-asset net position for the portfolio summary (Assets + Liabilities only).",
        "required": [
          "asset_id",
          "asset",
          "net"
        ],
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/ReportAssetDisplay"
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId"
          },
          "net": {
            "type": "string",
            "description": "Net amount in the asset's native units (msat scale for BTC)."
          }
        }
      },
      "PortfolioBtcCapitalGains": {
        "type": "object",
        "description": "Aggregate BTC capital gains summary for the portfolio.",
        "required": [
          "fiat_currency",
          "algorithm",
          "sale_count",
          "total_quantity_sold",
          "total_proceeds_fiat",
          "total_cost_basis_fiat",
          "realized_gain_fiat",
          "realized_gain_percentage",
          "unrealized_gain_fiat",
          "unrealized_gain_percentage",
          "unrealized_cost_basis_fiat",
          "total_cost_basis_fiat_including_open",
          "excluded_assets",
          "total_gain_fiat",
          "disposals",
          "open_lots"
        ],
        "properties": {
          "algorithm": {
            "$ref": "#/components/schemas/GainsAlgorithm"
          },
          "average_cost_basis_fiat_per_btc": {
            "type": [
              "string",
              "null"
            ],
            "description": "Average fiat cost basis per BTC across all BTC acquisitions, including fees.\nRounded to three fractional digits; `None` when no BTC acquisitions exist."
          },
          "disposals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioBtcDisposal"
            }
          },
          "excluded_assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValuationExcludedAsset"
            },
            "description": "Assets intentionally excluded from this BTC-only gains calculation."
          },
          "fiat_currency": {
            "$ref": "#/components/schemas/FiatCurrency"
          },
          "open_lots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioBtcLot"
            }
          },
          "realized_gain_fiat": {
            "type": "string"
          },
          "realized_gain_percentage": {
            "type": "string"
          },
          "sale_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_cost_basis_fiat": {
            "type": "string"
          },
          "total_cost_basis_fiat_including_open": {
            "type": "string",
            "description": "Total fiat cost basis (`total_cost_basis_fiat` + `unrealized_cost_basis_fiat`)."
          },
          "total_gain_fiat": {
            "type": "string",
            "description": "Total gain/loss (`realized_gain_fiat` + `unrealized_gain_fiat`)."
          },
          "total_proceeds_fiat": {
            "type": "string"
          },
          "total_quantity_sold": {
            "type": "string",
            "description": "Sum of principal BTC quantities sold or spent across disposals."
          },
          "unrealized_cost_basis_fiat": {
            "type": "string",
            "description": "Sum of fiat cost basis across remaining open lots."
          },
          "unrealized_gain_fiat": {
            "type": "string",
            "description": "Unrealized gain/loss for remaining open lots priced at the snapshot timestamp."
          },
          "unrealized_gain_percentage": {
            "type": "string"
          }
        }
      },
      "PortfolioBtcDisposal": {
        "type": "object",
        "description": "Single BTC disposal processed for capital gains.",
        "required": [
          "event_kind",
          "event_id",
          "timestamp",
          "quantity_disposed",
          "btc_fee_quantity",
          "principal_quantity",
          "proceeds_fiat",
          "cost_basis_fiat",
          "realized_gain_fiat",
          "selections"
        ],
        "properties": {
          "btc_fee_quantity": {
            "type": "string",
            "description": "Estimated BTC-denominated fee quantity inferred from fee entries."
          },
          "cost_basis_fiat": {
            "type": "string",
            "description": "Fiat cost basis for `quantity_disposed` based on selected lots."
          },
          "event_id": {
            "type": "string"
          },
          "event_kind": {
            "$ref": "#/components/schemas/JournalEventKind"
          },
          "principal_quantity": {
            "type": "string",
            "description": "BTC principal quantity sold or spent (`quantity_disposed` - `btc_fee_quantity`, clamped at zero)."
          },
          "proceeds_fiat": {
            "type": "string",
            "description": "Fiat proceeds estimated at spot for `principal_quantity`, net of fiat-denominated fees."
          },
          "quantity_disposed": {
            "type": "string",
            "description": "Total BTC quantity removed from holdings (includes BTC-denominated fees)."
          },
          "realized_gain_fiat": {
            "type": "string",
            "description": "Realized gain/loss (`proceeds_fiat` - `cost_basis_fiat`)."
          },
          "selections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioBtcLotSelection"
            }
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PortfolioBtcLot": {
        "type": "object",
        "description": "Single open BTC lot tracked for capital gains.",
        "required": [
          "lot_id",
          "acquired_at",
          "quantity",
          "cost_basis_fiat"
        ],
        "properties": {
          "acquired_at": {
            "type": "string",
            "format": "date-time",
            "description": "Acquisition timestamp used for deterministic tie-breaking."
          },
          "cost_basis_fiat": {
            "type": "string",
            "description": "Remaining fiat cost basis for this lot in the selected fiat currency."
          },
          "lot_id": {
            "type": "integer",
            "format": "int64",
            "description": "Stable lot identifier for audit trails (deterministic within a run).",
            "minimum": 0
          },
          "quantity": {
            "type": "string",
            "description": "Remaining BTC quantity in sats with msat scale."
          }
        }
      },
      "PortfolioBtcLotSelection": {
        "type": "object",
        "description": "Portion of a BTC lot consumed by a disposal.",
        "required": [
          "lot_id",
          "acquired_at",
          "quantity",
          "cost_basis_fiat"
        ],
        "properties": {
          "acquired_at": {
            "type": "string",
            "format": "date-time"
          },
          "cost_basis_fiat": {
            "type": "string"
          },
          "lot_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "quantity": {
            "type": "string"
          }
        }
      },
      "PortfolioBtcValuation": {
        "type": "object",
        "description": "Summarizes portfolio value normalized to BTC.",
        "required": [
          "total_btc",
          "excluded_assets"
        ],
        "properties": {
          "excluded_assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValuationExcludedAsset"
            }
          },
          "total_btc": {
            "type": "string",
            "description": "Total value expressed in BTC sats with msat scale."
          }
        }
      },
      "PortfolioFiatValuation": {
        "type": "object",
        "description": "Summarizes portfolio value normalized to fiat currency.",
        "required": [
          "fiat_currency",
          "total",
          "excluded_assets"
        ],
        "properties": {
          "excluded_assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValuationExcludedAsset"
            }
          },
          "fiat_currency": {
            "$ref": "#/components/schemas/FiatCurrency"
          },
          "total": {
            "type": "string",
            "description": "Total value in the selected fiat currency with three fractional digits."
          }
        }
      },
      "PortfolioSummaryReport": {
        "type": "object",
        "description": "Portfolio summary report aggregating balances, valuations, and BTC capital gains.",
        "required": [
          "workspace_id",
          "profile_id",
          "snapshot_path",
          "snapshot_timestamp",
          "non_final",
          "included_kinds",
          "balances",
          "fiat_valuation",
          "btc_valuation",
          "btc_balance",
          "btc_capital_gains"
        ],
        "properties": {
          "balances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioAssetBalance"
            },
            "description": "Net positions per asset (Assets + Liabilities)."
          },
          "btc_balance": {
            "type": "string",
            "description": "Net BTC position (Assets + Liabilities) expressed in sats with msat scale."
          },
          "btc_balance_fiat": {
            "type": [
              "string",
              "null"
            ],
            "description": "`btc_balance` valued in the selected fiat when BTC appears in balances."
          },
          "btc_capital_gains": {
            "$ref": "#/components/schemas/PortfolioBtcCapitalGains"
          },
          "btc_valuation": {
            "$ref": "#/components/schemas/PortfolioBtcValuation"
          },
          "fiat_valuation": {
            "$ref": "#/components/schemas/PortfolioFiatValuation"
          },
          "included_kinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountKind"
            },
            "description": "Account kinds included in the net position calculation (fixed to Assets and Liabilities)."
          },
          "non_final": {
            "type": "boolean"
          },
          "profile_id": {
            "type": "string",
            "format": "uuid"
          },
          "snapshot_path": {
            "type": "string"
          },
          "snapshot_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ProfileCapacityRevisionStaleDetails": {
        "type": "object",
        "description": "Structured details for an obsolete profile-capacity entitlement.",
        "required": [
          "instance_id",
          "submitted_entitlement_revision",
          "current_entitlement_revision",
          "submitted_capacity_limit",
          "active_capacity_limit",
          "used_profiles",
          "requested_profiles",
          "valid_until_epoch"
        ],
        "properties": {
          "active_capacity_limit": {
            "type": "integer",
            "format": "int32",
            "description": "Current authoritative profile-capacity limit.",
            "minimum": 0
          },
          "current_entitlement_revision": {
            "type": "integer",
            "format": "int64",
            "description": "Current authoritative revision for the backend instance.",
            "minimum": 0
          },
          "instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "Backend instance whose capacity entitlement changed."
          },
          "requested_profiles": {
            "type": "integer",
            "format": "int32",
            "description": "Additional profiles requested by the failed operation.",
            "minimum": 0
          },
          "submitted_capacity_limit": {
            "type": "integer",
            "format": "int32",
            "description": "Profile-capacity limit embedded in the caller's SVC token.",
            "minimum": 0
          },
          "submitted_entitlement_revision": {
            "type": "integer",
            "format": "int64",
            "description": "Revision embedded in the caller's SVC token.",
            "minimum": 0
          },
          "used_profiles": {
            "type": "integer",
            "format": "int32",
            "description": "Current non-deleted profile usage.",
            "minimum": 0
          },
          "valid_until_epoch": {
            "type": "integer",
            "format": "int64",
            "description": "Epoch at which the stale token entitlement expires.",
            "minimum": 0
          }
        }
      },
      "ProfileChainSourceSelections": {
        "type": "object",
        "description": "Family-keyed chain source selections for a profile.",
        "properties": {
          "bitcoin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DataSourceId",
                "description": "Default Bitcoin-family chain source."
              }
            ]
          },
          "liquid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DataSourceId",
                "description": "Default Liquid-family chain source."
              }
            ]
          }
        }
      },
      "ProfileId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique profile identifier scoped under a parent workspace."
      },
      "ProfileRecord": {
        "type": "object",
        "description": "Canonical profile record nested beneath a workspace.",
        "required": [
          "id",
          "workspace_id",
          "label"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ProfileId",
            "description": "Server-assigned UUID v7 identifier for the profile."
          },
          "label": {
            "type": "string",
            "description": "Human-readable label for the profile."
          },
          "workspace_id": {
            "$ref": "#/components/schemas/WorkspaceId",
            "description": "Parent workspace the profile is bound to."
          }
        }
      },
      "ProfileScope": {
        "type": "object",
        "description": "Explicit profile scope combining workspace and profile identifiers to avoid implicit defaults.",
        "required": [
          "workspace_id",
          "profile_id"
        ],
        "properties": {
          "profile_id": {
            "$ref": "#/components/schemas/ProfileId"
          },
          "workspace_id": {
            "$ref": "#/components/schemas/WorkspaceId"
          }
        }
      },
      "ProfileSettings": {
        "type": "object",
        "description": "Canonical snapshot of persisted settings returned to consumers for the current profile.",
        "required": [
          "fiat_currency",
          "gains_algorithm",
          "chain_sources"
        ],
        "properties": {
          "chain_sources": {
            "$ref": "#/components/schemas/ProfileChainSourceSelections",
            "description": "Family-keyed chain source selections."
          },
          "fiat_currency": {
            "type": "string",
            "description": "Canonical uppercase fiat currency code from `crate::assets::FiatCurrency`."
          },
          "gains_algorithm": {
            "$ref": "#/components/schemas/GainsAlgorithm",
            "description": "Supported capital gains algorithm."
          },
          "liquid_onchain_data_source_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DataSourceId",
                "description": "Optional Liquid-family onchain data source identifier."
              }
            ]
          },
          "onchain_data_source_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DataSourceId",
                "description": "Optional onchain data source identifier.\n\nThis is the Bitcoin-family default retained under the original field name for API and\nstorage compatibility."
              }
            ]
          },
          "tor_proxy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Tor proxy endpoint string used by callers to route traffic over Tor when configured.\nAbsence disables proxying."
          }
        }
      },
      "ProfileSettingsPatchInput": {
        "type": "object",
        "description": "User-facing patch input for profile settings updates.",
        "properties": {
          "chain_source_ids": {
            "type": [
              "object",
              "null"
            ],
            "description": "Requested family-keyed chain source associations.",
            "default": null,
            "additionalProperties": {
              "$ref": "#/components/schemas/DataSourceId"
            },
            "propertyNames": {
              "type": "string",
              "description": "Chain family served by a shared chain source.",
              "enum": [
                "bitcoin",
                "liquid"
              ]
            }
          },
          "clear_chain_source_families": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainSourceFamily"
            },
            "description": "Chain source families to clear.",
            "default": []
          },
          "clear_liquid_onchain_source_id": {
            "type": "boolean",
            "description": "Clears the current Liquid onchain source association.",
            "default": false
          },
          "clear_onchain_source_id": {
            "type": "boolean",
            "description": "Clears the current onchain source association.",
            "default": false
          },
          "fiat_currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Requested fiat currency replacement when provided.",
            "default": null
          },
          "gains_algorithm": {
            "type": [
              "string",
              "null"
            ],
            "description": "Requested gains algorithm replacement when provided.",
            "default": null
          },
          "liquid_onchain_source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Requested Liquid onchain source association when provided.",
            "default": null
          },
          "no_tor_proxy": {
            "type": "boolean",
            "description": "Clears the current Tor proxy.",
            "default": false
          },
          "onchain_source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Requested onchain source association when provided.",
            "default": null
          },
          "tor_proxy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Requested Tor proxy replacement when provided.",
            "default": null
          }
        },
        "additionalProperties": false
      },
      "ProfileSetupOnchainSource": {
        "type": "object",
        "description": "Inputs required to provision an additional profile onchain source during setup.",
        "required": [
          "label",
          "kind",
          "url"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "rpc_cookie": {
            "type": [
              "string",
              "null"
            ]
          },
          "rpc_password": {
            "type": [
              "string",
              "null"
            ]
          },
          "rpc_user": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ProfileSetupRequest": {
        "type": "object",
        "description": "Inputs required to create a profile with an onchain source and initial settings.",
        "required": [
          "profile_label",
          "fiat_currency",
          "gains_algorithm",
          "onchain_label",
          "onchain_kind",
          "onchain_url",
          "select_as_default"
        ],
        "properties": {
          "additional_onchain_sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileSetupOnchainSource"
            }
          },
          "fiat_currency": {
            "type": "string"
          },
          "gains_algorithm": {
            "type": "string"
          },
          "onchain_kind": {
            "type": "string"
          },
          "onchain_label": {
            "type": "string"
          },
          "onchain_url": {
            "type": "string"
          },
          "profile_label": {
            "type": "string"
          },
          "rpc_cookie": {
            "type": [
              "string",
              "null"
            ]
          },
          "rpc_password": {
            "type": [
              "string",
              "null"
            ]
          },
          "rpc_user": {
            "type": [
              "string",
              "null"
            ]
          },
          "select_as_default": {
            "type": "boolean"
          },
          "tor_proxy": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProgressPhase": {
        "type": "string",
        "description": "Phases of adapter work for progress reporting.",
        "enum": [
          "Validating",
          "Connecting",
          "Planning",
          "Fetching",
          "Processing",
          "Persisting"
        ]
      },
      "ProgressScope": {
        "type": "string",
        "description": "Scope of a progress event.",
        "enum": [
          "Operation",
          "Connection"
        ]
      },
      "ProgressSource": {
        "type": "string",
        "description": "Source of a progress event.",
        "enum": [
          "Operation",
          "Adapter"
        ]
      },
      "ProgressUnit": {
        "type": "string",
        "description": "Unit for progress `current/total` semantics.",
        "enum": [
          "Connections",
          "Steps",
          "Pages",
          "Blocks",
          "Wallets",
          "Records",
          "Bytes"
        ]
      },
      "PublicConnectionRecord": {
        "type": "object",
        "description": "Non-secret connection metadata returned by ordinary API operations.",
        "required": [
          "id",
          "label",
          "kind"
        ],
        "properties": {
          "checkpoint": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "$ref": "#/components/schemas/ConnectionId"
          },
          "kind": {
            "$ref": "#/components/schemas/ConnectionKind"
          },
          "label": {
            "type": "string"
          },
          "last_sync_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PublicOnchainDataSource": {
        "type": "object",
        "description": "On-chain source metadata safe to return from ordinary API operations.\nEndpoint URLs and authentication material are intentionally absent because URLs can embed\ncredentials or provider tokens. Callers can still identify the source variant and see which\noptional settings are configured.",
        "required": [
          "id",
          "label",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/PublicOnchainDataSourceType"
          }
        }
      },
      "PublicOnchainDataSourceType": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "BitcoinRpc"
            ],
            "properties": {
              "BitcoinRpc": {
                "$ref": "#/components/schemas/PublicOnchainRpcArgs"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "Electrum"
            ],
            "properties": {
              "Electrum": {
                "$ref": "#/components/schemas/PublicOnchainEndpointArgs"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "Esplora"
            ],
            "properties": {
              "Esplora": {
                "$ref": "#/components/schemas/PublicOnchainEndpointArgs"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "LiquidEsplora"
            ],
            "properties": {
              "LiquidEsplora": {
                "$ref": "#/components/schemas/PublicOnchainEndpointArgs"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "LiquidElectrum"
            ],
            "properties": {
              "LiquidElectrum": {
                "$ref": "#/components/schemas/PublicOnchainEndpointArgs"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "ElementsRpc"
            ],
            "properties": {
              "ElementsRpc": {
                "$ref": "#/components/schemas/PublicOnchainRpcArgs"
              }
            }
          }
        ],
        "description": "Redacted on-chain source configuration returned by ordinary API operations."
      },
      "PublicOnchainEndpointArgs": {
        "type": "object",
        "description": "Public endpoint state without the credential-bearing URL.",
        "required": [
          "url_configured"
        ],
        "properties": {
          "timeout_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 1
          },
          "url_configured": {
            "type": "boolean"
          }
        }
      },
      "PublicOnchainRpcArgs": {
        "type": "object",
        "description": "Public RPC source state with authentication reduced to presence flags.",
        "required": [
          "url_configured",
          "effective_timeout_secs",
          "rpc_cookie_configured",
          "rpc_user_configured",
          "rpc_password_configured"
        ],
        "properties": {
          "effective_timeout_secs": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "rpc_cookie_configured": {
            "type": "boolean"
          },
          "rpc_password_configured": {
            "type": "boolean"
          },
          "rpc_user_configured": {
            "type": "boolean"
          },
          "timeout_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 1
          },
          "url_configured": {
            "type": "boolean"
          }
        }
      },
      "QuarantineReason": {
        "type": "object",
        "description": "Machine readable reason describing why an event was quarantined.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable code suitable for metrics and automated handling."
          },
          "message": {
            "type": "string",
            "description": "Human-readable context useful during debugging and tests."
          }
        }
      },
      "QuarantinedEvent": {
        "type": "object",
        "description": "Canonical event paired with its quarantine diagnostics.",
        "required": [
          "event_id",
          "event_kind",
          "reason"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Canonical identifier for the rejected event."
          },
          "event_kind": {
            "$ref": "#/components/schemas/JournalEventKind",
            "description": "Canonical event kind used for diagnostics."
          },
          "reason": {
            "$ref": "#/components/schemas/QuarantineReason",
            "description": "Machine-readable quarantine reason."
          }
        }
      },
      "RawTransactionMetadata": {
        "type": "object",
        "description": "Raw transaction metadata retained when the upstream source exposes the serialized transaction.\nThis is intentionally limited to consensus fields that affect close-protocol proof. `version`\nand `lock_time` are transaction-wide values, while `input_sequences` preserves each input's\nconsensus sequence in input order.",
        "required": [
          "version",
          "lock_time",
          "input_sequences"
        ],
        "properties": {
          "input_sequences": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "description": "Consensus sequence values aligned with `Transaction.inputs`."
          },
          "lock_time": {
            "type": "integer",
            "format": "int32",
            "description": "Consensus locktime encoded as the raw `u32` value.",
            "minimum": 0
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "Consensus transaction version."
          }
        }
      },
      "ReportAssetDisplay": {
        "type": "object",
        "description": "Display metadata for an accounting asset in report responses.\nReports use this object instead of the closed [`AssetCode`] enum so system assets and\nsource-specific assets, such as Liquid-issued assets, can be rendered and audited through the\nsame shape.",
        "required": [
          "asset_id",
          "ticker",
          "name"
        ],
        "properties": {
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Accounting asset identifier used by journal postings."
          },
          "name": {
            "type": "string",
            "description": "Human-readable asset name."
          },
          "precision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Display precision for converting canonical base units into whole display units.",
            "minimum": 0
          },
          "reference": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetReference",
                "description": "Primary source reference associated with the accounting asset."
              }
            ]
          },
          "ticker": {
            "type": "string",
            "description": "Human-readable ticker used for display and rate pair lookup."
          }
        }
      },
      "ResolveConnectionBody": {
        "type": "object",
        "description": "Response body for resolved connection identifiers.",
        "required": [
          "connection_id"
        ],
        "properties": {
          "connection_id": {
            "$ref": "#/components/schemas/ConnectionId"
          }
        }
      },
      "ResolvedReport_BalanceHistoryReport": {
        "type": "object",
        "description": "One report result bound to the exact verified legal policy used for its generation.",
        "required": [
          "report",
          "disclaimer"
        ],
        "properties": {
          "disclaimer": {
            "type": "object",
            "description": "Exact disclaimer metadata captured before report generation."
          },
          "report": {
            "type": "object",
            "description": "Top-level balance history report for a workspace profile.",
            "required": [
              "workspace_id",
              "profile_id",
              "snapshot_path",
              "snapshot_timestamp",
              "non_final",
              "interval",
              "series",
              "issues"
            ],
            "properties": {
              "account_id": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AccountId",
                    "description": "Optional account subtree filter applied to the report."
                  }
                ]
              },
              "applied_range": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/BalanceHistoryRange",
                    "description": "Effective sampled time range after defaulting omitted bounds from snapshot data."
                  }
                ]
              },
              "asset_id": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AssetId",
                    "description": "Optional asset filter applied to the report."
                  }
                ]
              },
              "connection_id": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ConnectionId",
                    "description": "Optional connection filter applied to the report."
                  }
                ]
              },
              "interval": {
                "$ref": "#/components/schemas/BalanceHistoryInterval",
                "description": "Effective sampling interval used by the report."
              },
              "issues": {
                "$ref": "#/components/schemas/BalanceHistoryIssues",
                "description": "Metadata describing data quality issues encountered during computation."
              },
              "non_final": {
                "type": "boolean"
              },
              "profile_id": {
                "type": "string",
                "format": "uuid"
              },
              "requested_end": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Inclusive user-supplied UTC end timestamp when present."
              },
              "requested_start": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Inclusive user-supplied UTC start timestamp when present."
              },
              "series": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BalanceHistorySeries"
                },
                "description": "Per-asset sampled balance series."
              },
              "snapshot_path": {
                "type": "string"
              },
              "snapshot_timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ResolvedReport_BalanceSheetConnectionBalancesPage": {
        "type": "object",
        "description": "One report result bound to the exact verified legal policy used for its generation.",
        "required": [
          "report",
          "disclaimer"
        ],
        "properties": {
          "disclaimer": {
            "type": "object",
            "description": "Exact disclaimer metadata captured before report generation."
          },
          "report": {
            "type": "object",
            "description": "Paginated response of per-connection balance aggregates for a balance sheet snapshot.",
            "required": [
              "workspace_id",
              "profile_id",
              "snapshot_path",
              "snapshot_timestamp",
              "non_final",
              "included_kinds",
              "rollup",
              "items"
            ],
            "properties": {
              "account_id": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AccountId",
                    "description": "Optional account id used to restrict results."
                  }
                ]
              },
              "as_of_timestamp": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Optional as-of cutoff that was applied when computing this report."
              },
              "fiat_excluded_assets": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ValuationExcludedAsset"
                },
                "description": "Assets excluded from fiat conversion due to unsupported paths or missing rates."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether more pages are available after this one."
              },
              "included_kinds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AccountKind"
                },
                "description": "Account kinds that were included when computing this report."
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BalanceSheetConnectionBalance"
                },
                "description": "Per-connection balances by account kind."
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Cursor token for the next page, when present."
              },
              "non_final": {
                "type": "boolean",
                "description": "Flag indicating whether the underlying snapshot is marked non final."
              },
              "profile_id": {
                "type": "string",
                "format": "uuid",
                "description": "Profile within the workspace."
              },
              "rollup": {
                "type": "boolean",
                "description": "Flag indicating whether descendant accounts are included."
              },
              "snapshot_path": {
                "type": "string",
                "description": "Path to the underlying journals snapshot file."
              },
              "snapshot_timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp derived from the snapshot path or metadata."
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "description": "Workspace that owns the report."
              }
            }
          }
        }
      },
      "ResolvedReport_BalanceSheetReportPage": {
        "type": "object",
        "description": "One report result bound to the exact verified legal policy used for its generation.",
        "required": [
          "report",
          "disclaimer"
        ],
        "properties": {
          "disclaimer": {
            "type": "object",
            "description": "Exact disclaimer metadata captured before report generation."
          },
          "report": {
            "type": "object",
            "description": "Paginated balance sheet response with flattened rows.",
            "required": [
              "workspace_id",
              "profile_id",
              "snapshot_path",
              "snapshot_timestamp",
              "non_final",
              "included_kinds",
              "totals",
              "issues",
              "items"
            ],
            "properties": {
              "as_of_timestamp": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Optional as-of cutoff that was applied when computing this report."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether more pages are available after this one."
              },
              "included_kinds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AccountKind"
                },
                "description": "Account kinds that were included when computing this report."
              },
              "issues": {
                "$ref": "#/components/schemas/BalanceSheetIssues",
                "description": "Metadata describing data quality issues encountered during computation."
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BalanceSheetRow"
                },
                "description": "Flattened account rows in pre-order traversal."
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Cursor token for the next page, when present."
              },
              "non_final": {
                "type": "boolean",
                "description": "Flag indicating whether the underlying snapshot is marked non final."
              },
              "profile_id": {
                "type": "string",
                "format": "uuid",
                "description": "Profile within the workspace."
              },
              "snapshot_path": {
                "type": "string",
                "description": "Path to the underlying journals snapshot file."
              },
              "snapshot_timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp derived from the snapshot path or metadata."
              },
              "totals": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BalanceSheetAmount"
                },
                "description": "Per asset totals for the entire ledger given the included kinds."
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid",
                "description": "Workspace that owns the report."
              }
            }
          }
        }
      },
      "ResolvedReport_PortfolioSummaryReport": {
        "type": "object",
        "description": "One report result bound to the exact verified legal policy used for its generation.",
        "required": [
          "report",
          "disclaimer"
        ],
        "properties": {
          "disclaimer": {
            "type": "object",
            "description": "Exact disclaimer metadata captured before report generation."
          },
          "report": {
            "type": "object",
            "description": "Portfolio summary report aggregating balances, valuations, and BTC capital gains.",
            "required": [
              "workspace_id",
              "profile_id",
              "snapshot_path",
              "snapshot_timestamp",
              "non_final",
              "included_kinds",
              "balances",
              "fiat_valuation",
              "btc_valuation",
              "btc_balance",
              "btc_capital_gains"
            ],
            "properties": {
              "balances": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PortfolioAssetBalance"
                },
                "description": "Net positions per asset (Assets + Liabilities)."
              },
              "btc_balance": {
                "type": "string",
                "description": "Net BTC position (Assets + Liabilities) expressed in sats with msat scale."
              },
              "btc_balance_fiat": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`btc_balance` valued in the selected fiat when BTC appears in balances."
              },
              "btc_capital_gains": {
                "$ref": "#/components/schemas/PortfolioBtcCapitalGains"
              },
              "btc_valuation": {
                "$ref": "#/components/schemas/PortfolioBtcValuation"
              },
              "fiat_valuation": {
                "$ref": "#/components/schemas/PortfolioFiatValuation"
              },
              "included_kinds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AccountKind"
                },
                "description": "Account kinds included in the net position calculation (fixed to Assets and Liabilities)."
              },
              "non_final": {
                "type": "boolean"
              },
              "profile_id": {
                "type": "string",
                "format": "uuid"
              },
              "snapshot_path": {
                "type": "string"
              },
              "snapshot_timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "SetJournalQuarantineResolutionRequest": {
        "type": "object",
        "description": "Request payload for setting/updating a persisted quarantine resolution.",
        "required": [
          "strategy"
        ],
        "properties": {
          "strategy": {
            "$ref": "#/components/schemas/JournalQuarantineResolutionStrategy",
            "description": "Operator-selected reconciliation strategy."
          }
        }
      },
      "SetMetadataBtcFiatOverride": {
        "type": "object",
        "description": "Request body used to set a metadata BTC-fiat override (pair + rate).",
        "required": [
          "rate",
          "pair"
        ],
        "properties": {
          "pair": {
            "type": "string",
            "description": "BTC-fiat pair identifying denomination (for example `BTC-USD`)."
          },
          "rate": {
            "type": "string",
            "description": "BTC-fiat rate quoted as fiat per 1 BTC."
          }
        }
      },
      "SetMetadataBtcFiatRate": {
        "type": "object",
        "description": "Request body used to set a metadata BTC-fiat rate override.",
        "required": [
          "btc_fiat_rate"
        ],
        "properties": {
          "btc_fiat_rate": {
            "type": "string",
            "description": "BTC-fiat rate quoted as fiat per 1 BTC."
          }
        }
      },
      "SetMetadataExcluded": {
        "type": "object",
        "description": "Request body used to set a metadata excluded flag.",
        "required": [
          "excluded"
        ],
        "properties": {
          "excluded": {
            "type": "boolean",
            "description": "New excluded value."
          }
        }
      },
      "SetMetadataNote": {
        "type": "object",
        "description": "Request body used to set a metadata note.",
        "required": [
          "note"
        ],
        "properties": {
          "note": {
            "type": "string",
            "description": "Note content."
          }
        }
      },
      "SetSettings": {
        "type": "object",
        "description": "Represents a caller request to replace the stored settings record for the current profile.",
        "properties": {
          "fiat_currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required fiat currency code (ASCII, canonicalized via `crate::assets::FiatCurrency`); `None` is rejected."
          },
          "gains_algorithm": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required capital gains algorithm (accepted: FIFO, LIFO, HIFO, LOFO, `AVG_COST`); `None` is rejected."
          },
          "liquid_onchain_data_source_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DataSourceId",
                "description": "Optional Liquid-family onchain data source identifier associated to the settings."
              }
            ]
          },
          "onchain_data_source_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DataSourceId",
                "description": "Optional onchain data source identifier associated to the settings.\n\nThis is the Bitcoin-family default retained under the original field name for API and\nstorage compatibility."
              }
            ]
          },
          "tor_proxy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Tor proxy endpoint string used by callers to route traffic over Tor when configured.\nAbsence disables proxying."
          }
        }
      },
      "SetWorkspaceMemberAccessRequest": {
        "type": "object",
        "description": "Request payload for updating a workspace member's access.\n# Examples\n```\nuse clams_engine_protocol::{\nSetWorkspaceMemberAccessRequest, WorkspaceInviteAccess, WorkspaceInviteProfiles,\n};\nlet request = SetWorkspaceMemberAccessRequest {\naccess: WorkspaceInviteAccess::ReadWrite,\nprofiles: WorkspaceInviteProfiles::All,\n};\nassert!(matches!(request.access, WorkspaceInviteAccess::ReadWrite));\n```",
        "required": [
          "access",
          "profiles"
        ],
        "properties": {
          "access": {
            "$ref": "#/components/schemas/WorkspaceInviteAccess",
            "description": "Access level to apply to the member."
          },
          "profiles": {
            "$ref": "#/components/schemas/WorkspaceInviteProfiles",
            "description": "Profile selection to apply to the member."
          }
        }
      },
      "SubjectId": {
        "type": "string",
        "format": "uuid",
        "description": "External subject identifier supplied by upstream systems and validated as UUID v5 for\ndeterministic derivation."
      },
      "SubmitFeedbackRequest": {
        "type": "object",
        "description": "Payload submitted by clients to report feedback.\nBackends populate `backend_kind` and `backend_url` before forwarding to the\nauth server; clients should not set these fields.\n# Examples\n```rust\nuse clams_engine_protocol::feedback::{FeedbackType, SubmitFeedbackRequest};\nlet request = SubmitFeedbackRequest {\nfeedback_type: FeedbackType::General,\ntitle: \"Thanks\".to_owned(),\nmessage: \"Love the new reports view.\".to_owned(),\nreply_to_email: None,\napp_version: \"clams/0.1.0\".to_owned(),\nos: Some(\"macos\".to_owned()),\narch: Some(\"aarch64\".to_owned()),\nlogs: None,\n};\nassert!(request.logs.is_none());\n```",
        "required": [
          "feedback_type",
          "title",
          "message",
          "app_version"
        ],
        "properties": {
          "app_version": {
            "type": "string",
            "description": "Application version string (for example: `clams/0.1.0`)."
          },
          "arch": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional CPU architecture identifier reported by the client."
          },
          "feedback_type": {
            "$ref": "#/components/schemas/FeedbackType",
            "description": "Feedback category selected by the user."
          },
          "logs": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LogAttachment",
                "description": "Optional log attachment for bug reports."
              }
            ]
          },
          "message": {
            "type": "string",
            "description": "Full feedback message body."
          },
          "os": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional operating system identifier reported by the client."
          },
          "reply_to_email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional reply-to email address; omit for anonymous submissions."
          },
          "title": {
            "type": "string",
            "description": "Short title shown in the email subject."
          }
        }
      },
      "Tag": {
        "type": "object",
        "description": "Tag record returned by metadata APIs.",
        "required": [
          "id",
          "code",
          "label",
          "is_system"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Canonical tag code (lowercase)."
          },
          "id": {
            "$ref": "#/components/schemas/TagId",
            "description": "Tag identifier."
          },
          "is_system": {
            "type": "boolean",
            "description": "True when the tag is system-managed and immutable."
          },
          "label": {
            "type": "string",
            "description": "Display label for the tag."
          }
        }
      },
      "TagCreate": {
        "type": "object",
        "description": "Tag payload used to create a new tag.",
        "required": [
          "code",
          "label"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Canonical tag code."
          },
          "label": {
            "type": "string",
            "description": "Display label for the tag."
          }
        }
      },
      "TagId": {
        "type": "string",
        "format": "uuid",
        "description": "Canonical identifier for metadata tags."
      },
      "TagUpdate": {
        "type": "object",
        "description": "Tag payload used to update an existing tag label.",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string",
            "description": "Display label for the tag."
          }
        }
      },
      "Trade": {
        "type": "object",
        "description": "Canonical trade execution payload capturing asset conversions and fees.",
        "required": [
          "id",
          "connection_id",
          "timestamp",
          "from_asset_id",
          "from_amount",
          "to_asset_id",
          "to_amount"
        ],
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Exchange/connection identifier (UUID v7, lowercase hyphenated)."
          },
          "fee_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fee amount stored at `fee_asset_id` native precision, or `from_asset_id` when absent."
          },
          "fee_asset_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetId",
                "description": "Asset used to pay fees, if distinct."
              }
            ]
          },
          "from_amount": {
            "type": "string",
            "description": "Amount of the \"from\" asset stored at `from_asset_id` native precision."
          },
          "from_asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Asset being sold."
          },
          "id": {
            "type": "string",
            "description": "Opaque trade execution identifier from the source system."
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional exchange order identifier."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Execution timestamp expressed in whole seconds."
          },
          "to_amount": {
            "type": "string",
            "description": "Amount of the \"to\" asset stored at `to_asset_id` native precision."
          },
          "to_asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Asset being bought."
          },
          "trade_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exchange-specific identifiers."
          }
        }
      },
      "Transaction": {
        "type": "object",
        "description": "Canonical on-chain transaction capturing confirmed inputs and outputs.",
        "required": [
          "id",
          "connection_id",
          "timestamp",
          "block_height",
          "inputs",
          "outputs"
        ],
        "properties": {
          "block_height": {
            "type": "integer",
            "format": "int32",
            "description": "Confirmed block height where this transaction was included.",
            "minimum": 0
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Wallet/connection that detected this transaction (UUID v7)."
          },
          "id": {
            "type": "string",
            "description": "Transaction txid (lowercase hex on emit)."
          },
          "inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OnchainInput"
            },
            "description": "Previous outputs being spent."
          },
          "ln_tx_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LnTransactionType",
                "description": "Lightning transaction classification when available."
              }
            ]
          },
          "outputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OnchainOutput"
            },
            "description": "New outputs being created."
          },
          "raw": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RawTransactionMetadata",
                "description": "Raw consensus metadata when the source exposed enough transaction bytes to retain it."
              }
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Confirmation timestamp expressed in whole seconds."
          }
        }
      },
      "UpdateConnectionBody": {
        "type": "object",
        "description": "Payload for updating a connection.",
        "properties": {
          "configuration": {},
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateProfileBody": {
        "type": "object",
        "description": "Payload for updating a profile label.",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UpdateProfileWithSettingsRequest": {
        "type": "object",
        "description": "Inputs required to update a profile label and settings while holding one profile mutation lock.\nProtocol consumers should prefer this request when both pieces of state change together.\nLabel-only edits should continue to use the dedicated label mutation.",
        "required": [
          "label",
          "settings"
        ],
        "properties": {
          "label": {
            "type": "string",
            "description": "Replacement human-readable label for the profile."
          },
          "settings": {
            "$ref": "#/components/schemas/ProfileSettingsPatchInput",
            "description": "Settings patch to apply after the label update while the same lock is still held."
          }
        }
      },
      "UpdateProfileWithSettingsResult": {
        "type": "object",
        "description": "Outcome of a combined profile label/settings mutation.\nExactly one of `settings` or `settings_error` should be populated by conforming\nimplementations. This shape lets transports preserve the \"label updated, settings failed\"\npartial-success contract without splitting the mutation into separate backend calls.",
        "required": [
          "profile"
        ],
        "properties": {
          "profile": {
            "$ref": "#/components/schemas/ProfileRecord",
            "description": "Persisted profile record after the label update."
          },
          "settings": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProfileSettings",
                "description": "Persisted settings snapshot when the settings write succeeded."
              }
            ]
          },
          "settings_error": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EngineError",
                "description": "Settings write failure captured after the label update succeeded."
              }
            ]
          }
        }
      },
      "UpsertOnchainBody": {
        "type": "object",
        "description": "Payload for creating or updating onchain sources.",
        "required": [
          "label",
          "kind",
          "source"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/OnchainDataSourceType"
          }
        }
      },
      "UserSettings": {
        "type": "object",
        "description": "Subject-scoped settings persisted for engine consumers.",
        "properties": {
          "selected_profile_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProfileId",
                "description": "The last profile the subject interacted with, if any."
              }
            ]
          }
        }
      },
      "Utxo": {
        "type": "object",
        "description": "Canonical unspent transaction output payload captured by accounting connections.",
        "required": [
          "id",
          "connection_id",
          "amount",
          "address"
        ],
        "properties": {
          "address": {
            "type": "string",
            "description": "Address or script associated with the UTXO (any network/format)."
          },
          "amount": {
            "type": "string",
            "description": "Amount in the UTXO asset's native accounting units."
          },
          "asset_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssetId",
                "description": "Accounting asset identifier for this UTXO.\n\n`None` represents legacy BTC-only rows persisted before asset-aware canonical records."
              }
            ]
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Wallet/connection identifier (UUID v7, lowercase hyphenated)."
          },
          "id": {
            "type": "string",
            "description": "Outpoint formatted as `<txid>:<vout>` and serving as the primary identifier."
          },
          "linked_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Channel identifier this UTXO is associated with when known."
          },
          "origin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UtxoOrigin",
                "description": "Describes how this UTXO entered the wallet when known (sweep, close, etc.)."
              }
            ]
          },
          "script_pubkey": {
            "type": [
              "string",
              "null"
            ],
            "description": "Producing output `ScriptPubKey` as lowercase hex when fetched from the configured on-chain\nsource."
          },
          "source_asset": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OnchainAssetReference",
                "description": "Source-chain asset reference used to derive this UTXO.\n\n`None` represents legacy BTC-only rows persisted before source asset tracking."
              }
            ]
          }
        }
      },
      "UtxoOrigin": {
        "type": "string",
        "description": "Origin of a wallet UTXO for Lightning-aware reconciliation.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted canonical UTXO records.",
        "enum": [
          "ln_sweep",
          "closing_output",
          "penalty_income",
          "regular_payment",
          "change",
          "unknown"
        ]
      },
      "UtxoSpentFilter": {
        "type": "string",
        "description": "Filter for UTXO spent state when listing records.\nUsed to control whether a UTXO listing should return all UTXOs\nor only those that have not been spent (i.e., not consumed as\nan input in any Transaction record).",
        "enum": [
          "all",
          "unspent_only"
        ]
      },
      "ValidateConfigBody": {
        "type": "object",
        "description": "Payload for validating a connection configuration.",
        "required": [
          "configuration"
        ],
        "properties": {
          "configuration": {}
        }
      },
      "ValuationExcludedAsset": {
        "type": "object",
        "description": "Records an asset excluded from a valuation (fiat or BTC) with a human-readable reason.\nShared across balance sheet and portfolio summary reports so both use the same excluded-asset\nrepresentation.",
        "required": [
          "asset_id",
          "asset",
          "reason"
        ],
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/ReportAssetDisplay",
            "description": "Asset display metadata for the excluded asset."
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Identifier of the asset that could not be converted."
          },
          "reason": {
            "type": "string",
            "description": "Human-readable reason the conversion was skipped."
          }
        }
      },
      "ValuationPolicy": {
        "oneOf": [
          {
            "type": "object",
            "description": "Asset is already denominated in native fiat units.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "native_fiat"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Asset is valued at a fixed USD peg ratio.",
            "required": [
              "ratio",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "usd_peg"
                ]
              },
              "ratio": {
                "type": "string",
                "description": "USD units per one native asset unit."
              }
            }
          },
          {
            "type": "object",
            "description": "Asset requires market-rate lookup.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "rate_lookup"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Asset is valued through another rate-lookup asset at a fixed 1:1 base-unit ratio.",
            "required": [
              "base",
              "kind"
            ],
            "properties": {
              "base": {
                "$ref": "#/components/schemas/AssetCode",
                "description": "Canonical asset code whose rates should price this asset."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "rate_alias"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Asset has no supported valuation path.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "unsupported"
                ]
              }
            }
          }
        ],
        "description": "Valuation behavior for an asset."
      },
      "Withdrawal": {
        "type": "object",
        "description": "Canonical withdrawal payload capturing outbound fiat or bitcoin transfers from a managed wallet.",
        "required": [
          "id",
          "connection_id",
          "timestamp",
          "amount",
          "asset_id"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount stored at the native precision of `asset_id`."
          },
          "asset_id": {
            "$ref": "#/components/schemas/AssetId",
            "description": "Asset identifier derived from the `assets` crate."
          },
          "btc_destination": {
            "type": [
              "string",
              "null"
            ],
            "description": "On-chain address or LN payment hash; equality-based secondary index."
          },
          "btc_txid": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional on-chain transaction id (lowercase 64-char hex)."
          },
          "btc_vout": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Optional on-chain output index within the transaction (0..=65535).",
            "minimum": 0
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection identifier (UUID v7, lowercase hyphenated)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional human-readable description or memo associated with the withdrawal."
          },
          "fee": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional fee in the same asset using the native precision of `asset_id`."
          },
          "id": {
            "type": "string",
            "description": "Opaque external identifier from the source system."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Event timestamp expressed in whole seconds."
          },
          "transfer_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional source-provided asset-agnostic transfer identity for linking a\nmanaged withdrawal and deposit that represent the same external movement."
          }
        }
      },
      "WorkspaceId": {
        "type": "string",
        "format": "uuid",
        "description": "Canonical identifier backing every workspace record persisted by the module."
      },
      "WorkspaceInviteAccess": {
        "type": "string",
        "description": "Access levels granted by a workspace invite.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted [`WorkspaceInviteRecord`] values.",
        "enum": [
          "admin",
          "read",
          "read_write"
        ]
      },
      "WorkspaceInviteId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique invite identifier scoped under a workspace."
      },
      "WorkspaceInviteProfiles": {
        "oneOf": [
          {
            "type": "string",
            "description": "Grants apply to all profiles in the workspace.",
            "enum": [
              "all"
            ]
          },
          {
            "type": "object",
            "description": "Grants apply to the selected profiles only.",
            "required": [
              "some"
            ],
            "properties": {
              "some": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProfileId"
                },
                "description": "Grants apply to the selected profiles only."
              }
            }
          }
        ],
        "description": "Profile selection associated with an invite.\nNew variants must be appended to the end of this enum. Reordering variants or inserting a new\nvariant before the end breaks bincode decoding of persisted [`WorkspaceInviteRecord`] values."
      },
      "WorkspaceInviteStatus": {
        "type": "string",
        "description": "Computed invite status derived from timestamp fields.",
        "enum": [
          "pending",
          "revoked",
          "redeemed",
          "expired"
        ]
      },
      "WorkspaceInviteView": {
        "type": "object",
        "description": "API-safe representation of a workspace invite.",
        "required": [
          "id",
          "workspace_id",
          "invited_email",
          "access",
          "profiles",
          "status",
          "created_at",
          "expires_at"
        ],
        "properties": {
          "access": {
            "$ref": "#/components/schemas/WorkspaceInviteAccess",
            "description": "Access level granted by the invite."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the invite was created."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the invite expires."
          },
          "id": {
            "$ref": "#/components/schemas/WorkspaceInviteId",
            "description": "Invite identifier."
          },
          "invited_email": {
            "type": "string",
            "description": "Normalized invitee email captured for display."
          },
          "profiles": {
            "$ref": "#/components/schemas/WorkspaceInviteProfiles",
            "description": "Profile selection bound to the invite."
          },
          "redeemed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the invite was redeemed."
          },
          "redeemed_subject_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubjectId",
                "description": "Subject that redeemed the invite."
              }
            ]
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the invite was revoked."
          },
          "status": {
            "$ref": "#/components/schemas/WorkspaceInviteStatus",
            "description": "Derived status for the invite."
          },
          "workspace_id": {
            "$ref": "#/components/schemas/WorkspaceId",
            "description": "Workspace to which the invite grants access."
          }
        }
      },
      "WorkspaceMemberView": {
        "type": "object",
        "description": "Access policy view for a workspace member.\n# Examples\n```\nuse clams_engine_protocol::{\nSubjectId, WorkspaceInviteAccess, WorkspaceInviteProfiles, WorkspaceMemberView,\n};\nuse uuid::Uuid;\nlet subject_id = SubjectId::from_namespaced(&Uuid::NAMESPACE_URL, b\"member\");\nlet view = WorkspaceMemberView {\nsubject_id,\naccess: WorkspaceInviteAccess::Read,\nprofiles: WorkspaceInviteProfiles::All,\n};\nassert!(matches!(view.access, WorkspaceInviteAccess::Read));\n```",
        "required": [
          "subject_id",
          "access",
          "profiles"
        ],
        "properties": {
          "access": {
            "$ref": "#/components/schemas/WorkspaceInviteAccess",
            "description": "Effective access level for the member."
          },
          "profiles": {
            "$ref": "#/components/schemas/WorkspaceInviteProfiles",
            "description": "Effective profile selection for the member."
          },
          "subject_id": {
            "$ref": "#/components/schemas/SubjectId",
            "description": "Subject identifier for the member."
          }
        }
      },
      "WorkspaceRecord": {
        "type": "object",
        "description": "Canonical workspace record.",
        "required": [
          "id",
          "label",
          "creator_subject_id"
        ],
        "properties": {
          "creator_subject_id": {
            "$ref": "#/components/schemas/SubjectId",
            "description": "Subject that created the workspace (UUID v5).\n\nThis identifier is retained for audit purposes only and is not used for authorization."
          },
          "id": {
            "$ref": "#/components/schemas/WorkspaceId",
            "description": "Server-assigned UUID v7 identifier for the workspace."
          },
          "label": {
            "type": "string",
            "description": "Human-readable label associated with the workspace."
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Health",
      "description": "Health checks"
    },
    {
      "name": "Feedback",
      "description": "Support feedback"
    },
    {
      "name": "Workspaces",
      "description": "Workspace management"
    },
    {
      "name": "Workspace Invites",
      "description": "Workspace invite management"
    },
    {
      "name": "Workspace Members",
      "description": "Workspace member management"
    },
    {
      "name": "Profiles",
      "description": "Profile management"
    },
    {
      "name": "Connections",
      "description": "Connection management"
    },
    {
      "name": "Assets",
      "description": "Asset catalog"
    },
    {
      "name": "Accounts",
      "description": "Account management"
    },
    {
      "name": "Operations",
      "description": "Async operations"
    },
    {
      "name": "Settings",
      "description": "User and profile settings"
    },
    {
      "name": "Chain Sources",
      "description": "Chain source management"
    },
    {
      "name": "Onchain",
      "description": "Onchain sources"
    },
    {
      "name": "Records",
      "description": "Canonical records"
    },
    {
      "name": "Metadata",
      "description": "Metadata records and tags"
    },
    {
      "name": "Journals",
      "description": "Journal processing"
    },
    {
      "name": "Reports",
      "description": "Report generation"
    },
    {
      "name": "Notifications",
      "description": "Server-sent notifications stream"
    }
  ]
}
