{
  "openapi": "3.0.0",
  "paths": {
    "/v3/auth/login": {
      "post": {
        "description": "A profile with an enrolled WebAuthn factor gets a webauthn_required outcome (no cookie) and completes the login at POST auth/login/webauthn; an enrolled TOTP factor gets a totp_required outcome and completes at POST auth/login/totp. When the tenant requires a second factor the profile has not enrolled, the login sets the cookie and answers two_factor_enrollment_required: the session reaches factor enrollment only until a factor is enrolled.",
        "operationId": "postAuthLogin",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/SessionUserDto"
                            },
                            {
                              "$ref": "#/components/schemas/WebAuthnChallengeResponseDto"
                            },
                            {
                              "$ref": "#/components/schemas/TotpChallengeResponseDto"
                            },
                            {
                              "$ref": "#/components/schemas/TwoFactorEnrollmentRequiredResponseDto"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Authenticate a customer profile with loginName + password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/login": {
      "post": {
        "description": "A profile with an enrolled WebAuthn factor gets a webauthn_required outcome (no cookie) and completes the login at POST auth/admin/login/webauthn; an enrolled TOTP factor gets a totp_required outcome and completes at POST auth/admin/login/totp. When the tenant requires a second factor the profile has not enrolled, the login sets the cookie and answers two_factor_enrollment_required: the session reaches factor enrollment only until a factor is enrolled.",
        "operationId": "postAuthAdminLogin",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/SessionUserDto"
                            },
                            {
                              "$ref": "#/components/schemas/WebAuthnChallengeResponseDto"
                            },
                            {
                              "$ref": "#/components/schemas/TotpChallengeResponseDto"
                            },
                            {
                              "$ref": "#/components/schemas/TwoFactorEnrollmentRequiredResponseDto"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Authenticate an admin profile with loginName + password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/demo-link": {
      "post": {
        "description": "Only on a public demo tenant. An unknown, expired or ended link, and any tenant that is not a public demo, all answer 410 demo.link.unavailable.",
        "operationId": "postAuthAdminDemoLink",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoLinkRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone — the resource existed but passed its deadline and can no longer be acted on",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Sign in from a public demo invite link",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/demo-link": {
      "post": {
        "description": "Only on a public demo tenant. An unknown, expired or ended link, and any tenant that is not a public demo, all answer 410 demo.link.unavailable.",
        "operationId": "postAuthDemoLink",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoLinkRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone — the resource existed but passed its deadline and can no longer be acted on",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Sign in to the customer app from a public demo invite link",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/login/webauthn": {
      "post": {
        "operationId": "postAuthLoginWebauthn",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebAuthnLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete a customer login with a WebAuthn assertion",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/login/webauthn": {
      "post": {
        "operationId": "postAuthAdminLoginWebauthn",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebAuthnLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete an admin login with a WebAuthn assertion",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/login/mobile-device": {
      "post": {
        "description": "The EBQ app names the device it paired as and gets a passkey challenge that requires user verification, in the same webauthn_required shape as a password login with a security key; it completes at POST auth/login/mobile-device/webauthn. A device nothing is paired under answers 404 iam.mobile_device.not_paired, so the app can send the customer to pair again. A customer who may not sign in at all is refused here as at the finish: 403 iam.auth.profile_blocked or iam.auth.profile_not_active, 401 for a dormant or pending profile.",
        "operationId": "postAuthLoginMobileDevice",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDeviceLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WebAuthnChallengeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Start the paired app’s passwordless sign-in",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/login/mobile-device/webauthn": {
      "post": {
        "description": "Only the paired phone’s passkey completes it: a security key enrolled on the web, a wrong, replayed or another customer’s assertion, and a phone unpaired meanwhile all answer the same 401 iam.auth.login_rejected. The session is returned in the body as a Bearer token and counts as the paired phone’s for the approval routes. No cookie. expiresIn is the seconds the session has left; the app signs in again before it runs out.",
        "operationId": "postAuthLoginMobileDeviceWebauthn",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebAuthnLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDeviceSessionDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete the paired app’s passwordless sign-in with its passkey assertion",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/login/totp": {
      "post": {
        "operationId": "postAuthLoginTotp",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete a customer login with a TOTP code",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/login/totp": {
      "post": {
        "operationId": "postAuthAdminLoginTotp",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete an admin login with a TOTP code",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/login/recovery-code": {
      "post": {
        "operationId": "postAuthLoginRecoveryCode",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoveryCodeLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete a customer login with a single-use recovery code",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/login/recovery-code": {
      "post": {
        "operationId": "postAuthAdminLoginRecoveryCode",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoveryCodeLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionUserDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete an admin login with a single-use recovery code",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/logout": {
      "post": {
        "operationId": "postAuthLogout",
        "parameters": [],
        "responses": {
          "204": {
            "description": "Session terminated and cookie cleared"
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Terminate the current session and clear the cookie",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/me": {
      "get": {
        "operationId": "getAuthMe",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Return the current authenticated session for a customer profile",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/me": {
      "get": {
        "operationId": "getAuthAdminMe",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Return the current authenticated session for an admin profile",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/step-up": {
      "post": {
        "description": "Rotates the session cookie.",
        "operationId": "postAuthStepUp",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StepUpRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Password re-verified; rotated cookie set"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Re-verify the password factor on the current session",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/change-password": {
      "post": {
        "operationId": "postAuthChangePassword",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Password changed; every other session for the user is revoked and the rotated session cookie is set"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Change the current user's password. Every other session is revoked; the calling session survives via a rotated cookie.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/activation/check": {
      "post": {
        "description": "Answers when the link expires, without using it. Refuses exactly as activation does: 422 `iam.invitation.activation_failed` for an invalid, expired, used or superseded link, 409 `iam.invitation.already_activated` when a password is already set.",
        "operationId": "postAuthActivationCheck",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivationLinkDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ActivationLinkResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Check an invitation activation link before showing the password form",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/activation": {
      "post": {
        "description": "422 carries `iam.invitation.activation_failed`: the link is invalid, expired, or superseded, or the account cannot be activated — deliberately indistinguishable. 409 carries `iam.invitation.already_activated`: a password is already set; go to login. 400 carries `iam.auth.password_policy_violation` on a valid link: the password is under 12 characters or contains the username or email; the link stays usable.",
        "operationId": "postAuthActivation",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationActivationDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Password set; the user can now log in."
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set the first password using an invitation activation code",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/password-reset/request": {
      "post": {
        "operationId": "postAuthPasswordResetRequest",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetRequestDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Reset email sent, or silently skipped for an unknown address",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Request a password reset code using an email or username",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/password-reset/complete": {
      "post": {
        "operationId": "postAuthPasswordResetComplete",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetCompleteDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password updated",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Complete a password reset using the one-time code",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/signup/form": {
      "get": {
        "operationId": "getAuthSignupForm",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupFormResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "The tenant's sign-up form definition.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/signup": {
      "post": {
        "description": "Every valid submission gets the same 201 without a continuation cookie. Account creation and email delivery run after the response. Follow-up steps require the emailed single-use sign-up link. 409 carries `iam.signup.username_taken`. 422 carries `iam.signup.validation_failed` (per-field map in `details.fieldErrors`), `iam.signup.contact_unverified`, or `iam.signup.bot_challenge_failed`.",
        "operationId": "postAuthSignup",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupSubmitDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupSubmitResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Submit the sign-up form.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/signup/gdpr-notice": {
      "get": {
        "operationId": "getAuthSignupGdprNotice",
        "parameters": [
          {
            "name": "locale",
            "required": false,
            "in": "query",
            "schema": {
              "example": "nl_NL",
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupGdprNoticeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "The tenant's GDPR notice for the sign-up page.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/signup/terms": {
      "get": {
        "operationId": "getAuthSignupTerms",
        "parameters": [
          {
            "name": "locale",
            "required": false,
            "in": "query",
            "schema": {
              "example": "nl_NL",
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupTermsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "The tenant's terms and conditions for the sign-up page.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/signup/verification": {
      "post": {
        "operationId": "postAuthSignupVerification",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupVerificationRequestDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupVerificationChallengeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Email a sign-up verification code to an address.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/signup/verification/verify": {
      "post": {
        "operationId": "postAuthSignupVerificationVerify",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupVerificationVerifyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupVerificationProofDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Verify a sign-up verification code.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/view-as": {
      "post": {
        "operationId": "postAuthAdminViewAs",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ViewAsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ViewAsStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start a read-only support view of a customer or admin profile",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/view-as/exit": {
      "post": {
        "operationId": "postAuthViewAsExit",
        "parameters": [],
        "responses": {
          "204": {
            "description": "View ended and marker cleared"
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "End the support view and return to the root session",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/admin/view-as/handoff": {
      "post": {
        "operationId": "postAuthAdminViewAsHandoff",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ViewPassTicketDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Issue a one-time ticket that opens the customer view in the customer app",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/auth/view-as/redeem": {
      "post": {
        "operationId": "postAuthViewAsRedeem",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ViewPassTicketDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Pass set for this host"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Open the support view in the customer app with a one-time ticket",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v3/admin/classes": {
      "get": {
        "operationId": "getAdminClasses",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "id",
                "-id"
              ],
              "default": "name"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AdminClassResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the tenant's admin classes with their member profile ids (paginated)",
        "tags": [
          "Admin Classes"
        ]
      },
      "post": {
        "operationId": "postAdminClasses",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdminClassDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminClassDetailResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create an admin class with an initial action set",
        "tags": [
          "Admin Classes"
        ]
      }
    },
    "/v3/admin/classes/{adminClassId}": {
      "get": {
        "operationId": "getAdminClassesByAdminClassId",
        "parameters": [
          {
            "name": "adminClassId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminClassDetailResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one admin class with its granted actions and member profile ids",
        "tags": [
          "Admin Classes"
        ]
      },
      "put": {
        "operationId": "putAdminClassesByAdminClassId",
        "parameters": [
          {
            "name": "adminClassId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdminClassDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Admin class updated."
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update an admin class's name, description, and whole action set",
        "tags": [
          "Admin Classes"
        ]
      },
      "delete": {
        "operationId": "deleteAdminClassesByAdminClassId",
        "parameters": [
          {
            "name": "adminClassId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Class and its action grants deleted"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete an admin class that no profile belongs to",
        "tags": [
          "Admin Classes"
        ]
      }
    },
    "/v3/admin/classes/{adminClassId}/profiles/{profileId}": {
      "post": {
        "description": "A profile belongs to at most one admin class. Assigning a profile that is already in another class moves it: its previous membership is replaced. Only an admin profile can join a class, so a customer answers 400.",
        "operationId": "postAdminClassesByAdminClassIdProfilesByProfileId",
        "parameters": [
          {
            "name": "adminClassId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Profile assigned to the class (idempotent)"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Assign a profile to an admin class",
        "tags": [
          "Admin Classes"
        ]
      },
      "delete": {
        "description": "Removing a profile the class does not hold answers 404, so a bulk-removing client can report the already-removed membership as failed.",
        "operationId": "deleteAdminClassesByAdminClassIdProfilesByProfileId",
        "parameters": [
          {
            "name": "adminClassId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Membership removed"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove a profile from an admin class",
        "tags": [
          "Admin Classes"
        ]
      }
    },
    "/v3/admin/classes/{adminClassId}/actions/{actionKey}": {
      "post": {
        "operationId": "postAdminClassesByAdminClassIdActionsByActionKey",
        "parameters": [
          {
            "name": "adminClassId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "actionKey",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Action granted (idempotent)"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Grant an action to an admin class",
        "tags": [
          "Admin Classes"
        ]
      },
      "delete": {
        "operationId": "deleteAdminClassesByAdminClassIdActionsByActionKey",
        "parameters": [
          {
            "name": "adminClassId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "actionKey",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Action revoked (idempotent)"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Revoke an action from an admin class",
        "tags": [
          "Admin Classes"
        ]
      }
    },
    "/v3/admin/system-logs": {
      "get": {
        "operationId": "getAdminSystemLogs",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-loggedAt",
                "loggedAt"
              ],
              "default": "-loggedAt"
            },
            "description": "Order by when the entry was logged. A leading `-` is newest first"
          },
          {
            "name": "action",
            "required": false,
            "in": "query",
            "description": "action category: eq | action[in|eq|neq|nin]=… over 42 known categories",
            "schema": {}
          },
          {
            "name": "actorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Only entries performed by this profile"
          },
          {
            "name": "occurredAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "occurredAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SystemLogSummaryDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List system log entries (admin)",
        "tags": [
          "System Log"
        ]
      }
    },
    "/v3/admin/system-logs/subjects": {
      "get": {
        "operationId": "getAdminSystemLogsSubjects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the information log subjects this admin may filter by",
        "tags": [
          "System Log"
        ]
      }
    },
    "/v3/admin/system-logs/{id}": {
      "get": {
        "operationId": "getAdminSystemLogsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SystemLogRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one system log entry (admin)",
        "tags": [
          "System Log"
        ]
      }
    },
    "/v3/admin/registration-requests": {
      "get": {
        "description": "Every self-signup, newest first unless sorted otherwise. Approved and cancelled requests stay listed; only the status filter narrows. Rows carry the KYC review status and rejection tags when the tenant runs a KYC provider.",
        "operationId": "getAdminRegistrationRequests",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-createdAt",
                "createdAt",
                "status",
                "-status"
              ]
            },
            "description": "Field to order by; a leading `-` reverses it. `status` orders by queue priority (pending, approved, cancelled), not alphabetically."
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Substring on applicant name, username, or email; exact on the request id"
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive upper bound on the submission date"
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive lower bound on the submission date"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "cancelled"
              ]
            },
            "description": "Operator filter, e.g. status[eq]=pending or status[in]=pending,approved"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RegistrationRequestListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List registration requests (admin review queue)",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/admin/registration-requests/export.csv": {
      "get": {
        "description": "Same filters as the list, always over the full filtered set, newest first — pagination and sort do not apply. The export is always queued as a csv_export operation and the response is 202 with its row (see the import/export operations routes). An Idempotency-Key header dedupes it: a reused key answers with the operation it named, for the same filters only; without one every call queues a new operation.",
        "operationId": "getAdminRegistrationRequestsExportCsv",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Substring on applicant name, username, or email; exact on the request id"
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive upper bound on the submission date"
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive lower bound on the submission date"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "cancelled"
              ]
            },
            "description": "Operator filter, e.g. status[eq]=pending or status[in]=pending,approved"
          }
        ],
        "responses": {
          "202": {
            "description": "The export was queued; the operation row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the registration queue as CSV",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/admin/registration-requests/{id}": {
      "get": {
        "description": "The full review view: the request with everything the applicant submitted, read from the linked profile. Any admin who can view profiles (profile.view) reads it; deciding it needs users.approve_registration. A cancelled request stays readable — the profile block is null and the snapshot plus cancellation reason remain. KYC standing (status, level, rejection summary) is present only when the tenant runs a KYC provider.",
        "operationId": "getAdminRegistrationRequestsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RegistrationRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one registration request",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/admin/registration-requests/{id}/approve": {
      "post": {
        "description": "Activates the applicant profile and marks the request approved, atomically. Only a pending request can be approved: an already-decided one refuses with 409 and changes nothing, as does a request whose profile is gone. The applicant is welcomed by email, best effort — a mail outage never unwinds the approval.",
        "operationId": "postAdminRegistrationRequestsByIdApprove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RegistrationRequestApprovalDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Approve a pending registration request",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/admin/registration-requests/{id}/cancel": {
      "post": {
        "description": "Moves the applicant profile to cancelled and retains its records and request evidence without expiry. Retires applicant codes, releases email and username after the signup cooldown, and notifies the applicant. Only a pending request cancels; one whose applicant already holds accounts, cards, or non-consent files refuses with 422 and changes nothing.",
        "operationId": "postAdminRegistrationRequestsByIdCancel",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelRegistrationRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RegistrationRequestCancellationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Cancel a pending registration request",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/admin/registration-requests/{id}/resend-verification": {
      "post": {
        "description": "Mints a fresh verification link and emails it to the applicant profile. Only once the send lands does the earlier link stop working; a send that fails or is switched off answers 502 and leaves the existing link untouched, so retrying is always safe. Only a pending request whose profile is still pending qualifies: anything else refuses with 409. If the re-send cannot be audited, nothing is sent and it answers 503.",
        "operationId": "postAdminRegistrationRequestsByIdResendVerification",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RegistrationRequestResendDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Re-send the identity-verification link to a pending applicant",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/admin/registration-requests/{id}/resend-signup-link": {
      "post": {
        "description": "Emails a fresh single-use link for the sign-up follow-up steps, including tenants without Sumsub. Only pending, unblocked applicants qualify. A delivered link revokes earlier sign-up links and grants; failed or disabled delivery answers 502 and leaves existing access working. If the re-send cannot be audited, nothing is sent and it answers 503.",
        "operationId": "postAdminRegistrationRequestsByIdResendSignupLink",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RegistrationRequestResendDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Re-send the sign-up continuation link to a pending applicant",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/admin/registration-requests/{id}/verification-link": {
      "post": {
        "description": "Mints a fresh verification link and returns its URL for the admin to pass on by hand when the email never arrives. Nothing is superseded: the applicant's existing link and any live session keep working. The URL carries the code, reusable until `expiresAt`, and is never audited or logged. Only a pending request whose profile is still pending qualifies: anything else refuses with 409. A tenant with no customer app URL answers 502.",
        "operationId": "postAdminRegistrationRequestsByIdVerificationLink",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RegistrationRequestVerificationLinkDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Reveal a fresh identity-verification link for a pending applicant",
        "tags": [
          "Registration Requests"
        ]
      }
    },
    "/v3/import-export/operations": {
      "get": {
        "description": "The caller's own operations from the last 30 days, newest first, with lifecycle state and progress. Nobody sees another user's operations.",
        "operationId": "getImportExportOperations",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=… of: pending | in_progress | failed | finished",
            "schema": {}
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "eq | type[in|eq|neq|nin]=… of: csv_import | csv_export",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ImportExportOperationDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List my async import/export operations",
        "tags": [
          "Import/Export Operations"
        ]
      }
    },
    "/v3/import-export/operations/{id}/download": {
      "get": {
        "description": "The result file the run produced. Only the operation's own submitter can retrieve it. An operation that has not finished has no artifact yet.",
        "operationId": "getImportExportOperationsByIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a finished operation's output artifact",
        "tags": [
          "Import/Export Operations"
        ]
      }
    },
    "/v3/import-export/operations/{id}/errors/download": {
      "get": {
        "description": "The rows the run refused, one line per row with its reason. Only an import has one, and an import whose rows all succeeded has no error file and reads as not found.",
        "operationId": "getImportExportOperationsByIdErrorsDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a finished operation's error CSV",
        "tags": [
          "Import/Export Operations"
        ]
      }
    },
    "/v3/import-export/operations/{id}/input/download": {
      "get": {
        "description": "The file as the customer uploaded it. Only an import has one.",
        "operationId": "getImportExportOperationsByIdInputDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a finished import's uploaded file",
        "tags": [
          "Import/Export Operations"
        ]
      }
    },
    "/v3/import-export/operations/{id}/input/preview": {
      "get": {
        "description": "The rows of the file the caller uploaded, a page at a time in file order. The header row is the first row of the first page. Cells are returned as written, unparsed.",
        "operationId": "getImportExportOperationsByIdInputPreview",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "example": [
                            [
                              "id",
                              "status"
                            ],
                            [
                              "1042",
                              "approved"
                            ]
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview a finished import operation's uploaded input",
        "tags": [
          "Import/Export Operations"
        ]
      }
    },
    "/v3/import-export/operations/{id}/result/preview": {
      "get": {
        "description": "The rows of the file the run produced, a page at a time in file order, the same content the download returns. The header row is the first row of the first page. Cells are returned as written, unparsed. An operation that has not finished has no result yet.",
        "operationId": "getImportExportOperationsByIdResultPreview",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "example": [
                            [
                              "Number",
                              "Currency",
                              "Balance"
                            ],
                            [
                              "NL01ABCD0123456789",
                              "EUR",
                              "1000.00"
                            ]
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview a finished operation's produced file",
        "tags": [
          "Import/Export Operations"
        ]
      }
    },
    "/v3/profiles/me/files": {
      "get": {
        "operationId": "getProfilesMeFiles",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProfileFileDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's own profile files",
        "tags": [
          "Profile Files"
        ]
      },
      "post": {
        "description": "Returns no body: the caller already holds the file from the upload it just made. Refused with 400 when the profile's documents would pass the tenant storage limit.",
        "operationId": "postProfilesMeFiles",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachOwnProfileFileDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Attach an already uploaded file to the caller's own profile",
        "tags": [
          "Profile Files"
        ]
      }
    },
    "/v3/profiles/me/files/{fileId}": {
      "delete": {
        "description": "Refused when the tenant has disabled end-user file removal.",
        "operationId": "deleteProfilesMeFilesByFileId",
        "parameters": [
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove one of the caller's own profile files",
        "tags": [
          "Profile Files"
        ]
      }
    },
    "/v3/profiles/me/files/{fileId}/download": {
      "get": {
        "operationId": "getProfilesMeFilesByFileIdDownload",
        "parameters": [
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "disposition",
            "required": false,
            "in": "query",
            "schema": {
              "default": "attachment",
              "type": "string",
              "enum": [
                "attachment",
                "inline"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download one of the caller's own profile files",
        "tags": [
          "Profile Files"
        ]
      }
    },
    "/v3/profiles/{id}/files": {
      "get": {
        "description": "Returns 404 iam.profile.not_found for an unknown profile or root's profile hidden from the caller.",
        "operationId": "getProfilesByIdFiles",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProfileFileDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List a profile's files (admin)",
        "tags": [
          "Profile Files"
        ]
      },
      "post": {
        "description": "Returns no body: the caller already holds the file from the upload it just made. Refused with 400 when the profile's documents would pass the tenant storage limit.",
        "operationId": "postProfilesByIdFiles",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachProfileFileDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Attach an already uploaded file to a profile (admin)",
        "tags": [
          "Profile Files"
        ]
      }
    },
    "/v3/profiles/{id}/files/bulk-delete": {
      "post": {
        "description": "Deletes the chosen set of files, or all of them, and deletes the stored files. Exactly one of `fileIds` or `all: true` must be provided.",
        "operationId": "postProfilesByIdFilesBulkDelete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteProfileFilesDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Bulk-delete a profile's files (admin)",
        "tags": [
          "Profile Files"
        ]
      }
    },
    "/v3/profiles/{id}/files/{fileId}/download": {
      "get": {
        "operationId": "getProfilesByIdFilesByFileIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "disposition",
            "required": false,
            "in": "query",
            "schema": {
              "default": "attachment",
              "type": "string",
              "enum": [
                "attachment",
                "inline"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a profile's file (admin)",
        "tags": [
          "Profile Files"
        ]
      }
    },
    "/v3/profiles/{id}/files/{fileId}": {
      "delete": {
        "operationId": "deleteProfilesByIdFilesByFileId",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove a file from a profile (admin), deleting the stored file",
        "tags": [
          "Profile Files"
        ]
      }
    },
    "/v3/admin/two-factor-whitelist/ips": {
      "put": {
        "description": "Only root may change it. A profile skips the second factor at sign-in only when it is whitelisted itself and signs in from one of these addresses.",
        "operationId": "putAdminTwoFactorWhitelistIps",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorWhitelistIpsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorWhitelistIpsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Replace the MFA IP whitelist",
        "tags": [
          "Two-Factor Whitelist"
        ]
      }
    },
    "/v3/admin/two-factor-whitelist/profiles/{id}": {
      "put": {
        "description": "Only root may change it. On its own the entry skips nothing: the profile must also sign in from an address on the MFA IP whitelist.",
        "operationId": "putAdminTwoFactorWhitelistProfilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTwoFactorWhitelistProfileDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorWhitelistProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Put a profile on or off the MFA whitelist",
        "tags": [
          "Two-Factor Whitelist"
        ]
      }
    },
    "/v3/admin/push-settings": {
      "get": {
        "description": "Reports which FCM project and service account the stored credential belongs to. The key itself is never returned.",
        "operationId": "getAdminPushSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PushSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the tenant's push provider configuration",
        "tags": [
          "Push Settings"
        ]
      },
      "put": {
        "operationId": "putAdminPushSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePushSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PushSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Upload the Firebase service-account credential for push notifications",
        "tags": [
          "Push Settings"
        ]
      }
    },
    "/v3/admin/push-settings/test": {
      "post": {
        "description": "Mints an access token with the stored key and asks FCM to validate a message without delivering it. Reports the provider outcome; nothing is persisted.",
        "operationId": "postAdminPushSettingsTest",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TestPushSendResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Check the stored FCM credential against the provider",
        "tags": [
          "Push Settings"
        ]
      }
    },
    "/v3/profiles/field-registry": {
      "get": {
        "operationId": "getProfilesFieldRegistry",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FieldDefinitionResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List active field definitions for the caller's tenant",
        "tags": [
          "Profiles"
        ]
      },
      "post": {
        "operationId": "postProfilesFieldRegistry",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fieldKey": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]{0,63}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "string",
                      "number",
                      "boolean",
                      "date",
                      "enum",
                      "file_ref"
                    ]
                  },
                  "validationRules": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "category": {
                    "type": "string",
                    "minLength": 1
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "displayOrder": {
                    "type": "integer"
                  },
                  "editability": {
                    "type": "string",
                    "enum": [
                      "self_serve",
                      "admin_only",
                      "re_kyc_required"
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "admin_only",
                      "hidden"
                    ]
                  }
                },
                "required": [
                  "fieldKey",
                  "label",
                  "type",
                  "category",
                  "editability",
                  "visibility"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FieldDefinitionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a new field definition",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/field-registry/{fieldKey}": {
      "patch": {
        "operationId": "patchProfilesFieldRegistryByFieldKey",
        "parameters": [
          {
            "name": "fieldKey",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fieldKey": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "string",
                      "number",
                      "boolean",
                      "date",
                      "enum",
                      "file_ref"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "validationRules": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "category": {
                    "type": "string",
                    "minLength": 1
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "displayOrder": {
                    "type": "integer"
                  },
                  "editability": {
                    "type": "string",
                    "enum": [
                      "self_serve",
                      "admin_only",
                      "re_kyc_required"
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "admin_only",
                      "hidden"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FieldDefinitionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a field definition",
        "tags": [
          "Profiles"
        ]
      },
      "delete": {
        "operationId": "deleteProfilesFieldRegistryByFieldKey",
        "parameters": [
          {
            "name": "fieldKey",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FieldDefinitionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Deactivate a field definition (soft delete)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/sessions": {
      "get": {
        "operationId": "getProfilesMeSessions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProfileSessionDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's own active sessions",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/sessions/{id}": {
      "delete": {
        "description": "Revoking the current session signs the caller out (the session cookie is cleared). A missing, already-ended, or foreign session id answers 409.",
        "operationId": "deleteProfilesMeSessionsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Session id from the list route",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session revoked"
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Revoke one of the caller's own sessions",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/mobile-device/pairing/pair-code": {
      "post": {
        "description": "With the tenant's `mfa.device_registration.challenge_required` on, emails the caller a one-time code and answers its tokenId, deadline and masked address; off, answers `required: false`. 429 iam.mobile_device.pair_code_too_soon inside the tenant’s resend interval since the last code; 429 iam.mobile_device.pair_code_locked for 15 minutes after too many wrong ones. 409 iam.mobile_device.already_registered while a device is paired. 503 iam.mobile_device.pair_code_undelivered when the email could not be sent, including when email is off for the tenant.",
        "operationId": "postProfilesMeMobileDevicePairingPairCode",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDeviceChallengeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Ask for the code that starting a pairing needs",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/mobile-device/pairing": {
      "post": {
        "description": "Mints a one-time pairing code for the page to show as a QR, valid for the tenant’s challenge expiry. The app redeems it with no session. A pairing already under way is cancelled first. With the tenant's pair code on, the body carries the emailed code and its tokenId; a missing, wrong or stale code answers 422 (iam.mobile_device.pair_code_required, _invalid, _expired) and three wrong ones, over any codes sent, lock it (429 iam.mobile_device.pair_code_locked). A start repeated inside the interval is refused per caller (429 common.rate_limit.exceeded, Retry-After). Refused with 409 iam.mobile_device.already_registered while a device is paired: unpair it first. Customer profiles only.",
        "operationId": "postProfilesMeMobileDevicePairing",
        "parameters": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDeviceCodeDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDevicePairingStartedDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start pairing a phone",
        "tags": [
          "Profiles"
        ]
      },
      "get": {
        "description": "The newest pairing the caller started, whatever its state, for a page that reloads. `data` is null when none was ever started. Never carries the pairing or confirmation code.",
        "operationId": "getProfilesMeMobileDevicePairing",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDevicePairingDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the caller's latest pairing",
        "tags": [
          "Profiles"
        ]
      },
      "delete": {
        "description": "Ends the pairing under way; a passkey the app already enrolled is removed again, and the app learns the outcome on its next check. 404 iam.mobile_device.pairing_not_found when nothing is under way.",
        "operationId": "deleteProfilesMeMobileDevicePairing",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDevicePairingOutcomeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Cancel the caller's pairing",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/mobile-device/pairing/stream": {
      "get": {
        "description": "Server-sent events. Each `mobile-device-pairing` message carries one step: pending, scanned, awaiting_confirmation (enter the code the phone shows), paired, failed, cancelled or expired. Live only, nothing is replayed: read the pairing first. A `keepalive` message goes out every 15 seconds; the connection closes after 30 minutes or when the session is revoked. Reconnect either way.",
        "operationId": "getProfilesMeMobileDevicePairingStream",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Event stream; each message is one pairing step",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Stream the caller’s pairing steps",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/mobile-device/pairing/confirm": {
      "post": {
        "description": "Pairs the device. The response carries the nine recovery codes issued with it; they are never returned again. 422 iam.mobile_device.pairing_code_invalid for a wrong code, with the attempts left in `details`. The fifth wrong code locks confirming for 15 minutes (429 iam.mobile_device.pairing_confirmation_locked, with Retry-After); the pairing still takes the right code afterwards unless it expires first. 409 iam.mobile_device.pairing_state_conflict when nothing is waiting for a code, 410 iam.mobile_device.pairing_expired when the pairing ran out of time.",
        "operationId": "postProfilesMeMobileDevicePairingConfirm",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmMobileDevicePairingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PairedMobileDeviceDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone — the resource existed but passed its deadline and can no longer be acted on",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Confirm the pairing with the code the phone shows",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/mobile-device": {
      "get": {
        "description": "The device the caller paired for EBQ approvals: its id, name and when pairing finished (`registeredAt`). `data` is null when no device is paired. The push token is never returned.",
        "operationId": "getProfilesMeMobileDevice",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDeviceDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get the caller's paired device",
        "tags": [
          "Profiles"
        ]
      },
      "put": {
        "description": "Replaces the push token of the caller’s paired device so approval pushes reach the latest one. Only the paired phone refreshes it: any other session, or one with no device paired, answers 403 iam.mobile_device.inactive, and a different installation id answers 409. Customer profiles only.",
        "operationId": "putProfilesMeMobileDevice",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshPushTokenDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDeviceDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Refresh the caller's device push token",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/mobile-device/unpair-code": {
      "post": {
        "description": "With the tenant's `mfa.device_unenrollment.challenge_required` on, emails the caller a one-time code and answers its tokenId, deadline and masked address; off, answers `required: false`. 429 iam.mobile_device.unpair_code_too_soon inside the tenant’s resend interval since the last code; 429 iam.mobile_device.unpair_code_locked for 15 minutes after too many wrong ones. 404 iam.mobile_device.not_paired when nothing is paired. 503 iam.mobile_device.unpair_code_undelivered when the email could not be sent, including when email is off for the tenant.",
        "operationId": "postProfilesMeMobileDeviceUnpairCode",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDeviceChallengeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start unpairing the caller's own device",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/mobile-device/unpair": {
      "post": {
        "description": "Removes the paired device's passkey and its record, as removing that key does, from any of the caller's sessions: a lost phone is unpaired from here. With the tenant's challenge on, the body carries the emailed code and its tokenId; a missing, wrong or stale code answers 422 (iam.mobile_device.unpair_code_required, _invalid, _expired) and three wrong ones lock it (iam.mobile_device.unpair_code_locked).",
        "operationId": "postProfilesMeMobileDeviceUnpair",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDeviceOwnUnpairDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Unpair the caller's own device",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/mobile-device-pairings/redeem": {
      "post": {
        "description": "Single use: answers the passkey creation options for the customer the code was minted for (discoverable credential, user verification required) and marks the pairing as scanned. A second redeem, an unknown code or an expired one answers the same 404 iam.mobile_device.pairing_not_found and reveals nothing.",
        "operationId": "postMobileDevicePairingsRedeem",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDevicePairingCodeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDevicePairingRedeemedDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Redeem a scanned pairing code",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/mobile-device-pairings/finish": {
      "post": {
        "description": "Checks the device’s hardware attestation and the passkey attestation, then answers the 6-digit code the app shows for the customer to type on the web. The device is paired only once the web confirms. Refusals end the pairing and remove the passkey: 422 iam.mobile_device.attestation_rejected (hardware attestation missing or refused), 409 iam.mobile_device.bound_to_another_customer, 400 iam.two_factor.webauthn_attestation_rejected. 409 iam.mobile_device.pairing_state_conflict when the code was not redeemed first or the pairing already ended. 503 iam.mobile_device.attestation_unavailable when the tenant has no app configured for the platform; the pairing waits and the same code works on a retry.",
        "operationId": "postMobileDevicePairingsFinish",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishMobileDevicePairingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDevicePairingFinishedDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Finish the pairing from the app",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/mobile-device-pairings/status": {
      "post": {
        "description": "The pairing’s status and, when it failed, why: the app polls this while the customer types the code on the web. 404 for an unknown code.",
        "operationId": "postMobileDevicePairingsStatus",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDevicePairingCodeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDevicePairingOutcomeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Check how the pairing stands",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/mobile-device-pairings/cancel": {
      "post": {
        "description": "Ends a pairing under way; a passkey already enrolled is removed again and the web page hears it. A pairing that already ended is answered as it stands.",
        "operationId": "postMobileDevicePairingsCancel",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDevicePairingCodeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDevicePairingOutcomeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Cancel the pairing from the app",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/password-reset-link": {
      "post": {
        "description": "Sends the reset-password email. The password and sessions stay as they are until the profile uses the link. A 409, 502 or 503 code `iam.profile.reset_link.<reason>` says why no email went out.",
        "operationId": "postProfilesByIdPasswordResetLink",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Reset link emailed"
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Email the profile a link to set a new password",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me": {
      "get": {
        "operationId": "getProfilesMe",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OpenProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get caller's own profile",
        "tags": [
          "Profiles"
        ]
      },
      "patch": {
        "operationId": "patchProfilesMe",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSelfProfileDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UserProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update the authenticated caller's own profile",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/admin/me": {
      "patch": {
        "operationId": "patchProfilesAdminMe",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update the authenticated admin's own profile (any admin, no permission needed)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/deletion-request": {
      "post": {
        "operationId": "postProfilesMeDeletionRequest",
        "parameters": [],
        "responses": {
          "204": {
            "description": "Deletion request accepted; requester and admins notified."
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Request deletion of the caller’s own profile (customer only)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/admins/export.csv": {
      "get": {
        "description": "Same filters and sort as the admin directory, always over the full filtered set — pagination doesn't apply. Customer profiles never appear, whatever the caller passes. The export is always queued as an operation and the response is 202 with its row. An Idempotency-Key header dedupes it: a reused key answers with the operation it named, for the same filters only.",
        "operationId": "getProfilesAdminsExportCsv",
        "parameters": [],
        "responses": {
          "202": {
            "description": "The export was queued; the operation row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the admin profile directory as CSV",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/admins/export.csv/async": {
      "post": {
        "description": "Takes the same filters and sort as the GET export. Returns the operation; the file appears on the import/export operations surface when the run finishes.",
        "operationId": "postProfilesAdminsExportCsvAsync",
        "parameters": [],
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Queue the admin profile export as an async operation",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/export.csv": {
      "get": {
        "description": "Same filters and sort as the profile directory, always over the full filtered set — pagination doesn't apply. Admin profiles never appear, whatever the caller passes. The export is always queued as an operation and the response is 202 with its row. An Idempotency-Key header dedupes it: a reused key answers with the operation it named, for the same filters only.",
        "operationId": "getProfilesExportCsv",
        "parameters": [],
        "responses": {
          "202": {
            "description": "The export was queued; the operation row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the customer profile directory as CSV",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/export.csv/async": {
      "post": {
        "description": "Takes the same filters and sort as the GET export. Returns the operation; the file appears on the import/export operations surface when the run finishes.",
        "operationId": "postProfilesExportCsvAsync",
        "parameters": [],
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Queue the customer profile export as an async operation",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/context": {
      "get": {
        "description": "Only `devices` carries data today: the profile's live sessions, or `unavailable: true` when they cannot be read. `logins` and `accounts` always answer `{ items: [], unavailable: true }`.",
        "operationId": "getProfilesByIdContext",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ProfileContextResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get profile context panels",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}": {
      "get": {
        "operationId": "getProfilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Closed profile\n\nOpen profile",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OpenProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get profile by ID (admin)",
        "tags": [
          "Profiles"
        ]
      },
      "patch": {
        "operationId": "patchProfilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a profile (admin only; externalId accepted)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles": {
      "get": {
        "operationId": "getProfiles",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "lastLoginAt",
                "-lastLoginAt",
                "lastName",
                "-lastName",
                "firstName",
                "-firstName",
                "email",
                "-email",
                "username",
                "-username",
                "companyName",
                "-companyName"
              ]
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "extras.*",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter on a profile registry field: extras.position=Manager"
          },
          {
            "name": "notInAdminClassId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Leave out profiles assigned to this admin class. Unassigned profiles stay"
          },
          {
            "name": "adminClassId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Narrow to profiles assigned to this admin class"
          },
          {
            "name": "userGroupId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Narrow to profiles assigned to this user group"
          },
          {
            "name": "isCorporate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Narrow to corporate (true) or personal (false) profiles"
          },
          {
            "name": "blocked",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Global lookup: substring on full name / email, exact on externalId"
          },
          {
            "name": "preferredLanguage",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "externalId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lastName",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "firstName",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ProfileSearchPageResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List / search profiles (admin)",
        "tags": [
          "Profiles"
        ]
      },
      "post": {
        "operationId": "postProfiles",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProfileDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Profile created. The envelope may carry top-level `messages` when the invitation email could not be dispatched (e.g. missing tenant customer app URL) — the profile still exists; repair with re-send invitation.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a profile (role-discriminated: user or admin)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/unblock": {
      "post": {
        "operationId": "postProfilesUnblock",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnblockProfilesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-id outcomes. One id’s refusal (unknown or closed) does not stop the others; an already-unblocked profile is a no-op outcome, not an error.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/UnblockProfileResultDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Clear the login-lockout block on the identified profiles",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/invitation": {
      "post": {
        "operationId": "postProfilesByIdInvitation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Invitation provisioned; email dispatched if configured.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ResendInvitationResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Re-send the account invitation (supersedes the previous link)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor": {
      "get": {
        "operationId": "getProfilesMeTwoFactor",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TwoFactorProviderDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get the caller's own two-factor providers",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/nudge": {
      "get": {
        "description": "The login reminder to enroll a second factor: armed until the caller dismisses it or enrolls one. Dismissal persists across sessions and devices.",
        "operationId": "getProfilesMeTwoFactorNudge",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorNudgeStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get the caller's own two-factor enrollment-nudge state",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/nudge/dismiss": {
      "post": {
        "description": "Silences the login reminder for the authenticated profile across sessions and devices. Repeating the call is a no-op; factor enrollment is unchanged.",
        "operationId": "postProfilesMeTwoFactorNudgeDismiss",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorNudgeStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Dismiss the caller's own two-factor enrollment nudge",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/nudge/rearm": {
      "post": {
        "description": "Clears a stored dismissal so the login reminder can show again. Idempotent: re-arming an already armed nudge succeeds unchanged. Enrollment state is never touched; while a factor stays enrolled, armed still reads false.",
        "operationId": "postProfilesMeTwoFactorNudgeRearm",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorNudgeStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Re-arm the caller's own two-factor enrollment nudge",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/totp/remove": {
      "post": {
        "description": "Needs the current code from the authenticator app, as v2 did; no recent sign-in is needed. 400 iam.two_factor.totp_code_invalid on a wrong code, leaving TOTP and the recovery codes in place. 403 iam.auth.profile_blocked once the identity provider locks the user after too many wrong codes. Removing it also voids any recovery codes and re-arms the login reminder. Without TOTP enrolled, answers the current list without checking the code. 409 iam.two_factor.last_factor_required when it is the last factor and the caller's role requires one.",
        "operationId": "postProfilesMeTwoFactorTotpRemove",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpRemovalDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TwoFactorProviderDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove the caller's own authenticator app",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/totp": {
      "post": {
        "operationId": "postProfilesMeTwoFactorTotp",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TotpEnrollmentStartDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start TOTP enrollment for the caller",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/totp/verify": {
      "post": {
        "description": "Activates the factor and answers with the two-factor state. Recovery codes are not part of this response; mint them with POST profiles/me/two-factor/recovery-codes.",
        "operationId": "postProfilesMeTwoFactorTotpVerify",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpEnrollmentConfirmDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Confirm TOTP enrollment with the first authenticator code",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/recovery-codes": {
      "post": {
        "description": "Voids every code the caller held and returns a fresh set; they are shown only here. Takes several seconds. 409 iam.two_factor.not_enrolled without an enrolled second factor. 401 iam.auth.session_stale unless a credential was verified in the last 5 minutes: re-verify through POST /v3/auth/step-up and retry. 429 on back-to-back calls. 503 iam.two_factor.recovery_codes_not_issued when the old set was voided but no new one came back; calling again is safe.",
        "operationId": "postProfilesMeTwoFactorRecoveryCodes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RecoveryCodesDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Mint the caller's recovery codes",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/webauthn": {
      "get": {
        "description": "Each key is individually addressable by id for removal. A key keeps the name given at enrollment (the verify call's tokenName); keys can't be renamed.",
        "operationId": "getProfilesMeTwoFactorWebauthn",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebauthnDeviceDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's enrolled security keys",
        "tags": [
          "Profiles"
        ]
      },
      "post": {
        "operationId": "postProfilesMeTwoFactorWebauthn",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WebauthnEnrollmentChallengeDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start WebAuthn enrollment for the caller",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/webauthn/{deviceId}": {
      "delete": {
        "description": "The other keys keep working. A key that was already removed elsewhere still returns the current state rather than an error. Needs a credential verified in the last 5 minutes: a staler session gets 401 iam.auth.session_stale, and the client re-verifies through POST /v3/auth/step-up before retrying. 409 iam.two_factor.last_factor_required when it is the last factor and the caller's role requires one.",
        "operationId": "deleteProfilesMeTwoFactorWebauthnByDeviceId",
        "parameters": [
          {
            "name": "deviceId",
            "required": true,
            "in": "path",
            "description": "The key id the list serves",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove one of the caller's enrolled security keys",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/two-factor/webauthn/verify": {
      "post": {
        "operationId": "postProfilesMeTwoFactorWebauthnVerify",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebauthnEnrollmentVerifyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Finish WebAuthn enrollment with the authenticator's response",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/two-factor": {
      "get": {
        "operationId": "getProfilesByIdTwoFactor",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get a profile's two-factor state (admin)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/two-factor/reset": {
      "post": {
        "description": "Needs a credential verified in the last 5 minutes: a staler session gets 401 iam.auth.session_stale, and the client re-verifies through POST /v3/auth/step-up before retrying. The operator may reset their own factors with the same recent credential check and required justification.",
        "operationId": "postProfilesByIdTwoFactorReset",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorResetDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Reset a selected two-factor provider (admin)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/two-factor/mobile-device": {
      "get": {
        "description": "The device the profile paired for EBQ approvals, so the operator can see whether there is one to unpair. `data` is null when no device is paired. The push token is never returned.",
        "operationId": "getProfilesByIdTwoFactorMobileDevice",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MobileDeviceDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get a profile's paired mobile device (admin)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/two-factor/mobile-device/unpair": {
      "post": {
        "description": "Removes the paired device's passkey and the device record, so approval pushes stop reaching it. Every other factor stays. The profile can pair a new device afterwards. Answers 404 iam.mobile_device.not_paired when no device is paired. Needs a credential verified in the last 5 minutes: a staler session gets 401 iam.auth.session_stale, and the client re-verifies through POST /v3/auth/step-up before retrying.",
        "operationId": "postProfilesByIdTwoFactorMobileDeviceUnpair",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDeviceUnpairDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Unpair a profile's mobile device (admin)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/two-factor/nudge/rearm": {
      "post": {
        "description": "Clears a stored dismissal so the login reminder can show again, e.g. after resetting the profile's factors. Idempotent: re-arming an already armed nudge succeeds unchanged. Enrollment state is never touched; while a factor stays enrolled, armed still reads false.",
        "operationId": "postProfilesByIdTwoFactorNudgeRearm",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TwoFactorNudgeStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Re-arm a profile's two-factor enrollment nudge (admin)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/account-types": {
      "get": {
        "operationId": "getAccountTypes",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "id",
                "-id",
                "corporate",
                "-corporate",
                "currency",
                "-currency",
                "depositInterestAnnualRate",
                "-depositInterestAnnualRate",
                "depositPayoutPeriod",
                "-depositPayoutPeriod"
              ],
              "default": "name"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AccountTypeResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List account types (paginated, sorted by name unless `sort` says otherwise)",
        "tags": [
          "Account Types"
        ]
      },
      "post": {
        "operationId": "postAccountTypes",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountTypeDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountTypeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create an account type",
        "tags": [
          "Account Types"
        ]
      }
    },
    "/v3/account-types/rails": {
      "get": {
        "operationId": "getAccountTypesRails",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the rail codes an account type carries settings for",
        "tags": [
          "Account Types"
        ]
      }
    },
    "/v3/account-types/{id}": {
      "get": {
        "operationId": "getAccountTypesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountTypeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get one account type",
        "tags": [
          "Account Types"
        ]
      },
      "patch": {
        "operationId": "patchAccountTypesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountTypeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountTypeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update an account type",
        "tags": [
          "Account Types"
        ]
      },
      "delete": {
        "operationId": "deleteAccountTypesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete an account type (refused while in use)",
        "tags": [
          "Account Types"
        ]
      }
    },
    "/v3/tenant/branding/{slot}": {
      "post": {
        "operationId": "postTenantBrandingBySlot",
        "parameters": [
          {
            "name": "slot",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "logo",
                "favicon",
                "login-logo"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "cropX": {
                    "type": "integer"
                  },
                  "cropY": {
                    "type": "integer"
                  },
                  "cropWidth": {
                    "type": "integer"
                  },
                  "cropHeight": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BrandingUploadResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Upload a branding asset (logo, favicon) for the current tenant",
        "tags": [
          "Tenant"
        ]
      },
      "delete": {
        "operationId": "deleteTenantBrandingBySlot",
        "parameters": [
          {
            "name": "slot",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "logo",
                "favicon",
                "login-logo"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The slot is now unset"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove the current tenant branding asset for a slot",
        "tags": [
          "Tenant"
        ]
      },
      "get": {
        "operationId": "getTenantBrandingBySlot",
        "parameters": [
          {
            "name": "v",
            "required": false,
            "in": "query",
            "description": "The content version from the stored URL",
            "schema": {}
          },
          {
            "name": "slot",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "logo",
                "favicon",
                "login-logo"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The asset bytes",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Serve the current tenant branding asset for a slot",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/tenant/branding/{slot}/crop": {
      "put": {
        "operationId": "putTenantBrandingBySlotCrop",
        "parameters": [
          {
            "name": "slot",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "logo",
                "favicon",
                "login-logo"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandingCropDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BrandingUploadResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Change the crop area of a cropped branding image",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/tenant/branding/{slot}/original": {
      "get": {
        "operationId": "getTenantBrandingBySlotOriginal",
        "parameters": [
          {
            "name": "v",
            "required": false,
            "in": "query",
            "description": "The content version from the stored URL",
            "schema": {}
          },
          {
            "name": "slot",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "logo",
                "favicon",
                "login-logo"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The asset bytes",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Serve the uncropped original of a cropped branding image",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/profiles/me/tans": {
      "get": {
        "operationId": "getProfilesMeTans",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TanOverviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "The caller's TANs and the transfer types that need one",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/me/tans/sms": {
      "post": {
        "description": "Refused with 422 profiles.tans.delivery_unavailable when the bank has no SMS provider or the caller has no number, and with 404 accounts.transfer.source_account_not_found for an account the caller cannot send from.",
        "operationId": "postProfilesMeTansSms",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTanBySmsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TanSentDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Send the caller a TAN by SMS",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/profiles/{id}/tans": {
      "get": {
        "operationId": "getProfilesByIdTans",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TanAdminOverviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Count a customer's unused TANs (admin)",
        "tags": [
          "Profiles"
        ]
      },
      "post": {
        "description": "The TANs go to the customer by internal message, or by SMS, and are never returned. Refused with 422 profiles.tans.recipient_not_customer for an admin profile, and with 422 profiles.tans.delivery_unavailable when the chosen channel cannot reach the customer.",
        "operationId": "postProfilesByIdTans",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueTansDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TanCountDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Issue a customer a list of TANs (admin)",
        "tags": [
          "Profiles"
        ]
      }
    },
    "/v3/tan-settings/rails": {
      "get": {
        "operationId": "getTanSettingsRails",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TanSettingsRailsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the rails the bank runs, for the OTP-list and transfer types",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/beneficiaries": {
      "get": {
        "operationId": "getBeneficiaries",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "name",
                "-name"
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive match against name, bank name, and country code",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BeneficiaryResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's saved beneficiaries",
        "tags": [
          "Beneficiaries"
        ]
      },
      "post": {
        "operationId": "postBeneficiaries",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBeneficiaryRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BeneficiaryResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Save a new beneficiary",
        "tags": [
          "Beneficiaries"
        ]
      }
    },
    "/v3/beneficiaries/{id}": {
      "get": {
        "operationId": "getBeneficiariesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ResolvedBeneficiaryResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get a saved beneficiary with its intermediary resolved",
        "tags": [
          "Beneficiaries"
        ]
      },
      "patch": {
        "operationId": "patchBeneficiariesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBeneficiaryRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BeneficiaryResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a saved beneficiary",
        "tags": [
          "Beneficiaries"
        ]
      },
      "delete": {
        "description": "A beneficiary that saved transfer templates point at is refused with 409 accounts.beneficiary.has_templates, whose details name the templates. Repeat the call with deleteTemplates=true to delete the beneficiary and those templates together.",
        "operationId": "deleteBeneficiariesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "deleteTemplates",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a saved beneficiary (historical transfers keep their snapshot)",
        "tags": [
          "Beneficiaries"
        ]
      }
    },
    "/v3/admin/ca-requests/preview": {
      "post": {
        "operationId": "postAdminCaRequestsPreview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreditAccountPreviewResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Evaluate a credit-account adjustment without posting it",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/admin/ca-requests": {
      "post": {
        "operationId": "postAdminCaRequests",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Replaying a key returns the original adjustment instead of posting a second one",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreditAccountAckDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Credit a customer account (manual adjustment)",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/admin/da-requests/preview": {
      "post": {
        "operationId": "postAdminDaRequestsPreview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DebitAccountPreviewResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Evaluate a debit-account adjustment without posting it",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/admin/da-requests": {
      "post": {
        "operationId": "postAdminDaRequests",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Replaying a key returns the original adjustment instead of posting a second one",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DebitAccountAckDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Debit a customer account (manual adjustment)",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/admin/dra-requests/preview": {
      "post": {
        "operationId": "postAdminDraRequestsPreview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitRevenueAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DebitRevenueAccountPreviewResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Evaluate a debit-revenue-account adjustment without posting it",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/admin/dra-requests": {
      "post": {
        "operationId": "postAdminDraRequests",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Replaying a key returns the original adjustment instead of posting a second one",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitRevenueAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DebitRevenueAccountAckDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Debit a revenue account (manual adjustment)",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/admin/adjustments/import/template": {
      "get": {
        "operationId": "getAdminAdjustmentsImportTemplate",
        "parameters": [],
        "responses": {
          "200": {
            "description": "CSV template download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download the manual debit/credit import CSV template",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/admin/adjustments/import/async": {
      "post": {
        "operationId": "postAdminAdjustmentsImportAsync",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Replaying a submit returns the operation it already created. Row keys derive from it, so a re-sent file cannot post a row twice",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Queue a manual debit/credit import as an async operation",
        "tags": [
          "Adjustments"
        ]
      }
    },
    "/v3/card-types": {
      "get": {
        "operationId": "getCardTypes",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "id",
                "-id",
                "category",
                "-category",
                "currency",
                "-currency"
              ],
              "default": "name"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CardTypeResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List card types (paginated, sorted by name unless `sort` says otherwise)",
        "tags": [
          "Card Types"
        ]
      },
      "post": {
        "operationId": "postCardTypes",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCardTypeDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CardTypeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a card type",
        "tags": [
          "Card Types"
        ]
      }
    },
    "/v3/card-types/formats": {
      "get": {
        "operationId": "getCardTypesFormats",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CardTypeLookupOptionDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the available card number formats",
        "tags": [
          "Card Types"
        ]
      }
    },
    "/v3/card-types/categories": {
      "get": {
        "operationId": "getCardTypesCategories",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CardTypeLookupOptionDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the available card type categories",
        "tags": [
          "Card Types"
        ]
      }
    },
    "/v3/card-types/{id}": {
      "get": {
        "operationId": "getCardTypesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CardTypeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get one card type",
        "tags": [
          "Card Types"
        ]
      },
      "patch": {
        "operationId": "patchCardTypesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCardTypeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CardTypeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a card type",
        "tags": [
          "Card Types"
        ]
      },
      "delete": {
        "operationId": "deleteCardTypesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a card type (refused while cards reference it)",
        "tags": [
          "Card Types"
        ]
      }
    },
    "/v3/card-types/{id}/icon": {
      "get": {
        "operationId": "getCardTypesByIdIcon",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Icon bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Serve the card type icon bytes",
        "tags": [
          "Card Types"
        ]
      }
    },
    "/v3/admin/cards": {
      "get": {
        "operationId": "getAdminCards",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "profileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Only this profile’s cards"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=… of pending|active|blocked|expired|cancelled",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "cardTypeId",
            "required": false,
            "in": "query",
            "description": "card type id(s), eq | in",
            "schema": {}
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "card number or owner (name, email), case-insensitive substring",
            "schema": {}
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "number",
                "-number",
                "currency",
                "-currency",
                "cardTypeName",
                "-cardTypeName",
                "expiration",
                "-expiration",
                "status",
                "-status"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CardResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List cards, optionally one user's (tenant admin)",
        "tags": [
          "Cards"
        ]
      },
      "post": {
        "operationId": "postAdminCards",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCardRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CardResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Issue a card to a user (tenant admin); balance starts at zero",
        "tags": [
          "Cards"
        ]
      }
    },
    "/v3/admin/cards/export.csv": {
      "get": {
        "description": "Honors the register's active filters over the full filtered set. Card numbers are masked to the last four digits in every format. The export is always queued as a csv_export operation and the response is 202 with its row (see the import/export operations routes). An Idempotency-Key header dedupes it: a reused key answers with the operation it named, for the same filters only; without one every call queues a new operation.",
        "operationId": "getAdminCardsExportCsv",
        "parameters": [
          {
            "name": "profileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Only this profile’s cards"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=… of pending|active|blocked|expired|cancelled",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "cardTypeId",
            "required": false,
            "in": "query",
            "description": "card type id(s), eq | in",
            "schema": {}
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "card number or owner (name, email), case-insensitive substring",
            "schema": {}
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "number",
                "-number",
                "currency",
                "-currency",
                "cardTypeName",
                "-cardTypeName",
                "expiration",
                "-expiration",
                "status",
                "-status"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "The export was queued; the operation row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the cards register as CSV (tenant admin)",
        "tags": [
          "Cards"
        ]
      }
    },
    "/v3/admin/cards/owners": {
      "get": {
        "operationId": "getAdminCardsOwners",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Name or profile identifier",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CardOwnerDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Search eligible card owners for issuing a card",
        "tags": [
          "Cards"
        ]
      }
    },
    "/v3/admin/cards/{id}": {
      "get": {
        "operationId": "getAdminCardsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CardResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get one card (tenant admin)",
        "tags": [
          "Cards"
        ]
      },
      "patch": {
        "operationId": "patchAdminCardsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCardRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CardResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a card's status or expiration (tenant admin)",
        "tags": [
          "Cards"
        ]
      },
      "delete": {
        "operationId": "deleteAdminCardsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a card (refused while it has transactions)",
        "tags": [
          "Cards"
        ]
      }
    },
    "/v3/cards": {
      "get": {
        "operationId": "getCards",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive match on type name, currency, or the last 4 of the number",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/OwnCardResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's cards, numbers masked to the last 4",
        "tags": [
          "Cards"
        ]
      }
    },
    "/v3/cards/{id}": {
      "get": {
        "operationId": "getCardsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OwnCardResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get one of the caller’s cards, with its full number",
        "tags": [
          "Cards"
        ]
      }
    },
    "/v3/currencies": {
      "post": {
        "operationId": "postCurrencies",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCurrencyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CurrencyResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Add a currency as bank root",
        "tags": [
          "Currencies"
        ]
      },
      "get": {
        "operationId": "getCurrencies",
        "parameters": [
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "active",
                "inactive"
              ],
              "type": "string"
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "One type or a comma list of fiat, crypto, other",
            "schema": {
              "example": "fiat,crypto",
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "type",
                "-type"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CurrencyResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the currency catalogue (unpaginated, sorted by code, or by type with sort=type or -type)",
        "tags": [
          "Currencies"
        ]
      }
    },
    "/v3/currencies/main": {
      "get": {
        "operationId": "getCurrenciesMain",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CurrencyResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get the tenant main currency (404 until designated)",
        "tags": [
          "Currencies"
        ]
      },
      "put": {
        "operationId": "putCurrenciesMain",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMainCurrencyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MainCurrencyResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Designate an active currency as the tenant main currency",
        "tags": [
          "Currencies"
        ]
      }
    },
    "/v3/currencies/{id}": {
      "get": {
        "operationId": "getCurrenciesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CurrencyResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get one currency",
        "tags": [
          "Currencies"
        ]
      },
      "patch": {
        "operationId": "patchCurrenciesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCurrencyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CurrencyResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a currency's status (deactivation is reference-guarded)",
        "tags": [
          "Currencies"
        ]
      }
    },
    "/v3/transfers/preview": {
      "post": {
        "operationId": "postTransfersPreview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee + FX for an external transfer and issue a rate-lock token (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/tba/preview": {
      "post": {
        "operationId": "postTransfersTbaPreview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TbaPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee for a transfer between own accounts and issue a rate-lock token when cross-currency (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/tbu/preview": {
      "post": {
        "operationId": "postTransfersTbuPreview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TbuPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee for a transfer to another platform user's account and issue a rate-lock token when cross-currency (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/cft/preview": {
      "post": {
        "operationId": "postTransfersCftPreview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CftPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee for funding a card from an account and issue a rate-lock token when the card is in another currency (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/cft": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersCft",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "toAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 140,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "fromAccountId",
                  "toAccountId",
                  "amount",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "correlationId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Fund a subject's card from their account on their behalf (async, 202)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/cft/preview": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersCftPreview",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CftOnBehalfPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee for funding a subject's card from their account on their behalf (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/options": {
      "post": {
        "operationId": "postTransfersOptions",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferOptionsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferOptionsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the candidate rails for the who step, with beneficiary input structure per rail and fee per option once a beneficiary is named (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/limits": {
      "get": {
        "operationId": "getTransfersLimits",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferLimitsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Per-currency single-transfer caps for the internal rails, for the amount step; an absent currency is uncapped",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfer-types": {
      "get": {
        "operationId": "getTransferTypes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferTypesResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "The transfer types switched on for end users, so the transfer menu can hide the rest",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfer-types": {
      "get": {
        "operationId": "getAdminTransferTypes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferTypesResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "The transfer types switched on for bank admins, for the on-behalf transfer menu",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/batch-update/template": {
      "get": {
        "operationId": "getAdminTransfersBatchUpdateTemplate",
        "parameters": [],
        "responses": {
          "200": {
            "description": "CSV template download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download the transfer request update CSV template",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/batch-update": {
      "post": {
        "operationId": "postAdminTransfersBatchUpdate",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BatchUpdateResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update transfer requests from a CSV (synchronous)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/batch-update/async": {
      "post": {
        "operationId": "postAdminTransfersBatchUpdateAsync",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Replaying a submit returns the operation it already created",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Queue a transfer-request batch update as an async operation",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/user-groups": {
      "get": {
        "operationId": "getUserGroups",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "description",
                "-description",
                "id",
                "-id"
              ],
              "default": "name"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive name-contains filter"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/UserGroupResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List user groups with live member counts (paginated, name asc)",
        "tags": [
          "User Groups"
        ]
      },
      "post": {
        "operationId": "postUserGroups",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserGroupDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UserGroupResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a user group",
        "tags": [
          "User Groups"
        ]
      }
    },
    "/v3/user-groups/rails": {
      "get": {
        "operationId": "getUserGroupsRails",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the rail codes a user group carries settings for",
        "tags": [
          "User Groups"
        ]
      }
    },
    "/v3/user-groups/{id}": {
      "patch": {
        "operationId": "patchUserGroupsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserGroupDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UserGroupResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a user group (name, description, and/or per-rail settings)",
        "tags": [
          "User Groups"
        ]
      },
      "delete": {
        "operationId": "deleteUserGroupsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a user group (rejected with 409 while profiles are still linked)",
        "tags": [
          "User Groups"
        ]
      }
    },
    "/v3/profiles/{profileId}/user-group": {
      "put": {
        "operationId": "putProfilesByProfileIdUserGroup",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignUserGroupDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AssignUserGroupResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Assign, reassign, or clear (null) a user profile's user group",
        "tags": [
          "User Groups"
        ]
      }
    },
    "/v3/admin/terms": {
      "get": {
        "operationId": "getAdminTerms",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "publishedAt",
                "-publishedAt",
                "createdAt",
                "-createdAt",
                "versionNumber",
                "-versionNumber"
              ],
              "default": "-publishedAt"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "filter[status]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "all"
              ],
              "default": "published"
            },
            "description": "`all` lists drafts and published versions together"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TermsDocumentSummaryDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List T&C versions: published ones, newest first, unless asked otherwise",
        "tags": [
          "Terms & Conditions"
        ]
      },
      "post": {
        "operationId": "postAdminTerms",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTermsDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsDocumentDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a T&C version as a draft",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/admin/terms/profiles/{profileId}/acceptances": {
      "get": {
        "operationId": "getAdminTermsProfilesByProfileIdAcceptances",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "actedAt",
                "-actedAt",
                "ipAddress",
                "-ipAddress"
              ],
              "default": "-actedAt"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TermsAcceptanceLogEntryDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the T&C versions one customer accepted, newest first",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/admin/terms/{id}": {
      "get": {
        "operationId": "getAdminTermsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsDocumentDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one T&C version",
        "tags": [
          "Terms & Conditions"
        ]
      },
      "patch": {
        "operationId": "patchAdminTermsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTermsDocumentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsDocumentDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Edit a draft T&C version (409 once published)",
        "tags": [
          "Terms & Conditions"
        ]
      },
      "delete": {
        "operationId": "deleteAdminTermsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a version: a draft for good, a published one from every list",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/admin/terms/{id}/publish": {
      "post": {
        "operationId": "postAdminTermsByIdPublish",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsDocumentDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Publish a draft: freezes it, renders its PDF, tells customers",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/admin/terms/{id}/acceptances": {
      "get": {
        "operationId": "getAdminTermsByIdAcceptances",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[action]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "accept",
                "decline"
              ]
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TermsAcceptanceLogEntryDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List customers' accepts and declines of one version, newest first",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/admin/terms/{id}/pdf": {
      "get": {
        "operationId": "getAdminTermsByIdPdf",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF bytes",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download the official PDF of a published version",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/terms": {
      "get": {
        "operationId": "getTerms",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsCustomerStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Whether the caller must accept the T&C version in force",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/terms/latest": {
      "get": {
        "operationId": "getTermsLatest",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsLatestDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "The T&C version in force, as the customer reads it",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/terms/details": {
      "get": {
        "description": "`data` is null when the caller never accepted any version.",
        "operationId": "getTermsDetails",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsAcceptedDetailsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "The T&C version the caller last accepted, and when and from where",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/terms/accept": {
      "post": {
        "operationId": "postTermsAccept",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TermsAnswerDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsAnswerResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Accept the T&C version in force",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/terms/decline": {
      "post": {
        "operationId": "postTermsDecline",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TermsAnswerDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsAnswerResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Decline the T&C version in force",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/terms/skip": {
      "post": {
        "operationId": "postTermsSkip",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TermsAnswerDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TermsAnswerResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Skip the T&C version in force, recorded as a decline",
        "tags": [
          "Terms & Conditions"
        ]
      }
    },
    "/v3/admin/permission-actions": {
      "get": {
        "description": "Returns the catalog as a forest: an action nests under the action it depends on, top-level actions group by category, and each level orders by descending display priority.",
        "operationId": "getAdminPermissionActions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PermissionActionDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the grantable permission actions",
        "tags": [
          "Admin Classes"
        ]
      }
    },
    "/v3/admin/permission-actions/{key}": {
      "get": {
        "description": "Returns the same node the catalog list serves for the key, dependent actions included.",
        "operationId": "getAdminPermissionActionsByKey",
        "parameters": [
          {
            "name": "key",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PermissionActionDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one grantable permission action by key",
        "tags": [
          "Admin Classes"
        ]
      }
    },
    "/v3/profiles/me/notification-preferences": {
      "get": {
        "operationId": "getProfilesMeNotificationPreferences",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/NotificationPreferenceDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get the caller's own notification preferences",
        "tags": [
          "Notification Preferences"
        ]
      },
      "patch": {
        "operationId": "patchProfilesMeNotificationPreferences",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NotificationPreferenceEntryDto"
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update one or more of the caller's own notification preferences",
        "tags": [
          "Notification Preferences"
        ]
      }
    },
    "/v3/profiles/{id}/notification-preferences": {
      "get": {
        "operationId": "getProfilesByIdNotificationPreferences",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/NotificationPreferenceDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get a profile's notification preferences (admin)",
        "tags": [
          "Notification Preferences"
        ]
      },
      "patch": {
        "operationId": "patchProfilesByIdNotificationPreferences",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NotificationPreferenceEntryDto"
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a profile's notification preferences (admin)",
        "tags": [
          "Notification Preferences"
        ]
      }
    },
    "/v3/verification/email": {
      "get": {
        "operationId": "getVerificationEmail",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationEmailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the customer's email for the verification SDK",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/session": {
      "post": {
        "description": "Returns a short-lived provider SDK token. When an attempt is already in progress the same attempt is resumed (the SDK picks up at the step it reached) and no second attempt is created. Starting a new attempt is subject to a per-profile daily limit and answers 429 when exhausted.",
        "operationId": "postVerificationSession",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationSessionDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start identity verification, or resume the attempt already running",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/session/token": {
      "post": {
        "description": "What the SDK's expiry callback calls. Never starts an attempt: a verification that has already reached a decision answers 404, and the way forward is a restart.",
        "operationId": "postVerificationSessionToken",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationTokenDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Refresh the SDK token for the attempt in progress",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/session/handoff": {
      "post": {
        "description": "Returns a provider-hosted URL for the attempt in progress, for rendering as a QR code so the customer can finish document capture on a phone. The phone continues the same attempt: no second attempt is created and no daily start is spent.",
        "operationId": "postVerificationSessionHandoff",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerificationHandoffRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationHandoffDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get a link that continues the attempt on another device",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/status": {
      "get": {
        "description": "The current state of the verification in customer-facing buckets, and — when it was refused — whether another attempt is allowed. A profile that never started reads as not started, never an error.",
        "operationId": "getVerificationStatus",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationStatusDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Where the caller's own verification stands",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/session/restart": {
      "post": {
        "description": "The way out of a dead or unrefreshable provider session. The abandoned attempt is kept as history. Counts as a start against the per-profile daily limit; two rapid restarts resolve to one fresh attempt rather than two.",
        "operationId": "postVerificationSessionRestart",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationSessionDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Abandon the attempt in progress and start a fresh one",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/profiles/{id}/verification": {
      "get": {
        "description": "Every attempt the profile has made, newest first, including retired and abandoned ones. Carries the redacted review summary — decision, rejection tags, the applicant-facing comment — never the verbatim provider payload.",
        "operationId": "getProfilesByIdVerification",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/VerificationAttemptDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "A profile's verification attempt history",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/profiles/{id}/verification/refresh": {
      "post": {
        "description": "Fetches the current applicant state from the provider and overwrites the stored verification with it, for when the two have diverged. On-demand only; targets the profile’s newest attempt and never starts one. An applicant the provider does not know answers a typed 404 and changes nothing.",
        "operationId": "postProfilesByIdVerificationRefresh",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationStateDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Resync a profile's verification from the provider",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/auth/verification-link/signup": {
      "post": {
        "description": "Sets an httpOnly continuation cookie. Used, expired, locked or ineligible links answer the same 422. Sends no email.",
        "operationId": "postAuthVerificationLinkSignup",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerificationLinkExchangeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationGrantDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Exchange a single-use sign-up email link for access to the follow-up steps",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/auth/verification-link": {
      "post": {
        "description": "Sets an httpOnly cookie granting access to the caller’s own identity verification — the /verification routes and nothing else. The same link can be exchanged again until it expires 30 days after it was sent. 422 carries `iam.verification_link.exchange_failed`: the link is unknown, superseded, expired, or the account can no longer use it — deliberately indistinguishable.",
        "operationId": "postAuthVerificationLink",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerificationLinkExchangeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationGrantDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Exchange the code from a verification email for scoped verification access",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/signup-form": {
      "get": {
        "operationId": "getVerificationSignupForm",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupFormResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the follow-up form for an existing pending applicant, including when new sign-ups are disabled",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/signup-continuation": {
      "get": {
        "operationId": "getVerificationSignupContinuation",
        "parameters": [],
        "responses": {
          "204": {
            "description": "The pending sign-up can be continued."
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Resume a pending sign-up using the existing continuation cookie",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/signup-follow-ups": {
      "get": {
        "description": "The verification page sends the applicant through these before identity verification.",
        "operationId": "getVerificationSignupFollowUps",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SignupFollowUpsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the sign-up follow-up steps a pending applicant has not filled in yet",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/verification/signup-details": {
      "put": {
        "description": "Validates the values against the named step of the tenant sign-up form and stores them on the pending profile. Only that step must be complete, so each step is saved on its own. Submitting again overwrites; a field sent null or blank is cleared, one left out keeps its stored value. Refused with 409 once the sign-up is no longer pending (or when concurrent writes keep winning), and with 422 when a value breaks a field rule, clears a required field, or names a field outside that step — nothing is stored then.",
        "operationId": "putVerificationSignupDetails",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupCompletionDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The details were stored."
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Fill in the personal or address details of a pending sign-up",
        "tags": [
          "Verification"
        ]
      }
    },
    "/v3/admin/kyc/levels": {
      "post": {
        "description": "With candidate credentials in the body, fetches the level list those credentials can see: the configure flow before anything is saved. Without them, uses the tenant's stored configuration, and answers 503 when the tenant has none. Rejected credentials answer 422.",
        "operationId": "postAdminKycLevels",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KycLevelsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/KycLevelsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the verification levels the KYC provider offers",
        "tags": [
          "KYC"
        ]
      }
    },
    "/v3/admin/kyc/config": {
      "put": {
        "description": "Checks the credentials with the provider before saving. Omitted credential fields keep their stored value; all three are required on first save.",
        "operationId": "putAdminKycConfig",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KycConfigUpdateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/KycConfigDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Configure the tenant's KYC provider",
        "tags": [
          "KYC"
        ]
      }
    },
    "/v3/bic-lookup/availability": {
      "get": {
        "operationId": "getBicLookupAvailability",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BicAvailabilityDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Whether live BIC lookup is available for this tenant",
        "tags": [
          "BIC Lookup"
        ]
      }
    },
    "/v3/bic-lookup/{code}": {
      "get": {
        "description": "Advisory only: found returns the bank, not_found reports an unrecognised BIC, and unavailable (provider down or quota spent) tells the caller to fall back to format-only. Never blocks a transfer.",
        "operationId": "getBicLookupByCode",
        "parameters": [
          {
            "name": "code",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BicLookupResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Look up the bank behind a BIC",
        "tags": [
          "BIC Lookup"
        ]
      }
    },
    "/v3/accounts": {
      "get": {
        "operationId": "getAccounts",
        "parameters": [
          {
            "name": "purpose",
            "required": false,
            "in": "query",
            "description": "List the accounts a transfer form or the personal reports offer instead of the owned accounts",
            "schema": {
              "type": "string",
              "enum": [
                "transfers",
                "reports"
              ]
            }
          },
          {
            "name": "transferType",
            "required": false,
            "in": "query",
            "description": "The rail. Required with purpose=transfers",
            "schema": {
              "type": "string",
              "enum": [
                "TBA",
                "TBU",
                "SWIFT",
                "SEPA_CT",
                "SEPA_INST",
                "FPS",
                "CHAPS",
                "ACH",
                "FEDWIRE",
                "CFT"
              ]
            }
          },
          {
            "name": "selector",
            "required": false,
            "in": "query",
            "description": "List TBA destinations instead of sources",
            "schema": {
              "type": "string",
              "enum": [
                "creditTo"
              ]
            }
          },
          {
            "name": "corporateProfileId",
            "required": false,
            "in": "query",
            "description": "TBA only: holds company accounts to this company (the source's for creditTo, the destination's for sources). Absent keeps every company",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CustomerAccountResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's accounts, or with purpose=transfers the accounts a transfer form offers, or with purpose=reports the accounts the personal reports cover",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/accounts/balance-summary": {
      "get": {
        "operationId": "getAccountsBalanceSummary",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25
            },
            "description": "Pages the account-type rows only. Every currency total is always returned"
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BalanceSummaryResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Totals across all of the caller's accounts",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/accounts/balance-summary.csv": {
      "get": {
        "description": "Always queued as a report job for the caller. The response is 202 with the job row.",
        "operationId": "getAccountsBalanceSummaryCsv",
        "parameters": [],
        "responses": {
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download the totals across all of the caller's accounts as CSV",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/accounts/{id}": {
      "get": {
        "operationId": "getAccountsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get an account's posted and available balance",
        "tags": [
          "Accounts"
        ]
      },
      "patch": {
        "operationId": "patchAccountsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set or clear an owned account's alias",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/accounts/{id}/funding-instructions": {
      "get": {
        "operationId": "getAccountsByIdFundingInstructions",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CustomerFundingInstructionsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Funding instructions for an owned account (enabled records for its currency, with the payment reference)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/accounts/{id}/funding-instructions/{instructionId}/pdf": {
      "get": {
        "operationId": "getAccountsByIdFundingInstructionsByInstructionIdPdf",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "instructionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file download",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download one funding instruction of an owned account as PDF",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts": {
      "get": {
        "operationId": "getAdminAccounts",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "number",
                "-number",
                "accountTypeName",
                "-accountTypeName",
                "kind",
                "-kind",
                "status",
                "-status"
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "account number, external reference, or owner (name, email), case-insensitive substring",
            "schema": {}
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "kind",
            "required": false,
            "in": "query",
            "description": "platform kind: eq | kind[in|eq|neq|nin]=… of customer|revenue|fee|suspense|clearing|system|card",
            "schema": {}
          },
          {
            "name": "allowDeposits",
            "required": false,
            "in": "query",
            "description": "true keeps only accounts that accept deposits; false keeps only those that refuse them",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "corporateProfileId",
            "required": false,
            "in": "query",
            "description": "The owning company of a corporate account",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ownerProfileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AdminAccountListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Search accounts across all profiles (admin)",
        "tags": [
          "Accounts"
        ]
      },
      "post": {
        "operationId": "postAdminAccounts",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminAccountResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Open an account for a profile or a company (tenant admin)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/import/template": {
      "get": {
        "operationId": "getAdminAccountsImportTemplate",
        "parameters": [],
        "responses": {
          "200": {
            "description": "CSV template download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download the account batch import CSV template",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/import/async": {
      "post": {
        "operationId": "postAdminAccountsImportAsync",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Replaying a submit returns the operation it already created",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Queue an account import as an async operation",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/export.csv": {
      "get": {
        "description": "The same rows the register list serves, honouring the same filters, but always the full filtered set rather than one page. The export is always queued as a csv_export operation and the response is 202 with its row (see the import/export operations routes). An Idempotency-Key header dedupes it: a reused key answers with the operation it named, for the same filters only; without one every call queues a new operation.",
        "operationId": "getAdminAccountsExportCsv",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "number",
                "-number",
                "accountTypeName",
                "-accountTypeName",
                "kind",
                "-kind",
                "status",
                "-status"
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "account number, external reference, or owner (name, email), case-insensitive substring",
            "schema": {}
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "kind",
            "required": false,
            "in": "query",
            "description": "platform kind: eq | kind[in|eq|neq|nin]=… of customer|revenue|fee|suspense|clearing|system|card",
            "schema": {}
          },
          {
            "name": "allowDeposits",
            "required": false,
            "in": "query",
            "description": "true keeps only accounts that accept deposits; false keeps only those that refuse them",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "corporateProfileId",
            "required": false,
            "in": "query",
            "description": "The owning company of a corporate account",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ownerProfileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "The export was queued; the operation row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the admin account register as CSV",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/export.pdf": {
      "get": {
        "description": "The same rows the register list serves, honouring the same filters, but always the full filtered set rather than one page.",
        "operationId": "getAdminAccountsExportPdf",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "number",
                "-number",
                "accountTypeName",
                "-accountTypeName",
                "kind",
                "-kind",
                "status",
                "-status"
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "account number, external reference, or owner (name, email), case-insensitive substring",
            "schema": {}
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "kind",
            "required": false,
            "in": "query",
            "description": "platform kind: eq | kind[in|eq|neq|nin]=… of customer|revenue|fee|suspense|clearing|system|card",
            "schema": {}
          },
          {
            "name": "allowDeposits",
            "required": false,
            "in": "query",
            "description": "true keeps only accounts that accept deposits; false keeps only those that refuse them",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "corporateProfileId",
            "required": false,
            "in": "query",
            "description": "The owning company of a corporate account",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ownerProfileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file download",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the admin account register as PDF",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/owners": {
      "get": {
        "operationId": "getAdminAccountsOwners",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Name or profile identifier",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AccountOwnerDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Search active customers for opening an account or an on-behalf transfer",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/{id}": {
      "get": {
        "operationId": "getAdminAccountsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminAccountListItemDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read any account, owner included (tenant admin)",
        "tags": [
          "Accounts"
        ]
      },
      "patch": {
        "operationId": "patchAdminAccountsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminUpdateAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminAccountResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Edit any account's metadata, controls or approval rule (tenant admin)",
        "tags": [
          "Accounts"
        ]
      },
      "delete": {
        "operationId": "deleteAdminAccountsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete an account (tenant admin)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/generated-number": {
      "post": {
        "operationId": "postAdminAccountsGeneratedNumber",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateAccountNumberRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GeneratedAccountNumberDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview a generated account number for a type (tenant admin)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/reports/subjects/users": {
      "get": {
        "operationId": "getAdminReportsSubjectsUsers",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReportPersonPickerDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Search customer subjects by name or username",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/subjects/companies": {
      "get": {
        "operationId": "getAdminReportsSubjectsCompanies",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReportCompanyPickerDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Search company subjects by name or principal contact username",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/transactions": {
      "get": {
        "operationId": "getAdminReportsTransactions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "all (default) | visible (only what the customer feed shows) | hidden (only what it never shows)"
          },
          {
            "name": "profileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Restricts to accounts owned by this personal profile"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…, one of: pending | pending_approval | executed | cancelled | revoked | failed | processing",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Omitted — no upper bound."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Omitted — no lower bound."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransactionReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the tenant-wide transactions report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/balances": {
      "get": {
        "operationId": "getAdminReportsBalances",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the balances are read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted reports the live balances, and an account opened after the bound is not listed."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BalanceReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the tenant-wide account balances report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/maturity-dates": {
      "get": {
        "operationId": "getAdminReportsMaturityDates",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the balances are read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted reports the live balances, and an account opened after the bound is not listed."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MaturityReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the tenant-wide maturity dates report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/user-balances": {
      "get": {
        "description": "The person's own accounts. An id that names only a company is refused as an unknown profile; an id a person shares with a company reports the person.",
        "operationId": "getAdminReportsUserBalances",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the balances are read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted reports the live balances."
          },
          {
            "name": "includeCompanyAccounts",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "The account picker sets it: the list also holds the company accounts where the person's role may read reports, while the corporate module is on."
          },
          {
            "name": "profileId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The report's subject, a personal profile. Required — an unknown one, a company's included, is refused rather than reported as an empty page."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BalanceReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the balances report for one profile's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/user-transactions": {
      "get": {
        "description": "The tenant-wide transactions report scoped to one person's own accounts. An id that names only a company is refused as an unknown profile; an id a person shares with a company reports the person.",
        "operationId": "getAdminReportsUserTransactions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "all (default) | visible (only what the customer feed shows) | hidden (only what it never shows)"
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "profileId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The report subject, a personal profile id (its own accounts). Required. A company's id is refused as an unknown profile."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransactionReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the transactions report for one profile's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/outgoing-transfers/{rail}": {
      "get": {
        "operationId": "getAdminReportsOutgoingTransfersByRail",
        "parameters": [
          {
            "name": "rail",
            "required": true,
            "in": "path",
            "description": "The rail the report is scoped to. Any rail in the vocabulary, a rail the tenant has retired still answers its history.",
            "schema": {
              "enum": [
                "swift",
                "sepa",
                "sepa-instant",
                "fps",
                "chaps"
              ],
              "type": "string"
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "currency",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The one currency code the report is denominated in, as a bare code (no operator syntax). Required — the report reads one currency at a time, which is what makes meta.summary's single total addable."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the outgoing transfer report for one rail (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/manual-transactions": {
      "get": {
        "operationId": "getAdminReportsManualTransactions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ManualTransactionReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the manual transactions report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/interests": {
      "get": {
        "operationId": "getAdminReportsInterests",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "type",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "payouts",
                "charges"
              ]
            },
            "description": "all | payouts (deposit interest paid out to accounts) | charges (credit-line interest). Required, and a value outside the set falls back to all."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InterestReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the interests report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/company-transactions": {
      "get": {
        "description": "The tenant-wide transactions report scoped to one company's accounts. The envelope always carries the company header block in meta.company (company name, principal contact, mailing address), since this report's subject is a company by definition.",
        "operationId": "getAdminReportsCompanyTransactions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "all (default) | visible (only what the customer feed shows) | hidden (only what it never shows)"
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional — omitted, no upper bound."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional — omitted, no lower bound."
          },
          {
            "name": "companyId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The company whose accounts the report covers. A personal profile id is refused. Required."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransactionReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the transactions report over one company's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/company-balances": {
      "get": {
        "description": "The tenant-wide balances report scoped to one company's accounts. The envelope always carries the company header block in meta.company, since this report's subject is a company by definition.",
        "operationId": "getAdminReportsCompanyBalances",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the balances are read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted reports the live balances. It moves the balances only — the company header always reports the company as registered now."
          },
          {
            "name": "companyId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The company whose accounts the report covers. A personal profile id is refused. Required."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BalanceReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the balances report over one company's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/revenue": {
      "get": {
        "operationId": "getAdminReportsRevenue",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "system",
                "manual"
              ],
              "default": "all"
            },
            "description": "all (default) | system (revenue the platform booked by itself) | manual (revenue a person posted)"
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional: with no bounds the report covers all revenue and states the period it found."
          },
          {
            "name": "currency",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Za-z]{2,8}$"
            },
            "description": "Currency code. Required — the summary totals are denominated, so a report spanning currencies would sum amounts that are not comparable."
          }
        ],
        "responses": {
          "200": {
            "description": "The report rows. `meta.summary` carries the period and the debit/credit totals for the whole filtered set, not just this page (see RevenueReportSummaryDto).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RevenueReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the revenue report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/system-overview": {
      "get": {
        "operationId": "getAdminReportsSystemOverview",
        "parameters": [
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Report as of this instant, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SystemOverviewReportDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the system overview report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/transactions/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsTransactionsExport",
        "parameters": [
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…, one of: pending | pending_approval | executed | cancelled | revoked | failed | processing",
            "schema": {}
          },
          {
            "name": "profileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Restricts to accounts owned by this personal profile"
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "Accepted for compatibility with the on-screen route; exports always serve customer-visible rows only."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the tenant-wide transactions report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/balances/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsBalancesExport",
        "parameters": [
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the tenant-wide account balances report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/maturity-dates/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsMaturityDatesExport",
        "parameters": [
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the tenant-wide maturity dates report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/user-balances/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsUserBalancesExport",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The report's subject, a personal profile. Required. A company's id is refused as an unknown profile."
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the balances report for one profile's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/user-transactions/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsUserTransactionsExport",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The report's subject, a personal profile. Required. A company's id is refused as an unknown profile."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "Accepted for compatibility with the on-screen route; exports always serve customer-visible rows only."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the transactions report for one profile's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/outgoing-transfers/{rail}/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsOutgoingTransfersByRailExport",
        "parameters": [
          {
            "name": "rail",
            "required": true,
            "in": "path",
            "description": "The rail the report is scoped to. Any rail in the vocabulary, a rail the tenant has retired still answers its history.",
            "schema": {
              "enum": [
                "swift",
                "sepa",
                "sepa-instant",
                "fps",
                "chaps"
              ],
              "type": "string"
            }
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The one currency code the report is denominated in, as a bare code (no operator syntax). Required — the report reads one currency at a time, which is what makes meta.summary's single total addable."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the outgoing transfer report for one rail (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/manual-transactions/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsManualTransactionsExport",
        "parameters": [
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the manual transactions report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/interests/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsInterestsExport",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "payouts",
                "charges"
              ]
            },
            "description": "all | payouts (deposit interest paid out to accounts) | charges (credit-line interest). Required, and a value outside the set falls back to all."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the interests report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/company-transactions/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsCompanyTransactionsExport",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The company whose accounts the report covers. A personal profile id is refused. Required."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "Accepted for compatibility with the on-screen route; exports always serve customer-visible rows only."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the transactions report over one company's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/company-balances/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsCompanyBalancesExport",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The company whose accounts the report covers. A personal profile id is refused. Required."
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the balances report over one company's accounts (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/revenue/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsRevenueExport",
        "parameters": [
          {
            "name": "currency",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Za-z]{2,8}$"
            },
            "description": "Currency code. Required — the summary totals are denominated."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "system",
                "manual"
              ],
              "default": "all"
            },
            "description": "all (default) | system | manual"
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the revenue report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/system-overview/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsSystemOverviewExport",
        "parameters": [
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the system overview report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/system-log/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsSystemLogExport",
        "parameters": [
          {
            "name": "occurredAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-31) or datetime."
          },
          {
            "name": "occurredAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms; a date covers its whole day."
          },
          {
            "name": "actorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The acting profile."
          },
          {
            "name": "action",
            "required": false,
            "in": "query",
            "description": "eq | action[in|eq|neq|nin]=…, one of the system log action vocabulary.",
            "schema": {}
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-loggedAt",
                "loggedAt"
              ],
              "default": "-loggedAt"
            },
            "description": "The list order. Order by when the entry was logged. A leading `-` is newest first."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the system log (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/transaction-log/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsTransactionLogExport",
        "parameters": [
          {
            "name": "occurredAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-31) or datetime."
          },
          {
            "name": "occurredAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms; a date covers its whole day."
          },
          {
            "name": "actorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The acting profile."
          },
          {
            "name": "action",
            "required": false,
            "in": "query",
            "description": "eq | action[in|eq|neq|nin]=…, one of the system log action vocabulary.",
            "schema": {}
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-loggedAt",
                "loggedAt"
              ],
              "default": "-loggedAt"
            },
            "description": "The list order. Order by when the entry was logged. A leading `-` is newest first."
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the transaction log (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/jobs": {
      "get": {
        "description": "Export jobs from the last 30 days, newest first. An admin who can manage all report jobs sees their own and every other admin's, never a customer's, and root's only when they are root. One who can view report jobs sees their own. One let in only by a report's own view permission sees only their own exports of that report.",
        "operationId": "getAdminReportsJobs",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt"
              ],
              "default": "-createdAt"
            }
          },
          {
            "name": "filter[dateTo]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same form as filter[dateFrom]. A date covers its whole day, so 2026-08-31 includes jobs created on the 31st. Optional."
          },
          {
            "name": "filter[dateFrom]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the job's creation date, an ISO date (2026-08-01). Optional — omitted, no lower bound."
          },
          {
            "name": "filter[type]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated, of: csv_export | pdf_export"
          },
          {
            "name": "filter[status]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated, of: queued | running | completed | failed | cancelled"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReportJobRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List report export jobs (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/access-log": {
      "get": {
        "operationId": "getAdminReportsAccessLog",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free-text term matched against the signer-in's name, username, and email"
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AccessLogReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the access log report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/access-log/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsAccessLogExport",
        "parameters": [
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free-text term matched against the signer-in's name, username, and email"
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the access log report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/scheduled-transactions": {
      "get": {
        "operationId": "getAdminReportsScheduledTransactions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "reason",
            "required": false,
            "in": "query",
            "description": "eq | reason[in|eq|neq|nin]=…, one of: maintenance_fee | limit_balance_fee | interest_generation | credit_line_fee",
            "schema": {}
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…, one of: pending | executed",
            "schema": {}
          },
          {
            "name": "scheduledDateTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound on the scheduled date, same forms."
          },
          {
            "name": "scheduledDateFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the scheduled date, an ISO date or datetime."
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound on the created date, same forms. A date covers its whole day."
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the created date, an ISO date or datetime."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ScheduledTransactionReportRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Run the scheduled transactions report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/scheduled-transactions/export": {
      "get": {
        "description": "A CSV is always queued as a report job and the response is 202 with the job row (see the jobs routes). A PDF under the export threshold is the rendered file; over it, it is queued the same way.",
        "operationId": "getAdminReportsScheduledTransactionsExport",
        "parameters": [
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the created date, an ISO date or datetime."
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound on the created date, same forms. A date covers its whole day."
          },
          {
            "name": "scheduledDateFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the scheduled date, an ISO date or datetime."
          },
          {
            "name": "scheduledDateTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound on the scheduled date, same forms."
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…, one of: pending | executed",
            "schema": {}
          },
          {
            "name": "reason",
            "required": false,
            "in": "query",
            "description": "eq | reason[in|eq|neq|nin]=…, one of: maintenance_fee | limit_balance_fee | interest_generation | credit_line_fee",
            "schema": {}
          },
          {
            "name": "format",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "pdf"
              ]
            },
            "description": "The file format: `csv` or `pdf`."
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "The export was queued as a report job; the job row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the scheduled transactions report (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/scheduled-transactions/{id}": {
      "get": {
        "operationId": "getAdminReportsScheduledTransactionsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduledTransactionReportRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one scheduled transaction (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/transactions/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsTransactionsExportPreview",
        "parameters": [
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…, one of: pending | pending_approval | executed | cancelled | revoked | failed | processing",
            "schema": {}
          },
          {
            "name": "profileId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Restricts to accounts owned by this personal profile"
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "Accepted for compatibility with the on-screen route; exports always serve customer-visible rows only."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the tenant-wide transactions report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/balances/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsBalancesExportPreview",
        "parameters": [
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the tenant-wide account balances report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/maturity-dates/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsMaturityDatesExportPreview",
        "parameters": [
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the tenant-wide maturity dates report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/user-balances/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsUserBalancesExportPreview",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The report's subject, a personal profile. Required. A company's id is refused as an unknown profile."
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of one profile's balances report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/user-transactions/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsUserTransactionsExportPreview",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The report's subject, a personal profile. Required. A company's id is refused as an unknown profile."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "Accepted for compatibility with the on-screen route; exports always serve customer-visible rows only."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of one profile's transactions report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/outgoing-transfers/{rail}/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsOutgoingTransfersByRailExportPreview",
        "parameters": [
          {
            "name": "rail",
            "required": true,
            "in": "path",
            "description": "The rail the report is scoped to. Any rail in the vocabulary, a rail the tenant has retired still answers its history.",
            "schema": {
              "enum": [
                "swift",
                "sepa",
                "sepa-instant",
                "fps",
                "chaps"
              ],
              "type": "string"
            }
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The one currency code the report is denominated in, as a bare code (no operator syntax). Required — the report reads one currency at a time, which is what makes meta.summary's single total addable."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the outgoing transfer report export for one rail (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/manual-transactions/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsManualTransactionsExportPreview",
        "parameters": [
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the manual transactions report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/interests/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsInterestsExportPreview",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "payouts",
                "charges"
              ]
            },
            "description": "all | payouts (deposit interest paid out to accounts) | charges (credit-line interest). Required, and a value outside the set falls back to all."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the interests report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/company-transactions/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsCompanyTransactionsExportPreview",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The company whose accounts the report covers. A personal profile id is refused. Required."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "eq | currency[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "visible",
                "hidden"
              ],
              "default": "all"
            },
            "description": "Accepted for compatibility with the on-screen route; exports always serve customer-visible rows only."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of one company's transactions report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/company-balances/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsCompanyBalancesExportPreview",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The company whose accounts the report covers. A personal profile id is refused. Required."
          },
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of one company's balances report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/revenue/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsRevenueExportPreview",
        "parameters": [
          {
            "name": "currency",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Za-z]{2,8}$"
            },
            "description": "Currency code. Required — the summary totals are denominated."
          },
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "system",
                "manual"
              ],
              "default": "all"
            },
            "description": "all (default) | system | manual"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the revenue report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/system-overview/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsSystemOverviewExportPreview",
        "parameters": [
          {
            "name": "asOf",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The instant the report is read as of, an ISO date (2026-01-31) or datetime. A date covers its whole day. Omitted means now."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the system overview report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/system-log/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsSystemLogExportPreview",
        "parameters": [
          {
            "name": "occurredAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-31) or datetime."
          },
          {
            "name": "occurredAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms; a date covers its whole day."
          },
          {
            "name": "actorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The acting profile."
          },
          {
            "name": "action",
            "required": false,
            "in": "query",
            "description": "eq | action[in|eq|neq|nin]=…, one of the system log action vocabulary.",
            "schema": {}
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-loggedAt",
                "loggedAt"
              ],
              "default": "-loggedAt"
            },
            "description": "The list order. Order by when the entry was logged. A leading `-` is newest first."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the system log export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/transaction-log/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsTransactionLogExportPreview",
        "parameters": [
          {
            "name": "occurredAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-31) or datetime."
          },
          {
            "name": "occurredAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms; a date covers its whole day."
          },
          {
            "name": "actorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The acting profile."
          },
          {
            "name": "action",
            "required": false,
            "in": "query",
            "description": "eq | action[in|eq|neq|nin]=…, one of the system log action vocabulary.",
            "schema": {}
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-loggedAt",
                "loggedAt"
              ],
              "default": "-loggedAt"
            },
            "description": "The list order. Order by when the entry was logged. A leading `-` is newest first."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the transaction log export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/access-log/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsAccessLogExportPreview",
        "parameters": [
          {
            "name": "date[from]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound, an ISO date (2026-01-01) or datetime. Optional."
          },
          {
            "name": "date[to]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same forms as date[from]. A date covers its whole day, so 2026-01-31 includes everything posted on the 31st. Optional."
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free-text term matched against the signer-in's name, username, and email"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the access log report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/scheduled-transactions/export/preview": {
      "get": {
        "description": "How many rows the export of these criteria would hold, so a large report is asked for deliberately. Takes the export route's criteria and refuses a missing mandatory filter the same way. Nothing is rendered or queued.",
        "operationId": "getAdminReportsScheduledTransactionsExportPreview",
        "parameters": [
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the created date, an ISO date or datetime."
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound on the created date, same forms. A date covers its whole day."
          },
          {
            "name": "scheduledDateFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the scheduled date, an ISO date or datetime."
          },
          {
            "name": "scheduledDateTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound on the scheduled date, same forms."
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…, one of: pending | executed",
            "schema": {}
          },
          {
            "name": "reason",
            "required": false,
            "in": "query",
            "description": "eq | reason[in|eq|neq|nin]=…, one of: maintenance_fee | limit_balance_fee | interest_generation | credit_line_fee",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportExportPreviewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the size of the scheduled transactions report export (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/jobs/{id}/preview": {
      "get": {
        "operationId": "getAdminReportsJobsByIdPreview",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the first rows of a completed report CSV",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/jobs/{id}/download": {
      "get": {
        "operationId": "getAdminReportsJobsByIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a completed report job's file (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/admin/reports/jobs/{id}/cancel": {
      "post": {
        "operationId": "postAdminReportsJobsByIdCancel",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Cancel a queued or running report job (admin)",
        "tags": [
          "Reports"
        ]
      }
    },
    "/v3/reports/jobs": {
      "get": {
        "description": "The exports the caller queued in the last 30 days, newest first: which report, its status and progress, and once completed the file the download route serves. A failed job carries its failure reason instead. Another customer's jobs are never listed.",
        "operationId": "getReportsJobs",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt"
              ],
              "default": "-createdAt"
            }
          },
          {
            "name": "filter[dateTo]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound, same form as filter[dateFrom]. A date covers its whole day, so 2026-08-31 includes jobs created on the 31st. Optional."
          },
          {
            "name": "filter[dateFrom]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on the job's creation date, an ISO date (2026-08-01). Optional — omitted, no lower bound."
          },
          {
            "name": "filter[type]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated, of: csv_export | pdf_export"
          },
          {
            "name": "filter[status]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated, of: queued | running | completed | failed | cancelled"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReportJobRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's own report export jobs",
        "tags": [
          "Jobs"
        ]
      }
    },
    "/v3/reports/jobs/{id}/preview": {
      "get": {
        "operationId": "getReportsJobsByIdPreview",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview the first rows of a completed report CSV",
        "tags": [
          "Jobs"
        ]
      }
    },
    "/v3/reports/jobs/{id}/download": {
      "get": {
        "operationId": "getReportsJobsByIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a completed report job's file",
        "tags": [
          "Jobs"
        ]
      }
    },
    "/v3/funding-instructions": {
      "get": {
        "operationId": "getFundingInstructions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "bankName",
                "-bankName",
                "currency",
                "-currency",
                "isEnabled",
                "-isEnabled",
                "id",
                "-id"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FundingInstructionResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List funding instructions (every record, disabled ones included)",
        "tags": [
          "Funding Instructions"
        ]
      },
      "post": {
        "operationId": "postFundingInstructions",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFundingInstructionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FundingInstructionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a funding instruction (incoming-wire bank details)",
        "tags": [
          "Funding Instructions"
        ]
      }
    },
    "/v3/funding-instructions/{id}": {
      "get": {
        "operationId": "getFundingInstructionsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FundingInstructionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get one funding instruction",
        "tags": [
          "Funding Instructions"
        ]
      },
      "patch": {
        "operationId": "patchFundingInstructionsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFundingInstructionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FundingInstructionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a funding instruction",
        "tags": [
          "Funding Instructions"
        ]
      },
      "delete": {
        "operationId": "deleteFundingInstructionsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a funding instruction",
        "tags": [
          "Funding Instructions"
        ]
      }
    },
    "/v3/admin/corporate/accounts/{accountId}/members": {
      "get": {
        "operationId": "getAdminCorporateAccountsByAccountIdMembers",
        "parameters": [
          {
            "name": "accountId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateAccountMemberDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the members assigned to a corporate account with their role",
        "tags": [
          "Corporate Accounts"
        ]
      }
    },
    "/v3/admin/corporate/accounts/{accountId}/members/{profileId}": {
      "put": {
        "operationId": "putAdminCorporateAccountsByAccountIdMembersByProfileId",
        "parameters": [
          {
            "name": "accountId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignCorporateAccountMemberDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member with the role now held. `messages` warns when an approval flow on the account is left with too few authorizers.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateAccountMemberDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Assign a company member a role on the account, or change it",
        "tags": [
          "Corporate Accounts"
        ]
      },
      "delete": {
        "operationId": "deleteAdminCorporateAccountsByAccountIdMembersByProfileId",
        "parameters": [
          {
            "name": "accountId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The assignment is removed. `messages` warns when an approval flow on the account is left with too few authorizers.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove a member's assignment from the account",
        "tags": [
          "Corporate Accounts"
        ]
      }
    },
    "/v3/transactions/export.csv": {
      "get": {
        "description": "Always queued as a report job for the caller. The response is 202 with the job row.",
        "operationId": "getTransactionsExportCsv",
        "parameters": [
          {
            "name": "dateFrom",
            "required": false,
            "in": "query",
            "description": "ISO date or datetime lower bound (inclusive, UTC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateTo",
            "required": false,
            "in": "query",
            "description": "ISO date or datetime upper bound (a date-only value covers that whole day, UTC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "description": "Narrows the export to one of the caller's accounts. Any other account is not found.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive match against the line description, as on the feed",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "accountNumber",
                "-accountNumber",
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "description",
                "-description",
                "status",
                "-status",
                "number",
                "-number"
              ]
            }
          },
          {
            "name": "source",
            "required": false,
            "in": "query",
            "description": "Page the export was started from. Absent or reports is the report scope, executed lines only. account is the account page feed, pending holds included. It also changes the file name.",
            "schema": {
              "type": "string",
              "enum": [
                "account",
                "reports"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the caller's transactions as CSV",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/export.pdf": {
      "get": {
        "description": "Under the export threshold the response is the rendered file; over it a report job is queued for the caller and the response is 202 with the job row.",
        "operationId": "getTransactionsExportPdf",
        "parameters": [
          {
            "name": "dateFrom",
            "required": false,
            "in": "query",
            "description": "ISO date or datetime lower bound (inclusive, UTC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateTo",
            "required": false,
            "in": "query",
            "description": "ISO date or datetime upper bound (a date-only value covers that whole day, UTC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "description": "Narrows the export to one of the caller's accounts. Any other account is not found.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive match against the line description, as on the feed",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "accountNumber",
                "-accountNumber",
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "description",
                "-description",
                "status",
                "-status",
                "number",
                "-number"
              ]
            }
          },
          {
            "name": "source",
            "required": false,
            "in": "query",
            "description": "Page the export was started from. Absent or reports is the report scope, executed lines only. account is the account page feed, pending holds included. It also changes the file name.",
            "schema": {
              "type": "string",
              "enum": [
                "account",
                "reports"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file download",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the caller's transactions as PDF",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions": {
      "get": {
        "operationId": "getTransactions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "accountNumber",
                "-accountNumber",
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "description",
                "-description",
                "status",
                "-status",
                "number",
                "-number"
              ]
            }
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "description": "ISO date or datetime upper bound (a date-only value covers that whole day, UTC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "description": "ISO date or datetime lower bound (inclusive, UTC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Comma-separated transfer statuses (pending, pending_approval, executed, cancelled, revoked, failed, processing)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive match against the line description",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "purpose",
            "required": false,
            "in": "query",
            "description": "reports reads the All Accounts Transactions report instead of the feed: the accounts the personal reports cover, executed lines only",
            "schema": {
              "type": "string",
              "enum": [
                "reports"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransactionListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's transactions (optionally filtered by accountId)",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/pending-totals": {
      "get": {
        "operationId": "getTransactionsPendingTotals",
        "parameters": [
          {
            "name": "accountId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PendingTransactionTotalsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Pending transfer count and signed total for one of the caller's accounts",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/pending": {
      "get": {
        "operationId": "getTransactionsPending",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "accountId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PendingTransactionItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the pending transfer holds for one of the caller's accounts",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/pending/{transferId}/{line}": {
      "get": {
        "description": "Once the transfer has executed, answers the posted line it became (its own id and status), as v2 kept one link per line. The caller must still be able to open it. Once it was cancelled, revoked or failed without posting, answers the same line with that final status.",
        "operationId": "getTransactionsPendingByTransferIdByLine",
        "parameters": [
          {
            "name": "transferId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "line",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "principal",
                "fee"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransactionDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one line of a pending transfer on one of the caller's accounts",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/pending/{transferId}/{line}/documents": {
      "get": {
        "description": "The documents attached to the pending transfer. No document gives an empty list.",
        "operationId": "getTransactionsPendingByTransferIdByLineDocuments",
        "parameters": [
          {
            "name": "transferId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "line",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "principal",
                "fee"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferDocumentDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the supporting documents of a pending line on one of the caller's accounts",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/pending/{transferId}/{line}/documents/{fileId}/download": {
      "get": {
        "operationId": "getTransactionsPendingByTransferIdByLineDocumentsByFileIdDownload",
        "parameters": [
          {
            "name": "transferId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "line",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "principal",
                "fee"
              ],
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Supporting document bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a supporting document of a pending line on one of the caller's accounts",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/{id}": {
      "get": {
        "operationId": "getTransactionsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransactionDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one of the caller's transactions",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/{id}/documents": {
      "get": {
        "description": "The documents attached to the transfer behind the line. Both sides of a transfer read them, as v2. A transfer with no document gives an empty list.",
        "operationId": "getTransactionsByIdDocuments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferDocumentDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the supporting documents of one of the caller's transactions",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/transactions/{id}/documents/{fileId}/download": {
      "get": {
        "operationId": "getTransactionsByIdDocumentsByFileIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Supporting document bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a supporting document of one of the caller's transactions",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/accounts/{id}/statement": {
      "get": {
        "operationId": "getAccountsByIdStatement",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "postedAt",
                "-postedAt",
                "id",
                "-id",
                "description",
                "-description",
                "amount",
                "-amount"
              ],
              "type": "string"
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatementResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Account statement over a date range (on-screen view)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/accounts/{id}/statement.csv": {
      "get": {
        "description": "Always queued as a report job for the caller. The response is 202 with the job row.",
        "operationId": "getAccountsByIdStatementCsv",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "postedAt",
                "-postedAt",
                "id",
                "-id",
                "description",
                "-description",
                "amount",
                "-amount"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download an account statement as CSV",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/accounts/{id}/statement.pdf": {
      "get": {
        "operationId": "getAccountsByIdStatementPdf",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "postedAt",
                "-postedAt",
                "id",
                "-id",
                "description",
                "-description",
                "amount",
                "-amount"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file download",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download an account statement as PDF",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/{id}/statement": {
      "get": {
        "operationId": "getAdminAccountsByIdStatement",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "postedAt",
                "-postedAt",
                "id",
                "-id",
                "description",
                "-description",
                "amount",
                "-amount"
              ],
              "type": "string"
            }
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatementResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Account statement for any account (admin)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/{id}/statement.csv": {
      "get": {
        "operationId": "getAdminAccountsByIdStatementCsv",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "postedAt",
                "-postedAt",
                "id",
                "-id",
                "description",
                "-description",
                "amount",
                "-amount"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download any account statement as CSV (admin)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/admin/accounts/{id}/statement.pdf": {
      "get": {
        "operationId": "getAdminAccountsByIdStatementPdf",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "postedAt",
                "-postedAt",
                "id",
                "-id",
                "description",
                "-description",
                "amount",
                "-amount"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file download",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download any account statement as PDF (admin)",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/v3/rates": {
      "get": {
        "operationId": "getRates",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RateResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the stored main→other rates for active currencies (unpaginated, sorted by code)",
        "tags": [
          "Exchange Rates"
        ]
      },
      "put": {
        "operationId": "putRates",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpsertRatesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RateResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set the rate for several main→other pairs in one request",
        "tags": [
          "Exchange Rates"
        ]
      }
    },
    "/v3/rates/feed-settings": {
      "get": {
        "operationId": "getRatesFeedSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RateFeedSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the ECB auto-update switch",
        "tags": [
          "Exchange Rates"
        ]
      },
      "put": {
        "operationId": "putRatesFeedSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateFeedSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RateFeedSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set the ECB auto-update switch (turning it on refreshes the ECB-hinted pairs now)",
        "tags": [
          "Exchange Rates"
        ]
      }
    },
    "/v3/rates/pair": {
      "get": {
        "operationId": "getRatesPair",
        "parameters": [
          {
            "name": "base",
            "required": true,
            "in": "query",
            "description": "Base currency code",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "required": true,
            "in": "query",
            "description": "Reference currency code",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PairRateResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the derived rate and margin for any currency pair",
        "tags": [
          "Exchange Rates"
        ]
      }
    },
    "/v3/rates/feed-providers": {
      "get": {
        "operationId": "getRatesFeedProviders",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FeedProviderResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the registered feed providers with the currencies they serve",
        "tags": [
          "Exchange Rates"
        ]
      }
    },
    "/v3/rates/crypto-feed-settings": {
      "get": {
        "description": "Returns 403 when the crypto module is off for the bank.",
        "operationId": "getRatesCryptoFeedSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CryptoFeedSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the crypto-feed switch, provider, and last update time",
        "tags": [
          "Exchange Rates"
        ]
      },
      "put": {
        "description": "Returns 403 when the crypto module is off for the bank.",
        "operationId": "putRatesCryptoFeedSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CryptoFeedSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CryptoFeedSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set the crypto-feed switch (turning it on prices the crypto pairs now)",
        "tags": [
          "Exchange Rates"
        ]
      }
    },
    "/v3/rates/{quoteCode}": {
      "get": {
        "operationId": "getRatesByQuoteCode",
        "parameters": [
          {
            "name": "quoteCode",
            "required": true,
            "in": "path",
            "description": "Quote currency code (the base is the main)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RateResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get the rate for one main→other pair",
        "tags": [
          "Exchange Rates"
        ]
      },
      "put": {
        "operationId": "putRatesByQuoteCode",
        "parameters": [
          {
            "name": "quoteCode",
            "required": true,
            "in": "path",
            "description": "Quote currency code (the base is the main)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RateResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set the rate for a main→other pair (recorded as manual)",
        "tags": [
          "Exchange Rates"
        ]
      }
    },
    "/v3/admin/transactions": {
      "get": {
        "operationId": "getAdminTransactions",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "description",
                "-description",
                "status",
                "-status",
                "statusChangedAt",
                "-statusChangedAt"
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "transaction id (exact) or reference (ILIKE)",
            "schema": {}
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "externalReferenceId",
            "required": false,
            "in": "query",
            "description": "exact match on the parent transfer's external reference (case-sensitive; alphanumeric groups joined by single hyphens, max 255 chars)",
            "schema": {}
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA | DINT | CLINT | MFEE | MBFEE",
            "schema": {}
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AdminTransactionListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Search transactions across all accounts (admin)",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v3/admin/transfers": {
      "get": {
        "description": "A date-only bound covers its whole day.",
        "operationId": "getAdminTransfers",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "scheme",
                "-scheme",
                "status",
                "-status"
              ]
            }
          },
          {
            "name": "imported",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true = batch-imported requests only, false = hand-raised only"
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "transfer request id, batch import id or external reference (exact)",
            "schema": {}
          },
          {
            "name": "statusChangedAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "transfers whose status last changed at or before this time; not before the from"
          },
          {
            "name": "statusChangedAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "transfers whose status last changed at or after this time"
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "externalReferenceId",
            "required": false,
            "in": "query",
            "description": "exact external reference (case-sensitive; alphanumeric groups joined by single hyphens, max 255 chars)",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA",
            "schema": {}
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "description": "Requests sent from or received by this account",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferRequestListItemViewDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List transfer requests across all customers (admin)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/export.csv": {
      "get": {
        "description": "Same filters and visibility as the register list, but always the full filtered set. A date-only bound covers its whole day. The export is always queued as a csv_export operation and the response is 202 with its row (see the import/export operations routes). An Idempotency-Key header dedupes it: a reused key answers with the operation it named, for the same filters only; without one every call queues a new operation.",
        "operationId": "getAdminTransfersExportCsv",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "scheme",
                "-scheme",
                "status",
                "-status"
              ]
            }
          },
          {
            "name": "imported",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true = batch-imported requests only, false = hand-raised only"
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "transfer request id or batch import id (exact)",
            "schema": {}
          },
          {
            "name": "statusChangedAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "transfers whose status last changed at or before this time; not before the from"
          },
          {
            "name": "statusChangedAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "transfers whose status last changed at or after this time"
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "externalReferenceId",
            "required": false,
            "in": "query",
            "description": "exact external reference (case-sensitive; alphanumeric groups joined by single hyphens, max 255 chars)",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA",
            "schema": {}
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "description": "Requests sent from or received by this account",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "The export was queued; the operation row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the transfer request register as CSV (admin)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/{id}": {
      "get": {
        "operationId": "getAdminTransfersById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferRequestDetailViewDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one transfer request in full (admin)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/{id}/documents": {
      "get": {
        "operationId": "getAdminTransfersByIdDocuments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferDocumentDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List a transfer's supporting documents (admin)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/{id}/documents/{fileId}/download": {
      "get": {
        "operationId": "getAdminTransfersByIdDocumentsByFileIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a transfer document (admin)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/transfers/{id}/transactions": {
      "get": {
        "description": "One line per money movement, such as the amount and the fee. A pending transfer lists the lines it will post, marked isPlanned. An unknown id returns an empty list.",
        "operationId": "getAdminTransfersByIdTransactions",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferTransactionLegDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the transactions a transfer produced (admin)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/admin/integrations/clearjunction": {
      "get": {
        "description": "Reports whether credentials are stored, the last 4 characters of the API key and when they were saved; never the key, the password or the reference to them.",
        "operationId": "getAdminIntegrationsClearjunction",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ClearjunctionSettingsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the tenant's ClearJunction settings and rail bindings",
        "tags": [
          "Integrations"
        ]
      }
    },
    "/v3/admin/integrations/clearjunction/credentials": {
      "put": {
        "description": "An empty key or password keeps the stored one. The key is not checked with ClearJunction. Storing it does not turn ClearJunction on: only EBANQ ops does. Refused on the public demo tenant.",
        "operationId": "putAdminIntegrationsClearjunctionCredentials",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClearjunctionCredentialsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ClearjunctionSettingsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Store the bank's ClearJunction API key, password and wallet",
        "tags": [
          "Integrations"
        ]
      }
    },
    "/v3/admin/corporate/profiles": {
      "post": {
        "operationId": "postAdminCorporateProfiles",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCorporateProfileDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a corporate profile (company), optionally with initial members",
        "tags": [
          "Corporate Profiles"
        ]
      },
      "get": {
        "operationId": "getAdminCorporateProfiles",
        "parameters": [
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Exclusive upper bound on the creation time: a company created exactly at this instant is left out, as in v2. A date-only value covers that whole day"
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive lower bound on the creation time"
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "registeredName",
                "-registeredName",
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt",
                "status",
                "-status",
                "updatedBy",
                "-updatedBy"
              ],
              "default": "registeredName"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "blocked"
              ]
            },
            "description": "Status filter. Accepts the shared operator forms (`status=`, `status[eq]=`, `status[neq]=`, `status[in]=`, `status[nin]=`); an unrecognized value narrows rather than failing"
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive contains filter over registered name, registration number and principal name, username or email"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateProfileListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the tenant corporate profiles (companies) with member counts, paginated, registered name asc",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/validate": {
      "post": {
        "description": "Read-only. Same uniqueness as the create endpoint: a value that passes here is not rejected by create as a duplicate.",
        "operationId": "postAdminCorporateProfilesValidate",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateCorporateProfileDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateProfileUniquenessDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Check whether a registered name or registration number is already taken",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/export.csv": {
      "get": {
        "description": "Same search, status filter and sort as the list, plus an inclusive creation-date range, always over the full filtered set — pagination doesn't apply. One row per company with its assigned-user count and split address. The export is always queued as a csv_export operation and the response is 202 with its row (see the import/export operations routes). An Idempotency-Key header dedupes it: a reused key answers with the operation it named, for the same filters only; without one every call queues a new operation.",
        "operationId": "getAdminCorporateProfilesExportCsv",
        "parameters": [
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "registeredName",
                "-registeredName",
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt",
                "status",
                "-status",
                "updatedBy",
                "-updatedBy"
              ],
              "default": "registeredName"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "blocked"
              ]
            },
            "description": "Status filter. Accepts the shared operator forms, like the list"
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive contains filter over registered name and registration number"
          }
        ],
        "responses": {
          "202": {
            "description": "The export was queued; the operation row is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the corporate profile register as CSV",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/import/template": {
      "get": {
        "operationId": "getAdminCorporateProfilesImportTemplate",
        "parameters": [],
        "responses": {
          "200": {
            "description": "CSV template download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download the corporate profile batch import CSV template",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/import": {
      "post": {
        "description": "One company per row through the single create path, each with the named principal contact as its member. A failing row is reported with its line and reason while the other rows still create.",
        "operationId": "postAdminCorporateProfilesImport",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateProfileImportResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Bulk-create corporate profiles from a CSV, per-row lenient",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/document-limits": {
      "get": {
        "description": "Set by EBANQ per tenant. The attach endpoint refuses anything outside them.",
        "operationId": "getAdminCorporateProfilesDocumentLimits",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CompanyDocumentLimitsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "How many documents a company can hold, and how large each may be",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/{id}": {
      "patch": {
        "operationId": "patchAdminCorporateProfilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCorporateProfileDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateProfileResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a corporate profile (company): details, status, and staged membership changes",
        "tags": [
          "Corporate Profiles"
        ]
      },
      "get": {
        "operationId": "getAdminCorporateProfilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateProfileDetailResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one corporate profile (company) with its assigned-member count",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/{id}/members": {
      "get": {
        "operationId": "getAdminCorporateProfilesByIdMembers",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "includeRemoved",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "activeOnly",
            "required": false,
            "in": "query",
            "description": "Only members whose profile is active and not blocked",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateProfileMemberDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List a company's active members with identity, role, and principal flag",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/{id}/members/unassign-preview": {
      "post": {
        "description": "Per requested member, the company accounts with the approval flow on and required for authorized users where they are an approver, and the one role that makes them one. A warning for the operator; the unassignment itself is not refused.",
        "operationId": "postAdminCorporateProfilesByIdMembersUnassignPreview",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberUnassignPreviewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MemberUnassignPreviewItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Preview which of a company's approval flows each member to be unassigned still serves",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/{id}/documents": {
      "get": {
        "operationId": "getAdminCorporateProfilesByIdDocuments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CompanyDocumentDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List a company's attached documents",
        "tags": [
          "Corporate Profiles"
        ]
      },
      "post": {
        "description": "Returns no body: the caller already holds the document from the upload it just made.",
        "operationId": "postAdminCorporateProfilesByIdDocuments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachCompanyDocumentDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Attach an already uploaded document to a company",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/{id}/documents/{fileId}/download": {
      "get": {
        "operationId": "getAdminCorporateProfilesByIdDocumentsByFileIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "disposition",
            "required": false,
            "in": "query",
            "schema": {
              "default": "attachment",
              "type": "string",
              "enum": [
                "attachment",
                "inline"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a company's document",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/profiles/{id}/documents/{fileId}": {
      "delete": {
        "operationId": "deleteAdminCorporateProfilesByIdDocumentsByFileId",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove a document from a company, deleting the stored file",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/admin/corporate/affiliations/{profileId}": {
      "get": {
        "operationId": "getAdminCorporateAffiliationsByProfileId",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateAffiliationResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one person's corporate affiliations: their companies and per-account roles under each",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/corporate/my-profiles": {
      "get": {
        "description": "Strictly caller-scoped: the member is resolved from the session and only their own active memberships are listed. Internal notes never appear on this read.",
        "operationId": "getCorporateMyProfiles",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "registeredName",
                "-registeredName",
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt",
                "status",
                "-status",
                "updatedBy",
                "-updatedBy"
              ],
              "default": "registeredName"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "rolePurpose",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "example": "principal_contact"
            },
            "description": "Narrows to companies where the caller's own role carries this purpose"
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "blocked"
              ]
            },
            "description": "Status filter. Accepts the shared operator forms (`status=`, `status[eq]=`, `status[neq]=`, `status[in]=`, `status[nin]=`); an unrecognized value narrows rather than failing"
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive contains filter over the company name and the principal contact's name, email, or username"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MyCorporateProfileListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's own companies, each with the caller's role in it",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/corporate/my-profiles/{id}": {
      "get": {
        "description": "Any active member of the company can read it, whatever their role holds. Without an active membership the answer is 403, even for a company that does not exist. Members are listed by name and status only. A blocked company is returned with its status. Internal notes are never included.",
        "operationId": "getCorporateMyProfilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MyCorporateProfileDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one of the caller's own companies: details, members with roles, and accounts",
        "tags": [
          "Corporate Profiles"
        ]
      }
    },
    "/v3/corporate/my-accounts": {
      "get": {
        "description": "Per-account assignment: an account of the same company without a binding for the caller is absent. Balance-free by contract; entries carry the owning company, the caller's role on the account, and the company's principal contact.",
        "operationId": "getCorporateMyAccounts",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MyCorporateAccountResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the corporate accounts the caller is assigned to",
        "tags": [
          "Corporate Accounts"
        ]
      }
    },
    "/v3/corporate/my-accounts/{id}": {
      "get": {
        "description": "The caller's role on this account must be able to view accounts. Anyone else gets 403, also for a personal account or one that does not exist. Read-only and balance-free; members are listed by name, status and role only.",
        "operationId": "getCorporateMyAccountsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MyCorporateAccountInfoDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one corporate account: company, type, approval settings and members",
        "tags": [
          "Corporate Accounts"
        ]
      }
    },
    "/v3/corporate/my-roles": {
      "get": {
        "description": "Every active membership of the caller: the company-level role of each company they belong to, and the role bound to each of its accounts they are assigned to (account null for a company-level role). Each role carries its grant atoms. Reporting only — the transfer and approval endpoints keep their own authorization.",
        "operationId": "getCorporateMyRoles",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateMyRoleResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the corporate roles the caller holds, company-level and account-level",
        "tags": [
          "Corporate My Roles"
        ]
      }
    },
    "/v3/corporate/user/info": {
      "get": {
        "description": "Two caller-scoped indicators: assigned to any corporate profile, assigned to any corporate account. Each is true exactly when the matching my-profiles / my-accounts list is non-empty; a soft-removed membership counts as no assignment.",
        "operationId": "getCorporateUserInfo",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateUserInfoResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Whether the caller has any corporate assignment",
        "tags": [
          "Corporate Accounts"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/options": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersOptions",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferOptionsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferOptionsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the candidate rails for the who step of a subject's transfer, with beneficiary input structure per rail and fee per option once a beneficiary is named (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/external": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersExternal",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "beneficiary": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "bankName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "nullable": true
                      },
                      "countryIso2": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "nullable": true
                      },
                      "addressLine1": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "addressLine2": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 100,
                        "nullable": true
                      },
                      "stateProvRegion": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "iban": {
                        "type": "string",
                        "maxLength": 34,
                        "nullable": true
                      },
                      "swiftBic": {
                        "type": "string",
                        "maxLength": 11,
                        "nullable": true
                      },
                      "accountNumber": {
                        "type": "string",
                        "maxLength": 70,
                        "nullable": true
                      },
                      "sortCode": {
                        "type": "string",
                        "maxLength": 35,
                        "nullable": true
                      },
                      "abaRtn": {
                        "type": "string",
                        "maxLength": 35,
                        "nullable": true
                      },
                      "bankAccountType": {
                        "type": "string",
                        "enum": [
                          "checking",
                          "savings"
                        ],
                        "nullable": true
                      },
                      "bankAddress": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "bankLocation": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "bankCountryIso2": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "nullable": true
                      },
                      "intermediaryBankName": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "intermediaryBankSwiftBic": {
                        "type": "string",
                        "maxLength": 11,
                        "nullable": true
                      },
                      "intermediaryBankAddress": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "intermediaryBankLocation": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "intermediaryBankCountryIso2": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "nullable": true
                      },
                      "intermediaryBankAbaRtn": {
                        "type": "string",
                        "pattern": "^\\d{1,9}$",
                        "nullable": true
                      },
                      "intermediaryBankAccIban": {
                        "type": "string",
                        "maxLength": 64,
                        "pattern": "^\\S+$",
                        "nullable": true
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "saveBeneficiary": {
                    "type": "boolean"
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "feeId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "beneficiaryId": {
                        "type": "integer",
                        "exclusiveMinimum": true,
                        "minimum": 0
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  },
                  "rail": {
                    "type": "string",
                    "enum": [
                      "SWIFT",
                      "SEPA_CT",
                      "SEPA_INST",
                      "FPS",
                      "CHAPS",
                      "ACH",
                      "FEDWIRE"
                    ]
                  }
                },
                "required": [
                  "fromAccountId",
                  "beneficiary",
                  "amount",
                  "currency",
                  "rail"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "correlationId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Submit an external transfer from a subject's account on their behalf (async, 202; parks for register release)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/preview": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersPreview",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee + FX for an external transfer from a subject's account and issue a rate-lock token (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/external": {
      "post": {
        "operationId": "postTransfersExternal",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "beneficiary": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "bankName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "nullable": true
                      },
                      "countryIso2": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "nullable": true
                      },
                      "addressLine1": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "addressLine2": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 100,
                        "nullable": true
                      },
                      "stateProvRegion": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "iban": {
                        "type": "string",
                        "maxLength": 34,
                        "nullable": true
                      },
                      "swiftBic": {
                        "type": "string",
                        "maxLength": 11,
                        "nullable": true
                      },
                      "accountNumber": {
                        "type": "string",
                        "maxLength": 70,
                        "nullable": true
                      },
                      "sortCode": {
                        "type": "string",
                        "maxLength": 35,
                        "nullable": true
                      },
                      "abaRtn": {
                        "type": "string",
                        "maxLength": 35,
                        "nullable": true
                      },
                      "bankAccountType": {
                        "type": "string",
                        "enum": [
                          "checking",
                          "savings"
                        ],
                        "nullable": true
                      },
                      "bankAddress": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "bankLocation": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "bankCountryIso2": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "nullable": true
                      },
                      "intermediaryBankName": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "intermediaryBankSwiftBic": {
                        "type": "string",
                        "maxLength": 11,
                        "nullable": true
                      },
                      "intermediaryBankAddress": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "intermediaryBankLocation": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                      },
                      "intermediaryBankCountryIso2": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "nullable": true
                      },
                      "intermediaryBankAbaRtn": {
                        "type": "string",
                        "pattern": "^\\d{1,9}$",
                        "nullable": true
                      },
                      "intermediaryBankAccIban": {
                        "type": "string",
                        "maxLength": 64,
                        "pattern": "^\\S+$",
                        "nullable": true
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "saveBeneficiary": {
                    "type": "boolean"
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "feeId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "beneficiaryId": {
                        "type": "integer",
                        "exclusiveMinimum": true,
                        "minimum": 0
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  },
                  "rail": {
                    "type": "string",
                    "enum": [
                      "SWIFT",
                      "SEPA_CT",
                      "SEPA_INST",
                      "FPS",
                      "CHAPS",
                      "ACH",
                      "FEDWIRE"
                    ]
                  },
                  "tan": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "A TAN, when the bank requires one for this transfer type"
                  }
                },
                "required": [
                  "fromAccountId",
                  "beneficiary",
                  "amount",
                  "currency",
                  "rail"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "awaitsApproval": {
                      "type": "boolean",
                      "description": "Present and true when the transfer was parked for authoriser approval"
                    },
                    "correlationId": {
                      "type": "string"
                    },
                    "resendIntervalInSeconds": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "issueAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "methodFallback": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "phone_approval",
                        "email",
                        "sms"
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "nullable": true,
                      "description": "Where the code went, masked; null when the phone decides"
                    },
                    "availableMethods": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "phone_approval",
                          "email",
                          "sms"
                        ]
                      },
                      "description": "Every method the customer can ask for now, this one included"
                    },
                    "recoveryCodeAvailable": {
                      "type": "boolean",
                      "description": "Whether to offer a recovery code: the tenant allows them and the customer still holds one"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Submit an external transfer on a named rail (async, returns 202)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/external/import/availability": {
      "get": {
        "description": "Reporting only, it never refuses, not even with the batch_import module off, which it reports as not enabled. The tenant switch and row cap, whether the caller is on the allow list and in an open audience, whether the tenant has ever imported, and the per-rail allowance the rail select needs. A rail is allowed when one account the caller may import from clears it: a personal account they own, or a company account where their role may initiate external transfers.",
        "operationId": "getTransfersExternalImportAvailability",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ExternalImportAvailabilityDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Report whether the caller can batch-import, and on which rails",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/external/import/{rail}/template": {
      "get": {
        "operationId": "getTransfersExternalImportByRailTemplate",
        "parameters": [
          {
            "name": "rail",
            "required": true,
            "in": "path",
            "description": "The external rail the file carries. Fixes the template, columns and creation path.",
            "schema": {
              "enum": [
                "swift",
                "sepa",
                "sepa-instant",
                "fps",
                "chaps"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV template download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a rail's batch-import CSV template",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/external/import/{rail}": {
      "post": {
        "description": "Every valid row becomes a pending transfer request through the single-transfer path of the rail in the URL; invalid rows are skipped and reported with per-row reasons. Requires the customer's authenticator-app code (totpCode form field).",
        "operationId": "postTransfersExternalImportByRail",
        "parameters": [
          {
            "name": "rail",
            "required": true,
            "in": "path",
            "description": "The external rail the file carries. Fixes the template, columns and creation path.",
            "schema": {
              "enum": [
                "swift",
                "sepa",
                "sepa-instant",
                "fps",
                "chaps"
              ],
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Per-row keys derive from it, so replaying a file cannot post rows twice",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "totpCode"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "totpCode": {
                    "type": "string",
                    "pattern": "^\\d{6}$",
                    "description": "The customer's authenticator-app code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ExternalImportResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Bulk-create a rail's transfer requests from a CSV, per-row lenient",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/external/import/{rail}/async": {
      "post": {
        "description": "Same file, same authenticator code and same per-row rules as the synchronous route, but the rows are applied by the operations runner. Returns the operation immediately; progress, counts and the result files are read from the operations surface.",
        "operationId": "postTransfersExternalImportByRailAsync",
        "parameters": [
          {
            "name": "rail",
            "required": true,
            "in": "path",
            "description": "The external rail the file carries. Fixes the template, columns and creation path.",
            "schema": {
              "enum": [
                "swift",
                "sepa",
                "sepa-instant",
                "fps",
                "chaps"
              ],
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Replaying a submit returns the operation it already created",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "totpCode"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "totpCode": {
                    "type": "string",
                    "pattern": "^\\d{6}$",
                    "description": "The customer's authenticator-app code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportExportOperationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Queue a rail's batch import as an async operation",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/tba": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersTba",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "toAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 140,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "feeId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "template": {
                    "not": {}
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "fromAccountId",
                  "toAccountId",
                  "amount",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "correlationId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Submit a transfer between a subject's own accounts on their behalf (async, 202)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/tba/preview": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersTbaPreview",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TbaPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee + FX for a transfer between a subject's own accounts (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/tba": {
      "post": {
        "operationId": "postTransfersTba",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "toAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 140,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "feeId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "template": {
                    "not": {}
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  },
                  "tan": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "A TAN, when the bank requires one for this transfer type"
                  }
                },
                "required": [
                  "fromAccountId",
                  "toAccountId",
                  "amount",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "awaitsApproval": {
                      "type": "boolean",
                      "description": "Present and true when the transfer was parked for authoriser approval"
                    },
                    "correlationId": {
                      "type": "string"
                    },
                    "resendIntervalInSeconds": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "issueAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "methodFallback": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "phone_approval",
                        "email",
                        "sms"
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "nullable": true,
                      "description": "Where the code went, masked; null when the phone decides"
                    },
                    "availableMethods": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "phone_approval",
                          "email",
                          "sms"
                        ]
                      },
                      "description": "Every method the customer can ask for now, this one included"
                    },
                    "recoveryCodeAvailable": {
                      "type": "boolean",
                      "description": "Whether to offer a recovery code: the tenant allows them and the customer still holds one"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Submit a transfer between own accounts (async, returns 202)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/tbu": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersTbu",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "toAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "recipientUsername": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 140,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "feeId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "fromAccountId",
                  "toAccountId",
                  "recipientUsername",
                  "amount",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "correlationId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Submit a transfer to another user from a subject's account on their behalf (async, 202)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/profiles/{profileId}/transfers/tbu/preview": {
      "post": {
        "operationId": "postProfilesByProfileIdTransfersTbuPreview",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TbuPreviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferPreviewQuoteResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Quote fee + FX for a transfer to another user from a subject's account (no writes)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/tbu": {
      "post": {
        "operationId": "postTransfersTbu",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "toAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "recipientUsername": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 140,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "feeId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  },
                  "tan": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "A TAN, when the bank requires one for this transfer type"
                  }
                },
                "required": [
                  "fromAccountId",
                  "toAccountId",
                  "recipientUsername",
                  "amount",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "awaitsApproval": {
                      "type": "boolean",
                      "description": "Present and true when the transfer was parked for authoriser approval"
                    },
                    "correlationId": {
                      "type": "string"
                    },
                    "resendIntervalInSeconds": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "issueAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "methodFallback": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "phone_approval",
                        "email",
                        "sms"
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "nullable": true,
                      "description": "Where the code went, masked; null when the phone decides"
                    },
                    "availableMethods": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "phone_approval",
                          "email",
                          "sms"
                        ]
                      },
                      "description": "Every method the customer can ask for now, this one included"
                    },
                    "recoveryCodeAvailable": {
                      "type": "boolean",
                      "description": "Whether to offer a recovery code: the tenant allows them and the customer still holds one"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Submit a transfer to another platform user (async, returns 202)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/cft": {
      "post": {
        "operationId": "postTransfersCft",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "toAccountId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d{1,18}(?:\\.\\d{1,18})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z]{2,8}$"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 140,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "nullable": true
                  },
                  "externalReferenceId": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
                    "nullable": true
                  },
                  "documentFileId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "nullable": true
                  },
                  "rateLockInToken": {
                    "type": "string"
                  },
                  "feeId": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true
                  },
                  "tan": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "A TAN, when the bank requires one for this transfer type"
                  }
                },
                "required": [
                  "fromAccountId",
                  "toAccountId",
                  "amount",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate",
                        "executed",
                        "aborted",
                        "processing",
                        "challenge_pending"
                      ]
                    },
                    "awaitsApproval": {
                      "type": "boolean",
                      "description": "Present and true when the transfer was parked for authoriser approval"
                    },
                    "correlationId": {
                      "type": "string"
                    },
                    "resendIntervalInSeconds": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "issueAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "methodFallback": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "phone_approval",
                        "email",
                        "sms"
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "nullable": true,
                      "description": "Where the code went, masked; null when the phone decides"
                    },
                    "availableMethods": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "phone_approval",
                          "email",
                          "sms"
                        ]
                      },
                      "description": "Every method the customer can ask for now, this one included"
                    },
                    "recoveryCodeAvailable": {
                      "type": "boolean",
                      "description": "Whether to offer a recovery code: the tenant allows them and the customer still holds one"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Fund a card from an account (async, returns 202)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/templates": {
      "get": {
        "description": "Templates on a rail the tenant has switched off are left out (they return when the rail does). When the tenant hides inactive accounts from customers, a template whose source or destination account is no longer active is left out too.",
        "operationId": "getTransfersTemplates",
        "parameters": [
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "rail: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU; type[in|eq|neq|nin]=…",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferTemplateResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's saved transfer templates",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/templates/{id}": {
      "delete": {
        "operationId": "deleteTransfersTemplatesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a saved transfer template (transfers made from it are unaffected)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/approval-challenges/stream": {
      "get": {
        "description": "Server-sent events. Each `approval-challenge` message carries one event for a challenge the caller parked: pending, approved (with the transfer), declined, or failed (expired, or the approved submit was refused). Live only: nothing is replayed to a client that connects after the event. A data-less `keepalive` message goes out every 15 seconds; the connection closes after 30 minutes, or sooner if the session is revoked. Reconnect either way.",
        "operationId": "getApprovalChallengesStream",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Event stream; each message is one approval challenge event",
            "content": {
              "text/event-stream": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApprovalChallengePendingEventDto"
                    },
                    {
                      "$ref": "#/components/schemas/ApprovalChallengeApprovedEventDto"
                    },
                    {
                      "$ref": "#/components/schemas/ApprovalChallengeDeclinedEventDto"
                    },
                    {
                      "$ref": "#/components/schemas/ApprovalChallengeFailedEventDto"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "status"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Stream the caller’s mobile approval challenge events",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/approval-challenges/{id}/approve": {
      "post": {
        "description": "Settles the challenge as approved and submits the transfer it parked, from the payload stored with the challenge. The first decision is final: a second one answers 409. The submit pipeline’s own checks still apply, so a refusal there (funds, rail) is relayed as its own error while the challenge stays approved. Only the paired phone decides: any other session answers 403 iam.mobile_device.inactive.",
        "operationId": "postApprovalChallengesByIdApprove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApprovalChallengeDecisionDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone — the resource existed but passed its deadline and can no longer be acted on",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Approve a pending mobile approval challenge",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/approval-challenges/{id}/decline": {
      "post": {
        "description": "Settles the challenge as declined; the parked submission is never submitted. The app also calls this when its countdown runs out, so a decline that lands just after the server-side deadline answers 410 rather than a conflict. The first decision is final. Any session of the customer may call their own challenge off, whichever way it was to be answered: refusing needs no second factor, only approving does.",
        "operationId": "postApprovalChallengesByIdDecline",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApprovalChallengeDecisionDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone — the resource existed but passed its deadline and can no longer be acted on",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Decline a pending challenge",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/approval-challenges/{id}/verify": {
      "post": {
        "description": "Checks the code and, when it matches, approves the challenge and submits the transfer. Send the code from the email or SMS, or a recovery code. A wrong code returns 422 accounts.transfer.signing.invalid_code; too many wrong codes return 422 accounts.transfer.signing.locked. A sent code on a challenge waiting on the phone returns 409. A recovery code returns 409 accounts.transfer.approval_challenge.recovery_code_unavailable when the bank has recovery codes turned off.",
        "operationId": "postApprovalChallengesByIdVerify",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalChallengeVerifyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApprovalChallengeDecisionDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone — the resource existed but passed its deadline and can no longer be acted on",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Answer a pending challenge with the code sent, or a recovery code",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/approval-challenges/{id}/resend": {
      "post": {
        "description": "Sends a new code by email or SMS, or a new push to the paired phone. The old code stops working and the deadline moves to the new code’s. method is optional; without it the challenge is sent the same way as before. recovery_code sends nothing and gives the customer a fresh window to answer with a recovery code. A customer’s own challenge that timed out is opened again the same way, up to one hour after the transfer was submitted; its old code stops working and any newer challenge for the same transfer is voided. Errors: 429 accounts.transfer.approval_challenge.resend_too_soon with Retry-After (seconds to wait) when asked again too soon; 409 accounts.transfer.approval_challenge.recovery_code_unavailable when recovery codes are off or the customer has none left; 422 accounts.transfer.signing.locked when the customer is locked out after too many wrong codes; 503 notifications.sms.not_configured when an SMS challenge is resent by SMS after the tenant removed its SMS provider (asking for email still works).",
        "operationId": "postApprovalChallengesByIdResend",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalChallengeResendBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApprovalChallengeAckDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Gone — the resource existed but passed its deadline and can no longer be acted on",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Send a pending or timed-out challenge again, the same way or another",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/transfers/{id}/execute": {
      "post": {
        "operationId": "postTransfersByIdExecute",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Execute a pending transfer (any scheme)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/{id}/cancel": {
      "post": {
        "operationId": "postTransfersByIdCancel",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelTransferRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Cancel a pending transfer (any scheme)",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/{id}/process": {
      "post": {
        "operationId": "postTransfersByIdProcess",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Mark a pending transfer as processing once the bank has handed it to its provider",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/{id}/external-reference": {
      "put": {
        "operationId": "putTransfersByIdExternalReference",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTransferExternalReferenceDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set or update a transfer request's external reference id",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/transfers/{id}/rate": {
      "put": {
        "operationId": "putTransfersByIdRate",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverrideTransferRateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Override the FX rate on a pending cross-currency transfer",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/jobs": {
      "get": {
        "description": "The caller's own jobs from both queues within their retention windows, newest first. Report exports carry a fileId for the report download route; operations carry outputFileId and errorFileId for the operation routes.",
        "operationId": "getJobs",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt"
              ],
              "default": "-createdAt"
            }
          },
          {
            "name": "filter[dateTo]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[dateFrom]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[status]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "running",
                "completed",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "filter[type]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv_import",
                "csv_export",
                "pdf_export"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CustomerJobRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List my report exports and import/export operations as one queue",
        "tags": [
          "Jobs"
        ]
      }
    },
    "/v3/admin/jobs": {
      "get": {
        "description": "Report jobs within the caller’s report-jobs access (with reports.jobs.manage_any, own and other admins’ jobs, never a customer’s, and root’s only for root; with reports.jobs.view, own jobs; with a report’s own view key, own jobs of that family; none without any) plus the caller’s own import/export operations, each within its retention window, newest first. Report rows carry a fileId for the report download route; operations carry outputFileId and errorFileId for the operation routes.",
        "operationId": "getAdminJobs",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt"
              ],
              "default": "-createdAt"
            }
          },
          {
            "name": "filter[dateTo]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[dateFrom]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[type]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated, of: csv_import | csv_export | pdf_export"
          },
          {
            "name": "filter[status]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated, of: queued | running | completed | failed | cancelled. Operations are matched through the same mapping the rows use (pending→queued, in_progress→running, finished→completed, failed→failed)."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AdminJobRowDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List report jobs and import/export operations as one queue (admin)",
        "tags": [
          "Jobs"
        ]
      }
    },
    "/v3/corporate/requests": {
      "get": {
        "description": "Merged across every company the caller is an active member of, newest first unless sorted otherwise. Visibility follows the corporate role bound on each source account: authorize or view atoms show the account's requests, init atoms only the caller's own.",
        "operationId": "getCorporateRequests",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "description": "account id (exact)",
            "schema": {
              "example": "42"
            }
          },
          {
            "name": "idxCommonID",
            "required": false,
            "in": "query",
            "description": "request id or batch id (exact)",
            "schema": {
              "example": "42"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "transfer request id (exact)",
            "schema": {}
          },
          {
            "name": "batchId",
            "required": false,
            "in": "query",
            "description": "batch import id (exact)",
            "schema": {}
          },
          {
            "name": "idSearch",
            "required": false,
            "in": "query",
            "description": "transfer request id or batch import id (exact on either)",
            "schema": {}
          },
          {
            "name": "imported",
            "required": false,
            "in": "query",
            "description": "batch-imported only (true) or hand-raised only (false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "scheme",
                "-scheme",
                "status",
                "-status",
                "batchId",
                "-batchId",
                "companyName",
                "-companyName",
                "statusChangedAt",
                "-statusChangedAt",
                "description",
                "-description",
                "subject",
                "-subject"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateRequestListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the corporate transfer requests visible to the caller (maker-checker queue)",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/currencies": {
      "get": {
        "description": "The choices for the queue currency filter: the currency of every account the caller may see requests on, whether or not it holds one, sorted, each once.",
        "operationId": "getCorporateRequestsCurrencies",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "EUR"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the currencies of the caller's corporate accounts for the request queue",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/pending-approval/{accountId}": {
      "get": {
        "operationId": "getCorporateRequestsPendingApprovalByAccountId",
        "parameters": [
          {
            "name": "accountId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "boolean"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Check for visible pending corporate approvals on one account",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/export.csv": {
      "get": {
        "description": "Always queued as a report job for the caller. The response is 202 with the job row. Same visibility, filters and sort as the request list, but always the full filtered set and only the settled register: requests pending approval, revoked requests, and internal transfers that executed on submission without approval are excluded.",
        "operationId": "getCorporateRequestsExportCsv",
        "parameters": [
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "description": "account id (exact)",
            "schema": {
              "example": "42"
            }
          },
          {
            "name": "idxCommonID",
            "required": false,
            "in": "query",
            "description": "request id or batch id (exact)",
            "schema": {
              "example": "42"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "transfer request id (exact)",
            "schema": {}
          },
          {
            "name": "batchId",
            "required": false,
            "in": "query",
            "description": "batch import id (exact)",
            "schema": {}
          },
          {
            "name": "idSearch",
            "required": false,
            "in": "query",
            "description": "transfer request id or batch import id (exact on either)",
            "schema": {}
          },
          {
            "name": "imported",
            "required": false,
            "in": "query",
            "description": "batch-imported only (true) or hand-raised only (false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "scheme",
                "-scheme",
                "status",
                "-status",
                "batchId",
                "-batchId",
                "companyName",
                "-companyName",
                "statusChangedAt",
                "-statusChangedAt",
                "description",
                "-description",
                "subject",
                "-subject"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the caller's corporate transfer requests as CSV",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/export.pdf": {
      "get": {
        "description": "Same visibility, filters, sort and columns as the CSV export, always the full filtered set, but every visible request: pending-approval and revoked requests are listed too. A small register is the rendered file; a larger one is queued as a report job for the caller and the response is 202 with the job row.",
        "operationId": "getCorporateRequestsExportPdf",
        "parameters": [
          {
            "name": "accountId",
            "required": false,
            "in": "query",
            "description": "account id (exact)",
            "schema": {
              "example": "42"
            }
          },
          {
            "name": "idxCommonID",
            "required": false,
            "in": "query",
            "description": "request id or batch id (exact)",
            "schema": {
              "example": "42"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "eq | status[in|eq|neq|nin]=…",
            "schema": {}
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU",
            "schema": {}
          },
          {
            "name": "currency",
            "required": false,
            "in": "query",
            "description": "Currency code(s), eq | in",
            "schema": {}
          },
          {
            "name": "createdAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "transfer request id (exact)",
            "schema": {}
          },
          {
            "name": "batchId",
            "required": false,
            "in": "query",
            "description": "batch import id (exact)",
            "schema": {}
          },
          {
            "name": "idSearch",
            "required": false,
            "in": "query",
            "description": "transfer request id or batch import id (exact on either)",
            "schema": {}
          },
          {
            "name": "imported",
            "required": false,
            "in": "query",
            "description": "batch-imported only (true) or hand-raised only (false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "amount",
                "-amount",
                "scheme",
                "-scheme",
                "status",
                "-status",
                "batchId",
                "-batchId",
                "companyName",
                "-companyName",
                "statusChangedAt",
                "-statusChangedAt",
                "description",
                "-description",
                "subject",
                "-subject"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file download",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "A report job was queued for the caller and its row is returned instead of the file.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ReportJobRowDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Export the caller's corporate transfer requests as PDF",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/{id}": {
      "get": {
        "description": "The complete record a member reviews before an irreversible approve or reject: amounts and FX where cross-currency, the immutable submit-time beneficiary snapshot, the initiating member, the deciding member and reason once decided. A request outside the visibility policy — another company, a personal transfer, or a missing view grant — gets the same 404 as an id that does not exist.",
        "operationId": "getCorporateRequestsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one corporate transfer request in full",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/{id}/transactions": {
      "get": {
        "operationId": "getCorporateRequestsByIdTransactions",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateRequestLineDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read corporate request transaction lines",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/{id}/documents/{fileId}/download": {
      "get": {
        "operationId": "getCorporateRequestsByIdDocumentsByFileIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Supporting document bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download a corporate request supporting document through the session",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/{id}/documents": {
      "get": {
        "description": "The evidence a member reviews before deciding: each document attached to the request, without issuing a download link. A request outside the visibility policy gets the same 404 as an id that does not exist; a request with no documents gets an empty list.",
        "operationId": "getCorporateRequestsByIdDocuments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateRequestDocumentDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List a corporate transfer request's supporting documents",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/{id}/approve": {
      "post": {
        "operationId": "postCorporateRequestsByIdApprove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateTransferRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Approve a pending-approval corporate transfer request",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/corporate/requests/{id}/reject": {
      "post": {
        "description": "Sends the request to revoked and releases the full reservation (principal plus any reserved fee) back to the source account. An optional reason is persisted with the deciding member. Irreversible: revoked is terminal.",
        "operationId": "postCorporateRequestsByIdReject",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectCorporateRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateTransferRequestDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Reject a pending-approval corporate transfer request",
        "tags": [
          "Corporate Requests"
        ]
      }
    },
    "/v3/approval-challenges": {
      "get": {
        "description": "Pending and decided challenges of the authenticated customer, newest first unless `sort` asks otherwise. A pending row carries the deadline the app counts down to. Only the paired phone reads it: any other session answers 403 iam.mobile_device.inactive.",
        "operationId": "getApprovalChallenges",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "status",
                "-status"
              ],
              "default": "-createdAt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApprovalChallengeListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's mobile approval challenges",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/approval-challenges/{id}": {
      "get": {
        "description": "The inbox row for one challenge, so a push tap opens it by id instead of paging the inbox. Pending, decided, expired and voided challenges all answer with their status. An unknown or another customer’s challenge answers 404. Only the paired phone reads it: any other session answers 403 iam.mobile_device.inactive.",
        "operationId": "getApprovalChallengesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Approval challenge id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApprovalChallengeListItemDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one of the caller’s mobile approval challenges",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/approval-challenges/{id}/acknowledgement": {
      "post": {
        "description": "The mobile app reports it showed the approval push. The first acknowledgement is recorded on the challenge; a repeat answers 204 without a change, and a decided or expired challenge still accepts it. An unknown or another customer’s challenge answers 404, and a run of those from one caller is throttled. Any session but the paired phone’s answers 403 iam.mobile_device.inactive.",
        "operationId": "postApprovalChallengesByIdAcknowledgement",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Approval challenge id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Acknowledgement recorded"
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Acknowledge the push for one of the caller’s approval challenges",
        "tags": [
          "Approval Challenges"
        ]
      }
    },
    "/v3/transfers/recipients/resolve": {
      "post": {
        "operationId": "postTransfersRecipientsResolve",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecipientResolveDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RecipientResolveResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Resolve a platform-user recipient by username and account number",
        "tags": [
          "Transfers"
        ]
      }
    },
    "/v3/files": {
      "post": {
        "description": "A file over the tenant's size limit (5 MB unless the tenant changes it, never more than 10 MB) is rejected with 400. Customer profile documents are checked against the storage limit at upload and attach; admin uploads are checked at attach. An upload past the per-user limit (10 in any minute by default) is refused with 429.",
        "operationId": "postFiles",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Retrying with the same key and file returns the same reference. The same key with a different file is 409.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "category"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "transfer_supporting_document",
                      "company_document",
                      "profile_document",
                      "card_type_icon"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoredFileDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Store a file and receive a reference id",
        "tags": [
          "Files"
        ]
      }
    },
    "/v3/files/{id}/download": {
      "get": {
        "operationId": "getFilesByIdDownload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download file bytes behind the caller session",
        "tags": [
          "Files"
        ]
      }
    },
    "/v3/files/{id}": {
      "get": {
        "operationId": "getFilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FileMetadataDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read a stored file's metadata without its content",
        "tags": [
          "Files"
        ]
      },
      "delete": {
        "operationId": "deleteFilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a stored file",
        "tags": [
          "Files"
        ]
      }
    },
    "/v3/public/files/{id}": {
      "get": {
        "operationId": "getPublicFilesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file bytes, served under their stored content type — inline for images, attachment for everything else",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Serve a public file (no session)",
        "tags": [
          "Public Files"
        ]
      }
    },
    "/v3/admin/webhook-deliveries": {
      "get": {
        "description": "At least one of moduleId, eventKey or status is required.",
        "operationId": "getAdminWebhookDeliveries",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "delivery status: eq | status[in|eq|neq|nin]=… of pending | success | failed | dropped. A failed delivery matches only when the partner answered it",
            "schema": {}
          },
          {
            "name": "eventKey",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only deliveries of this event"
          },
          {
            "name": "moduleId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Only deliveries sent to this webhook module"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebhookDeliveryDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List webhook deliveries (admin)",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v3/admin/webhook-deliveries/{id}": {
      "get": {
        "operationId": "getAdminWebhookDeliveriesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WebhookDeliveryDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one webhook delivery with its bodies and send history (admin)",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v3/admin/webhook-deliveries/{id}/retry": {
      "post": {
        "operationId": "postAdminWebhookDeliveriesByIdRetry",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WebhookDeliveryDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Send a failed webhook delivery again and read it with its send history (admin)",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v3/tenant/identity": {
      "get": {
        "operationId": "getTenantIdentity",
        "parameters": [
          {
            "name": "locale",
            "required": false,
            "in": "query",
            "description": "The visitor's locale, as a platform code (de_DE) or BCP-47 tag (de-DE). Anything else, or none, uses the tenant's default language.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TenantIdentityResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Tenant branding, theme, shell config, and login panel text for the current host.",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/color-schemes": {
      "get": {
        "operationId": "getColorSchemes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ColorSchemeListResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the colour schemes, Default first, with the active one",
        "tags": [
          "Tenant"
        ]
      },
      "post": {
        "operationId": "postColorSchemes",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColorSchemeBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ColorSchemeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a colour scheme",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/color-schemes/active": {
      "put": {
        "operationId": "putColorSchemesActive",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateColorSchemeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ActiveColorSchemeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Make a scheme (or Default, with null) the active one",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/color-schemes/{id}": {
      "get": {
        "operationId": "getColorSchemesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ColorSchemeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one colour scheme",
        "tags": [
          "Tenant"
        ]
      },
      "patch": {
        "operationId": "patchColorSchemesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColorSchemeBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ColorSchemeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Replace a colour scheme; repaints both apps if it is active",
        "tags": [
          "Tenant"
        ]
      },
      "delete": {
        "operationId": "deleteColorSchemesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a colour scheme (refused while it is active)",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/intercom/settings": {
      "get": {
        "description": "With the Intercom module or widget off, or when the settings cannot be read, this reports `enabled: false`. 404 only for a host that is not an active tenant.",
        "operationId": "getIntercomSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IntercomSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Intercom chat widget settings for the current host, readable before login.",
        "tags": [
          "Intercom"
        ]
      }
    },
    "/v3/intercom/identity-hash": {
      "get": {
        "description": "HMAC of the caller's own profile id under the tenant's Intercom identity secret. Always the caller's own — there is no way to ask for another customer's. Boot the widget with the returned `userId` as `user_id` and the `hash` as `user_hash`; signing one identifier and booting another is rejected by Intercom.",
        "operationId": "getIntercomIdentityHash",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IntercomIdentityHashDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Identity-verification hash for the calling customer's Intercom widget",
        "tags": [
          "Intercom"
        ]
      }
    },
    "/v3/transfer-fees": {
      "get": {
        "operationId": "getTransferFees",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferFeeConfigResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List transfer fee configs with per-currency parameters",
        "tags": [
          "Transfer Fees"
        ]
      },
      "post": {
        "operationId": "postTransferFees",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransferFeeConfigDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferFeeConfigResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a transfer fee config",
        "tags": [
          "Transfer Fees"
        ]
      }
    },
    "/v3/transfer-fees/schemes": {
      "get": {
        "operationId": "getTransferFeesSchemes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "SWIFT",
                              "SEPA_CT",
                              "SEPA_INST",
                              "FPS",
                              "CHAPS",
                              "ACH",
                              "FEDWIRE",
                              "CFT",
                              "TBA",
                              "TBU",
                              "INCOMING"
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the fee-chargeable schemes active for the tenant",
        "tags": [
          "Transfer Fees"
        ]
      }
    },
    "/v3/transfer-fees/user-groups": {
      "get": {
        "operationId": "getTransferFeesUserGroups",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FeeUserGroupNameResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the id and name of every user group, for the fee pages",
        "tags": [
          "Transfer Fees"
        ]
      }
    },
    "/v3/transfer-fees/{id}": {
      "get": {
        "operationId": "getTransferFeesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferFeeConfigResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get one transfer fee config",
        "tags": [
          "Transfer Fees"
        ]
      },
      "patch": {
        "operationId": "patchTransferFeesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTransferFeeConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TransferFeeConfigResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a transfer fee config (parameters are replaced when present)",
        "tags": [
          "Transfer Fees"
        ]
      },
      "delete": {
        "operationId": "deleteTransferFeesById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete a transfer fee config (parameters cascade)",
        "tags": [
          "Transfer Fees"
        ]
      }
    },
    "/v3/admin/corporate/roles": {
      "post": {
        "operationId": "postAdminCorporateRoles",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCorporateRoleDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateRoleResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Create a corporate user role with its grant list",
        "tags": [
          "Corporate Roles"
        ]
      },
      "get": {
        "operationId": "getAdminCorporateRoles",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "id",
                "-id"
              ],
              "default": "name"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CorporateRoleListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the tenant's corporate user roles (paginated, name-sorted unless `sort` says otherwise)",
        "tags": [
          "Corporate Roles"
        ]
      }
    },
    "/v3/admin/corporate/roles/{roleId}": {
      "get": {
        "operationId": "getAdminCorporateRolesByRoleId",
        "parameters": [
          {
            "name": "roleId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateRoleResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one corporate user role with its grant list",
        "tags": [
          "Corporate Roles"
        ]
      },
      "put": {
        "operationId": "putAdminCorporateRolesByRoleId",
        "parameters": [
          {
            "name": "roleId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCorporateRoleDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporateRoleResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update a corporate user role's name, description, and grant list",
        "tags": [
          "Corporate Roles"
        ]
      }
    },
    "/v3/admin/corporate/permission-actions": {
      "get": {
        "operationId": "getAdminCorporatePermissionActions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CorporatePermissionActionsDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the grantable corporate permission actions, arranged for the role form",
        "tags": [
          "Corporate Roles"
        ]
      }
    },
    "/v3/notifications": {
      "get": {
        "operationId": "getNotifications",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/NotificationListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's own notifications, newest first",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/v3/notifications/unread-count": {
      "get": {
        "operationId": "getNotificationsUnreadCount",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UnreadNotificationCountDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Count the caller's unread notifications (the bell badge)",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/v3/notifications/read-all": {
      "post": {
        "description": "Idempotent: a caller with nothing unread succeeds and writes nothing.",
        "operationId": "postNotificationsReadAll",
        "parameters": [],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Mark all of the caller's notifications read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/v3/notifications/{id}/read": {
      "post": {
        "description": "Idempotent: an already-read notification succeeds and writes nothing. A notification belonging to another profile is the same 404 as an id that does not exist. A read-once notification's body is returned only by the call that marks it read; every other call returns a null body.",
        "operationId": "postNotificationsByIdRead",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/NotificationReadResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Mark one of the caller-owned notifications read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/v3/notifications/{id}": {
      "delete": {
        "description": "A notification belonging to another profile is the same 404 as an id that does not exist.",
        "operationId": "deleteNotificationsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Delete one of the caller-owned notifications",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/v3/message-threads": {
      "get": {
        "description": "A customer sees the threads they take part in. Staff allowed to handle incoming messages also see every thread a customer started; staff allowed to handle all messages see every thread in the tenant. Threads the platform sends stay visible only to their participants.",
        "operationId": "getMessageThreads",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-lastMessageAt",
                "lastMessageAt",
                "-createdAt",
                "createdAt",
                "subject",
                "-subject"
              ],
              "default": "-lastMessageAt"
            }
          },
          {
            "name": "unread",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true = unread threads only, false = read threads only"
          },
          {
            "name": "lastMessageAtTo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "A date-only bound covers its whole day."
          },
          {
            "name": "lastMessageAtFrom",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "incoming",
                "outgoing"
              ],
              "default": "all"
            },
            "description": "Relative to the latest message sender; platform messages are incoming."
          },
          {
            "name": "searchIn",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "subject",
                "body"
              ],
              "default": "all"
            },
            "description": "all = subject or any message body"
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "substring, case-insensitive",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MessageThreadListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the caller's message threads, newest activity first",
        "tags": [
          "Message Threads"
        ]
      },
      "post": {
        "description": "Customer-only (an admin composes through /admin/message-threads). The thread opens read for the sender and unread for every admin who can see it.",
        "operationId": "postMessageThreads",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMessageThreadDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MessageThreadListItemDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start a message thread to the bank",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/message-threads/unread-count": {
      "get": {
        "operationId": "getMessageThreadsUnreadCount",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UnreadMessageThreadCountDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Count the caller's unread threads (the Messages badge)",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/message-threads/{id}": {
      "get": {
        "description": "The whole conversation oldest-first, with sender identity. Opening marks the thread read for the caller only — the other party's unread state is untouched. A thread outside the caller's scope is the same 404 as an id that does not exist.",
        "operationId": "getMessageThreadsById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MessageThreadDetailDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Open a message thread",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/message-threads/{id}/replies": {
      "post": {
        "description": "Whoever may open the thread may reply to it. The reply marks the thread read for the caller and unread again for every other participant. A thread outside the caller's scope is the same 404 as an id that does not exist.",
        "operationId": "postMessageThreadsByIdReplies",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyToMessageThreadDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ThreadMessageDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Reply within a message thread",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/admin/message-threads": {
      "post": {
        "description": "One recipient gets a thread private to them and the sender. Two or more share one broadcast thread with `isPickedAudience` set: they never see each other, an admin reply reaches all of them, and a recipient who replies gets a private thread with the conversation copied in. The response holds that one thread. Recipients must be existing customer profiles, and a rejected recipient creates nothing.",
        "operationId": "postAdminMessageThreads",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeMessageThreadsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MessageThreadListItemDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Compose a message to one or more customers",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/admin/message-threads/{id}/replies": {
      "post": {
        "description": "Same semantics as the shared reply: whoever may open the thread may reply to it, the reply marks the thread read for the caller and unread again for every other participant, and a thread outside the caller's scope is the same 404 as an id that does not exist.",
        "operationId": "postAdminMessageThreadsByIdReplies",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyToMessageThreadDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ThreadMessageDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Reply within a message thread as back-office staff",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/admin/message-threads/broadcast": {
      "post": {
        "description": "One thread shared by every customer, or only by members of `userGroupId` when given. The sender sees one entry; a customer who replies gets a private thread with the broadcast copied in. `recipientCount` is the membership at the time it was accepted.",
        "operationId": "postAdminMessageThreadsBroadcast",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BroadcastMessageThreadsDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MessageThreadBroadcastAcceptedDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Broadcast a message to every customer in the tenant, or to one user group",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/admin/message-threads/recipients": {
      "get": {
        "operationId": "getAdminMessageThreadsRecipients",
        "parameters": [
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Name or profile identifier",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MessageRecipientDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Search customers to address a message to",
        "tags": [
          "Message Threads"
        ]
      }
    },
    "/v3/tenant-config": {
      "get": {
        "operationId": "getTenantConfig",
        "parameters": [
          {
            "name": "namespace",
            "required": true,
            "in": "query",
            "schema": {
              "example": "general",
              "type": "string"
            }
          },
          {
            "name": "key",
            "required": true,
            "in": "query",
            "schema": {
              "example": "site_name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TenantConfigResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read one effective tenant configuration value",
        "tags": [
          "Tenant"
        ]
      },
      "put": {
        "operationId": "putTenantConfig",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TenantConfigResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Write one tenant configuration value",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/tenant-config/transfers/wire-mandatory-field": {
      "put": {
        "operationId": "putTenantConfigTransfersWireMandatoryField",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WireMandatoryFieldDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WireMandatoryFieldResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set whether a SWIFT transfer requires a BIC or a routing number",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/tenant-config/transfers/available-types": {
      "put": {
        "operationId": "putTenantConfigTransfersAvailableTypes",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailableTransferTypesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AvailableTransferTypesResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Set which transfer types bank admins and end users have",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/admin/site-text": {
      "get": {
        "operationId": "getAdminSiteText",
        "parameters": [
          {
            "name": "locale",
            "required": true,
            "in": "query",
            "schema": {
              "example": "nl_NL",
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SiteTextSectionDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the tenant's site-text keys and overrides for a locale",
        "tags": [
          "Tenant"
        ]
      },
      "put": {
        "operationId": "putAdminSiteText",
        "parameters": [
          {
            "name": "locale",
            "required": true,
            "in": "query",
            "schema": {
              "example": "nl_NL",
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteTextSaveDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SiteTextSectionDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Save site-text overrides for one locale",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/admin/site-text/template": {
      "get": {
        "operationId": "getAdminSiteTextTemplate",
        "parameters": [
          {
            "name": "locale",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV template download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Download the site-text override CSV template",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/admin/site-text/import": {
      "post": {
        "operationId": "postAdminSiteTextImport",
        "parameters": [
          {
            "name": "locale",
            "required": true,
            "in": "query",
            "schema": {
              "example": "nl_NL",
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ImportResultDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Bulk-import site-text overrides for one locale from a CSV",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/admin/notification-templates": {
      "get": {
        "description": "A template the tenant has not overridden returns the platform default. Without a locale the tenant default locale is read and returned.",
        "operationId": "getAdminNotificationTemplates",
        "parameters": [
          {
            "name": "scope",
            "required": true,
            "in": "query",
            "description": "Who receives the notification",
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "admin"
              ]
            }
          },
          {
            "name": "locale",
            "required": false,
            "in": "query",
            "description": "Defaults to the tenant default locale",
            "schema": {
              "example": "en_US",
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/NotificationTemplateListDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the editable email templates of one audience for a locale",
        "tags": [
          "Email Settings"
        ]
      },
      "put": {
        "description": "A refusal on any template leaves the whole batch unwritten. A protected template cannot be disabled. Returns the saved templates as stored, since a status change also writes other locales.",
        "operationId": "putAdminNotificationTemplates",
        "parameters": [
          {
            "name": "locale",
            "required": true,
            "in": "query",
            "schema": {
              "example": "en_US",
              "type": "string",
              "enum": [
                "en_US",
                "zh_CN",
                "de_DE",
                "es_ES",
                "fr_FR",
                "it_IT",
                "ko_KR",
                "nl_NL",
                "pt_BR",
                "ar_AR",
                "ja_JP",
                "ru_RU",
                "bn_BD"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationTemplateSaveDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/NotificationTemplateListDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Save the subject, body, and status of email templates for one locale",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/notification-templates/markers": {
      "get": {
        "description": "Reference only. A template saves whichever markers its body contains.",
        "operationId": "getAdminNotificationTemplatesMarkers",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/NotificationTemplateMarkerDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the template placeholder markers with the events each is restricted to",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/notifications/custom": {
      "post": {
        "description": "Sends a custom notification to administrators over the chosen channels. Without a subject or content the template copy is used. `recipientMode` picks who gets it; an unknown recipient, admin class, or permission rejects the whole send (400). A 202 means accepted, not delivered: a disabled template still drops it. Each admin may send 10 a minute and 50 an hour (429).",
        "operationId": "postAdminNotificationsCustom",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendAdminNotificationDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AdminNotificationAcceptedDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — the caller exceeded the applicable rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Send a custom notification to administrators",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/modules": {
      "get": {
        "operationId": "getAdminModules",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TenantModuleStateDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the modules a tenant admin can turn on or off",
        "tags": [
          "Tenant"
        ]
      }
    },
    "/v3/admin/email-settings": {
      "get": {
        "description": "Stored credential values are never returned; only whether a password is set.",
        "operationId": "getAdminEmailSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the tenant's outbound email configuration",
        "tags": [
          "Email Settings"
        ]
      },
      "put": {
        "description": "A rejected update stores nothing. Unless the update disables email, the chosen provider is checked: microsoft365 needs a connected mailbox (409) and the from-address set to that mailbox (400); gmail needs a stored service-account key (409) and a from-address (400); gmail_oauth needs a stored OAuth client (409). Disabling email skips these checks. A public demo tenant may change only the sender fields: a change to the switch, the provider or a credential is refused (403).",
        "operationId": "putAdminEmailSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmailSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update the active email provider, SMTP settings, and no-reply sender",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/gmail": {
      "delete": {
        "description": "Revokes the key. The active provider is left as it is.",
        "operationId": "deleteAdminEmailSettingsGmail",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove the stored Gmail service-account key",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/gmail-oauth/authorize": {
      "post": {
        "description": "Returns Google's consent URL for the admin to open. Requires a stored OAuth client whose file lists a redirect URI (409 otherwise).",
        "operationId": "postAdminEmailSettingsGmailOauthAuthorize",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GmailOAuthAuthorizationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start the Gmail OAuth flow for the stored OAuth client",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/gmail-oauth/callback": {
      "post": {
        "description": "Exchanges the code, stores the grant, and records the authorized mailbox. The mailbox becomes the from-address only while gmail_oauth is the active provider. The state must be the one the same admin was issued and is accepted once (400 otherwise). Activation is a separate settings update.",
        "operationId": "postAdminEmailSettingsGmailOauthCallback",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GmailOAuthCallbackDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Complete the Gmail OAuth flow with the code Google redirected with",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/gmail-oauth/redirect-uri": {
      "get": {
        "operationId": "getAdminEmailSettingsGmailOauthRedirectUri",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GmailOAuthRedirectUriDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the redirect URI to register on the Google OAuth client",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/gmail-oauth/status": {
      "get": {
        "description": "Asks Google for a fresh access token. False without a connected mailbox, or once Google no longer honours the grant.",
        "operationId": "getAdminEmailSettingsGmailOauthStatus",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GmailOAuthStatusDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Probe whether the Gmail OAuth grant still works",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/gmail-oauth": {
      "delete": {
        "description": "Discards the stored grant and OAuth client. Google keeps the grant until the mailbox owner removes the app from their account. The active provider is left as it is.",
        "operationId": "deleteAdminEmailSettingsGmailOauth",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Disconnect the Gmail OAuth mailbox and discard the OAuth client",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/microsoft365/authorize": {
      "post": {
        "description": "Returns Microsoft's consent URL for the admin to open. Requires a stored app registration and the tenant admin app URL (409 otherwise).",
        "operationId": "postAdminEmailSettingsMicrosoft365Authorize",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Microsoft365OAuthAuthorizationDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Start the Microsoft 365 connect flow for the stored app registration",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/microsoft365/callback": {
      "post": {
        "description": "Exchanges the code, stores the grant, and records the authorized mailbox. The mailbox becomes the from-address only while microsoft365 is the active provider. The state must be the one the same admin was issued and is accepted once (400 otherwise). Activation is a separate settings update.",
        "operationId": "postAdminEmailSettingsMicrosoft365Callback",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Microsoft365OAuthCallbackDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Complete the Microsoft 365 connect flow with the code Microsoft redirected with",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/microsoft365/redirect-uri": {
      "get": {
        "operationId": "getAdminEmailSettingsMicrosoft365RedirectUri",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Microsoft365OAuthRedirectUriDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the redirect URI to register on the Microsoft app registration",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/microsoft365/status": {
      "get": {
        "description": "Asks Microsoft for a fresh access token. False without a connected mailbox, or once Microsoft no longer honours the grant.",
        "operationId": "getAdminEmailSettingsMicrosoft365Status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Microsoft365OAuthStatusDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable — a required backend dependency is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Probe whether the Microsoft 365 grant still works",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/microsoft365": {
      "delete": {
        "description": "Discards the stored grant and keeps the app registration. While microsoft365 is the active provider, the provider falls back to the one active before it, or smtp when there was none. The from-address goes back to the one stored when microsoft365 took over, or to the platform default when no previous provider was recorded and the from-address is the connected mailbox.",
        "operationId": "deleteAdminEmailSettingsMicrosoft365",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Disconnect the Microsoft 365 mailbox",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/microsoft365/registration": {
      "put": {
        "description": "Stores the registration on its own, whether or not email is enabled and regardless of the active provider. The same ids with a new client secret keep the connected mailbox; another directory or client id discards it, and while microsoft365 is the active provider the provider and from-address first fall back exactly as the disconnect describes.",
        "operationId": "putAdminEmailSettingsMicrosoft365Registration",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Microsoft365RegistrationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Save or replace the stored Microsoft 365 app registration",
        "tags": [
          "Email Settings"
        ]
      },
      "delete": {
        "description": "Discards the stored app registration and the mailbox grant with it. Nothing is revoked at Microsoft. While microsoft365 is the active provider, the provider and from-address fall back exactly as the disconnect describes. Removing while nothing is stored is a no-op.",
        "operationId": "deleteAdminEmailSettingsMicrosoft365Registration",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict — the request contradicts the current state of the resource",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove the stored Microsoft 365 app registration",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/signature-logo": {
      "post": {
        "description": "Accepts a png, jpeg, or gif of at most 5 MB. Outgoing email renders it above the signature text in the HTML part.",
        "operationId": "postAdminEmailSettingsSignatureLogo",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Upload the email signature logo for the current tenant",
        "tags": [
          "Email Settings"
        ]
      },
      "delete": {
        "description": "The signature renders text only afterwards.",
        "operationId": "deleteAdminEmailSettingsSignatureLogo",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmailSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Remove the email signature logo",
        "tags": [
          "Email Settings"
        ]
      },
      "get": {
        "operationId": "getAdminEmailSettingsSignatureLogo",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The image bytes",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "Serve the email signature logo",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/email-settings/test": {
      "post": {
        "description": "Fires one fixed test message to the supplied recipient and reports the provider outcome. Nothing is persisted.",
        "operationId": "postAdminEmailSettingsTest",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTestEmailDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TestEmailSendResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Send a test email through the tenant's configured provider",
        "tags": [
          "Email Settings"
        ]
      }
    },
    "/v3/admin/sms-settings": {
      "get": {
        "description": "Reports the provider, sender, and minimum balance, and whether a sub-account is stored. Credential values are never returned.",
        "operationId": "getAdminSmsSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SmsSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read the tenant's SMS provider configuration",
        "tags": [
          "SMS Settings"
        ]
      },
      "put": {
        "description": "Checks the credentials against the provider before storing anything; a rejected update stores nothing. enabled=false clears the settings.",
        "operationId": "putAdminSmsSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSmsSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SmsSettingsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update the tenant's SMS provider configuration",
        "tags": [
          "SMS Settings"
        ]
      }
    },
    "/v3/admin/sms-settings/provider-details": {
      "post": {
        "description": "Checks the given credentials against the provider and returns the registered sender numbers and the account balance. Omitted credentials fall back to the stored ones for the same provider. Nothing is stored.",
        "operationId": "postAdminSmsSettingsProviderDetails",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsProviderDetailsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SmsProviderDetailsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable — the request is well-formed but cannot be carried out",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway — an upstream provider rejected the request or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Check credentials against the SMS provider",
        "tags": [
          "SMS Settings"
        ]
      }
    },
    "/v3/admin/root-ip-restriction": {
      "get": {
        "description": "Only root may read it. Any other caller gets 403.",
        "operationId": "getAdminRootIpRestriction",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RootIpRestrictionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read root's sign-in IP allow-list",
        "tags": [
          "Root IP Restriction"
        ]
      },
      "put": {
        "description": "Only root may change it. The whole value is validated together, so an enabled restriction with an empty list, with a range that covers every address, or with a list that misses the address the request comes from, is refused.",
        "operationId": "putAdminRootIpRestriction",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRootIpRestrictionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RootIpRestrictionResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Replace root's sign-in IP allow-list",
        "tags": [
          "Root IP Restriction"
        ]
      }
    },
    "/v3/admin/blocked-ips": {
      "get": {
        "operationId": "getAdminBlockedIps",
        "parameters": [
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "-lastFailedAt",
                "lastFailedAt",
                "ip",
                "-ip"
              ],
              "default": "-lastFailedAt"
            },
            "description": "Field to order by; a leading `-` reverses it"
          },
          {
            "name": "page[size]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "page[number]",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BlockedIpResponseDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the IP addresses the login lockout currently blocks",
        "tags": [
          "Blocked IPs"
        ]
      }
    },
    "/v3/admin/blocked-ips/unblock": {
      "post": {
        "operationId": "postAdminBlockedIpsUnblock",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnblockIpsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-address outcomes. An address with no active block does not stop the others.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/UnblockIpResultDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Lift the block on the given IP addresses and reset their counters",
        "tags": [
          "Blocked IPs"
        ]
      }
    },
    "/v3/admin/user-options": {
      "get": {
        "description": "Every switch resolved, so a tenant that has never saved reads back the platform defaults rather than an empty set.",
        "operationId": "getAdminUserOptions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UserOptionsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Read which profile fields the tenant's customers may edit",
        "tags": [
          "User Options"
        ]
      },
      "put": {
        "description": "A partial body merges: switches the body omits keep their stored value, and an absent dormancy threshold is not written.",
        "operationId": "putAdminUserOptions",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserOptionsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UserOptionsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update the customer-editable profile fields and the dormancy threshold",
        "tags": [
          "User Options"
        ]
      }
    },
    "/v3/external-links": {
      "get": {
        "operationId": "getExternalLinks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ExternalLinkListResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the tenant's external links and per-surface caps",
        "tags": [
          "External Links"
        ]
      },
      "put": {
        "operationId": "putExternalLinks",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveExternalLinksDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ExternalLinkListResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Replace the tenant's whole external-link set",
        "tags": [
          "External Links"
        ]
      }
    },
    "/v3/external-links/options": {
      "get": {
        "operationId": "getExternalLinksOptions",
        "parameters": [
          {
            "name": "surface",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "menu_item",
                "transfer_button"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ExternalLinkOptionsResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed — see `errors[].source.pointer` for the offending field",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the caller may not perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found — the resource does not exist or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List the icons and anchors a link on one surface may use",
        "tags": [
          "External Links"
        ]
      }
    },
    "/v3/server/time": {
      "get": {
        "operationId": "getServerTime",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ServerTimeResponseDto"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — no valid session, or the credentials were rejected",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "required": [
                        "errors"
                      ],
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ApiErrorDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Return the current server instant as a unix epoch plus formatted representations",
        "tags": [
          "Server"
        ]
      }
    },
    "/v3/countries": {
      "get": {
        "operationId": "getCountries",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ApiEnvelopeDto"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CountryDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [],
        "summary": "The platform countries catalog: ISO 3166-1 alpha-2 code and display name.",
        "tags": [
          "Countries"
        ]
      }
    }
  },
  "info": {
    "title": "EBANQ API",
    "description": "## Introduction\n\nThe EBANQ REST API permits applications to connect securely to the EBANQ platform to carry out customer and administrative banking operations. All requests are sent to your environment's API host.\n\nThe documentation that follows is intended for developers: it introduces the conventions and describes all currently available endpoints. Please contact help@ebanq.com should you have additional questions or require support.\n\n## Environment selection\n\nEach request is resolved to a single environment. Two inputs are accepted for this, with equal standing:\n\n| Input | Description |\n| ----- | ----------- |\n| Host | The API hostname the request is addressed to. Used by browser applications, which cannot set the `Host` header themselves. |\n| `X-Tenant` header | The environment hostname, for example `X-Tenant: bank.example.com`. Intended for clients addressing a shared API host, such as native applications, server-side integrations and test tooling. |\n\nWhere both are supplied they must resolve to the same environment; a request naming two is rejected. Where neither resolves to an active environment, every route returns `404`, identical to the response for an unknown resource.\n\n## Authentication\n\n`POST /v3/auth/login` (customer) and `POST /v3/auth/admin/login` (admin) each return their session in a `Set-Cookie` header. The cookie name follows the `X-Session-Surface` request header: without it every session — admin logins included — rides the default `ebanq_session` cookie; a client sending `X-Session-Surface: admin` keeps its admin session in `ebanq_admin_session` instead, so one browser can hold both at once. The cookie value is the session token, and is accepted through either of two channels:\n\n| Channel | Intended for |\n| ------- | ------------ |\n| `ebanq_session` / `ebanq_admin_session` cookie | Browser applications, which return the cookie automatically |\n| `Authorization: Bearer <token>` | Clients without cookie storage, such as native applications and server-side integrations |\n\nThe header must be sent consistently: the surface a request names is the cookie it writes, reads, and refreshes. It selects between the caller’s own sessions only — it grants nothing. Header-less clients get plain single-cookie behavior; bearer clients never need it.\n\nBoth are accepted on every protected operation. A client without cookie storage should read the token from the `Set-Cookie` value once and present it as a bearer token on subsequent requests. The **Authorize** action above accepts a bearer token for issuing requests from this page.\n\nA session presented by cookie is extended on use, as the refreshed token is returned through `Set-Cookie`. A session presented as a bearer token is not extended and expires at the time set when it was issued. An expired or revoked session returns `401`; authenticate again to obtain a new one.\n\nA bearer session lasts the environment's idle-logout timeout for the profile's role, or 720 hours when idle logout is off for that role. The cookie's own `Max-Age` does not reflect it, so a server-side integration should treat any `401` as expiry and log in again.\n\nAn integration logging in with a password cannot answer a second-factor challenge. Its profile, or the address it calls from, must be on the two-factor whitelist (`/v3/admin/two-factor-whitelist`), or the login stops at `totp_required` or `webauthn_required`.\n\n`POST /v3/auth/logout` terminates the session. `POST /v3/auth/step-up` re-verifies the password factor on the current session and rotates the cookie; it requires the cookie, as the rotated token is returned through `Set-Cookie`.\n\n## Response envelope\n\nJSON responses use the same envelope. The exceptions show their own schema: file downloads return the file, event streams send events, and transfer submissions return their acknowledgement unwrapped.\n\n| Key | Populated on | Description |\n| --- | ------------ | ----------- |\n| `data` | success | The requested resource or list |\n| `meta` | success and failure | Request metadata; paginated lists add `meta.pagination` |\n| `links` | paginated lists | `first` / `prev` / `next` / `last` page links |\n| `messages` | informational | Human-readable notices |\n| `errors` | failure | One or more error objects (see below) |\n\n## Pagination\n\nLists take `page[number]` (from 1) and `page[size]` (default 20). `page[size]` is capped at 100: a larger value returns 100 items, not an error. Follow `links.next` until it is absent to read a whole list.\n\n## Errors\n\nError responses populate `errors` with objects of this shape:\n\n| Key | Description |\n| --- | ----------- |\n| `title` | Human-readable summary |\n| `details` | Human-readable specifics, when available |\n| `status` | The HTTP status, repeated |\n| `code` | Dot-namespaced machine code, e.g. `accounts.transfer.insufficient_funds` |\n| `source.pointer` | JSON pointer to the offending field, when the error is about one |\n\n## Timestamps\n\nRFC 3339 / ISO 8601 (UTC) is used for all times in requests and responses.",
    "version": "2.0.0",
    "contact": {}
  },
  "tags": [
    {
      "name": "Auth",
      "description": "Session login, logout, step-up, terms acceptance, and the public sign-up form definition"
    },
    {
      "name": "Profiles",
      "description": "User profiles: the caller's own under `/profiles/me`, everything else admin, plus the profile field registry"
    },
    {
      "name": "Registration Requests",
      "description": "The admin review queue over self-signups"
    },
    {
      "name": "Profile Files",
      "description": "Files attached to a profile — the customer's own and the admin surface"
    },
    {
      "name": "Verification",
      "description": "Launching, resuming and restarting the customer's own identity verification"
    },
    {
      "name": "KYC",
      "description": "Tenant KYC provider configuration — credentials and verification level (admin)"
    },
    {
      "name": "Integrations",
      "description": "Tenant payment-provider configuration — credentials, connection settings and rail bindings (admin)"
    },
    {
      "name": "BIC Lookup",
      "description": "Live BIC lookup on the transfer beneficiary step and its per-tenant provider configuration (admin)"
    },
    {
      "name": "Notifications",
      "description": "The caller's own in-app notification feed and its read state"
    },
    {
      "name": "Notification Preferences",
      "description": "The customer's own notification preference settings"
    },
    {
      "name": "Email Settings",
      "description": "The tenant's outbound email provider configuration (admin)"
    },
    {
      "name": "Push Settings",
      "description": "The tenant's push provider (FCM) credential (admin)"
    },
    {
      "name": "Blocked IPs",
      "description": "Addresses the login lockout has blocked, and lifting those blocks (admin)"
    },
    {
      "name": "Root IP Restriction",
      "description": "Root's sign-in IP allow-list (root only)"
    },
    {
      "name": "Two-Factor Whitelist",
      "description": "Profiles and addresses that skip the second factor at sign-in (root only)"
    },
    {
      "name": "SMS Settings",
      "description": "The tenant's SMS provider (Plivo or Twilio) configuration (admin)"
    },
    {
      "name": "User Options",
      "description": "Which profile fields the tenant lets its customers edit, and the dormancy threshold (admin)"
    },
    {
      "name": "Message Threads",
      "description": "Customer↔bank conversations, scoped to what the caller may see"
    },
    {
      "name": "Accounts",
      "description": "Account balances and aliases"
    },
    {
      "name": "Account Types",
      "description": "Product-level account type registry (admin)"
    },
    {
      "name": "Cards",
      "description": "Admin-issued internal stored-value cards"
    },
    {
      "name": "Card Types",
      "description": "Tenant card-type catalogue (admin; public icon read)"
    },
    {
      "name": "Currencies",
      "description": "Per-tenant currency catalogue (admin)"
    },
    {
      "name": "Exchange Rates",
      "description": "Main-currency FX rate table (admin)"
    },
    {
      "name": "Transactions",
      "description": "Transaction feeds for customers and admins"
    },
    {
      "name": "Reports",
      "description": "Tenant-wide operational reports (admin)"
    },
    {
      "name": "Jobs",
      "description": "The customer's report exports and import/export operations as one queue"
    },
    {
      "name": "Company Reports",
      "description": "A corporate member's reports over their own company's activity"
    },
    {
      "name": "Transfers",
      "description": "Transfer creation, previews, and lifecycle actions"
    },
    {
      "name": "Approval Challenges",
      "description": "Transfers waiting on the customer's approval, by phone or by emailed or texted code"
    },
    {
      "name": "Import/Export Operations",
      "description": "The caller's own async import/export jobs, with state and progress"
    },
    {
      "name": "Corporate Accounts",
      "description": "The corporate accounts a member is assigned to (customer side)"
    },
    {
      "name": "Corporate Requests",
      "description": "A corporate member's maker-checker queue and approve/reject decisions"
    },
    {
      "name": "Corporate My Roles",
      "description": "The caller's own corporate roles and grants, company- and account-level"
    },
    {
      "name": "Adjustments",
      "description": "Manual credits and debits against customer and revenue accounts (admin)"
    },
    {
      "name": "Beneficiaries",
      "description": "The customer's saved payee directory"
    },
    {
      "name": "Files",
      "description": "The shared document archive uploads attach to"
    },
    {
      "name": "Public Files",
      "description": "Sessionless retrieval of archive files stored with the public mark"
    },
    {
      "name": "Transfer Fees",
      "description": "Tenant transfer-fee configuration (admin)"
    },
    {
      "name": "Corporate Profiles",
      "description": "Corporate profiles (companies) and their members (admin)"
    },
    {
      "name": "Corporate Roles",
      "description": "Corporate user roles and their permission grant lists (admin)"
    },
    {
      "name": "User Groups",
      "description": "Customer segmentation groups profiles belong to (admin)"
    },
    {
      "name": "Terms & Conditions",
      "description": "T&C versions and the acceptance log (admin), and the customer accepting the version in force"
    },
    {
      "name": "Admin Classes",
      "description": "Admin class membership and action grants"
    },
    {
      "name": "System Log",
      "description": "Operational log of administrative and system activity (admin)"
    },
    {
      "name": "Webhooks",
      "description": "Outbound webhook deliveries to partner modules and their status (admin)"
    },
    {
      "name": "Tenant",
      "description": "Tenant branding, theme, shell, and configuration values"
    },
    {
      "name": "Countries",
      "description": "The platform countries catalogue (ISO 3166-1), public"
    },
    {
      "name": "Intercom",
      "description": "Intercom chat widget settings and customer identity hash"
    },
    {
      "name": "External Links",
      "description": "Tenant-configured custom navigation entries and transfer-page buttons"
    },
    {
      "name": "Funding Instructions",
      "description": "Incoming-wire bank details customers use to fund accounts (admin)"
    },
    {
      "name": "Server",
      "description": "Server clock for client time synchronization"
    }
  ],
  "servers": [],
  "components": {
    "securitySchemes": {
      "cookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "ebanq_session"
      },
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http",
        "description": "The session token from the `Set-Cookie` value returned by login, sent as a bearer token. For clients that do not keep a cookie jar."
      }
    },
    "schemas": {
      "ApiLinksDto": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "example": "/v3/accounts?page[number]=1&page[size]=25"
          },
          "next": {
            "type": "string"
          },
          "prev": {
            "type": "string"
          },
          "first": {
            "type": "string"
          },
          "last": {
            "type": "string"
          }
        }
      },
      "ApiErrorSourceDto": {
        "type": "object",
        "properties": {
          "pointer": {
            "type": "string",
            "example": "/sourceAccountId"
          }
        },
        "required": [
          "pointer"
        ]
      },
      "ApiErrorDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Required"
          },
          "details": {
            "type": "string"
          },
          "status": {
            "type": "number",
            "example": 400
          },
          "code": {
            "type": "string",
            "example": "common.input.validation_failed"
          },
          "source": {
            "$ref": "#/components/schemas/ApiErrorSourceDto"
          }
        },
        "required": [
          "title"
        ]
      },
      "PaginationMetaDto": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "example": 1
          },
          "pageSize": {
            "type": "number",
            "example": 25
          },
          "total": {
            "type": "number",
            "example": 137
          }
        },
        "required": [
          "page",
          "pageSize",
          "total"
        ]
      },
      "ApiMetaDto": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "example": "req_01HX..."
          },
          "service": {
            "type": "string",
            "example": "api-gateway"
          },
          "timestamp": {
            "type": "string",
            "example": "2026-05-11T10:23:45.012Z"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMetaDto"
          }
        },
        "required": [
          "requestId",
          "service",
          "timestamp"
        ]
      },
      "ApiEnvelopeDto": {
        "type": "object",
        "properties": {
          "links": {
            "$ref": "#/components/schemas/ApiLinksDto"
          },
          "data": {
            "type": "object"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiErrorDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMetaDto"
          }
        }
      },
      "SessionUserDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "zitadelOrgId": {
            "type": "string",
            "description": "Identity provider organization id (not the EBANQ tenant id)."
          },
          "loginName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "zitadelOrgId",
          "loginName"
        ]
      },
      "WebAuthnChallengeResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "webauthn_required"
            ]
          },
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "type": "string",
            "description": "Single-purpose token for the finish call; not a session credential."
          },
          "publicKeyCredentialRequestOptions": {
            "type": "object",
            "description": "Options for navigator.credentials.get(), passed through from the identity provider verbatim."
          }
        },
        "required": [
          "status",
          "sessionId",
          "sessionToken",
          "publicKeyCredentialRequestOptions"
        ]
      },
      "TotpChallengeResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "totp_required"
            ]
          },
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "type": "string",
            "description": "Single-purpose token for the finish call; not a session credential."
          }
        },
        "required": [
          "status",
          "sessionId",
          "sessionToken"
        ]
      },
      "TwoFactorEnrollmentRequiredResponseDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "zitadelOrgId": {
            "type": "string",
            "description": "Identity provider organization id (not the EBANQ tenant id)."
          },
          "loginName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "two_factor_enrollment_required"
            ]
          }
        },
        "required": [
          "userId",
          "zitadelOrgId",
          "loginName",
          "status"
        ]
      },
      "LoginRequestDto": {
        "type": "object",
        "properties": {
          "loginName": {
            "type": "string",
            "example": "jane@acme-bank.example"
          },
          "password": {
            "type": "string",
            "example": "CorrectHorseBatteryStaple1!"
          }
        },
        "required": [
          "loginName",
          "password"
        ]
      },
      "DemoLinkRequestDto": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "The token from the demo invite link."
          }
        },
        "required": [
          "token"
        ]
      },
      "WebAuthnLoginRequestDto": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "type": "string"
          },
          "assertion": {
            "type": "object",
            "description": "The PublicKeyCredential returned by navigator.credentials.get(), serialized to JSON."
          }
        },
        "required": [
          "sessionId",
          "sessionToken",
          "assertion"
        ]
      },
      "MobileDeviceLoginRequestDto": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string",
            "maxLength": 255,
            "description": "Client-generated installation id of the device, as sent at pairing"
          }
        },
        "required": [
          "deviceId"
        ]
      },
      "MobileDeviceSessionDto": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "The session credential to send as a Bearer token; opaque to the client."
          },
          "expiresIn": {
            "type": "number",
            "description": "Seconds until the session ends, counted from this answer. Freshness checks can refuse requests before this window ends; the app may need to sign in again earlier."
          },
          "user": {
            "$ref": "#/components/schemas/SessionUserDto"
          }
        },
        "required": [
          "accessToken",
          "expiresIn",
          "user"
        ]
      },
      "TotpLoginRequestDto": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "The authenticator code."
          }
        },
        "required": [
          "sessionId",
          "sessionToken",
          "code"
        ]
      },
      "RecoveryCodeLoginRequestDto": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "sessionToken": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "One recovery code, dashes included."
          }
        },
        "required": [
          "sessionId",
          "sessionToken",
          "code"
        ]
      },
      "IdleSessionPolicyDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether idle sign-out applies to this session."
          },
          "timeoutSeconds": {
            "type": "number",
            "description": "Idle seconds before the sign-out."
          },
          "warningSeconds": {
            "type": "number",
            "description": "Seconds before the sign-out the warning opens."
          },
          "warningMessage": {
            "type": "string",
            "nullable": true,
            "description": "Bank copy for the countdown dialog; null means the app shows its translated default."
          },
          "logoutMessage": {
            "type": "string",
            "nullable": true,
            "description": "Bank copy for the login page after an idle sign-out; null means the translated default."
          }
        },
        "required": [
          "enabled",
          "timeoutSeconds",
          "warningSeconds",
          "warningMessage",
          "logoutMessage"
        ]
      },
      "ViewAsStateDto": {
        "type": "object",
        "properties": {
          "targetProfileId": {
            "type": "integer",
            "example": 16
          },
          "targetDisplayName": {
            "type": "string"
          },
          "targetRole": {
            "type": "string",
            "enum": [
              "user",
              "admin"
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "targetProfileId",
          "targetDisplayName",
          "targetRole",
          "startedAt"
        ]
      },
      "MeResponseDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "zitadelOrgId": {
            "type": "string",
            "description": "Identity provider organization id (not the EBANQ tenant id)."
          },
          "loginName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "idleSession": {
            "nullable": true,
            "description": "The idle-session policy for this session's role. Null for root, which never idles out.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/IdleSessionPolicyDto"
              }
            ]
          },
          "actions": {
            "description": "The caller's permission action keys, sorted. A UI hint for hiding entry points the caller cannot use — the server-side permission gate stays the enforcement boundary. Empty when the caller has no resolvable profile or the lookup fails.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin",
              "root"
            ],
            "description": "The role of the profile this payload describes; the viewed profile's role during a support view."
          },
          "viewAs": {
            "nullable": true,
            "description": "The support view in progress on this session, or null.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/ViewAsStateDto"
              }
            ]
          },
          "twoFactorEnrollmentRequired": {
            "type": "boolean",
            "description": "The session came from the MFA enrollment grace path: until a second factor is enrolled it reaches enrollment only, and other routes answer 403 iam.auth.two_factor_enrollment_required."
          },
          "passwordChangeRequired": {
            "type": "boolean",
            "description": "The session signed in with a password ops set: until it is changed the session reaches change-password, this read and sign-out only, and other routes answer 403 iam.auth.password_change_required."
          },
          "termsAcceptanceRequired": {
            "type": "boolean",
            "description": "The customer still owes an accept to the Terms & Conditions version in force: until they accept, the session reaches the /terms routes, this read and sign-out only, and other routes answer 403 iam.terms.acceptance_required. Always false for admin and root."
          },
          "termsReviewPending": {
            "type": "boolean",
            "description": "Mandatory acceptance is off and the customer has not answered the version in force: the app shows it once with a skip. Nothing is refused. Always false for admin and root."
          },
          "preferredLanguage": {
            "type": "string",
            "nullable": true,
            "description": "Saved interface language (platform locale code); null when never chosen."
          }
        },
        "required": [
          "userId",
          "zitadelOrgId",
          "loginName",
          "idleSession",
          "actions",
          "role",
          "viewAs",
          "twoFactorEnrollmentRequired",
          "passwordChangeRequired",
          "termsAcceptanceRequired",
          "termsReviewPending",
          "preferredLanguage"
        ]
      },
      "StepUpRequestDto": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "example": "CorrectHorseBatteryStaple1!"
          }
        },
        "required": [
          "password"
        ]
      },
      "ChangePasswordRequestDto": {
        "type": "object",
        "properties": {
          "currentPassword": {
            "type": "string",
            "example": "CorrectHorseBatteryStaple1!"
          },
          "newPassword": {
            "type": "string",
            "example": "EvenMoreCorrectHorse2!"
          }
        },
        "required": [
          "currentPassword",
          "newPassword"
        ]
      },
      "ActivationLinkDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 16,
            "description": "Profile ID from the invite link"
          },
          "token": {
            "type": "string",
            "format": "uuid",
            "description": "Activation token id from the invite link"
          },
          "code": {
            "type": "string",
            "description": "Single-use activation code from the invite link",
            "minLength": 1
          }
        },
        "required": [
          "profileId",
          "token",
          "code"
        ]
      },
      "ActivationLinkResponseDto": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the link stops working. It also stops once used."
          }
        },
        "required": [
          "expiresAt"
        ]
      },
      "InvitationActivationDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 16,
            "description": "Profile ID from the invite link"
          },
          "token": {
            "type": "string",
            "format": "uuid",
            "description": "Activation token id from the invite link"
          },
          "code": {
            "type": "string",
            "description": "Single-use activation code from the invite link",
            "minLength": 1
          },
          "newPassword": {
            "type": "string",
            "description": "New password to set",
            "minLength": 8,
            "maxLength": 128
          }
        },
        "required": [
          "profileId",
          "token",
          "code",
          "newPassword"
        ]
      },
      "PasswordResetRequestDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "example": "jane@acme-bank.example",
            "description": "Email address or username"
          }
        },
        "required": [
          "email"
        ]
      },
      "PasswordResetCompleteDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 16,
            "description": "Profile ID from the reset link"
          },
          "code": {
            "type": "string",
            "description": "One-time reset code delivered via email"
          },
          "password": {
            "type": "string",
            "description": "New password"
          },
          "confirmPassword": {
            "type": "string",
            "description": "Must match password"
          }
        },
        "required": [
          "profileId",
          "code",
          "password",
          "confirmPassword"
        ]
      },
      "SignupStepDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "personal"
          },
          "labelKey": {
            "type": "string",
            "example": "signup.step.personal"
          },
          "order": {
            "type": "number",
            "example": 1
          }
        },
        "required": [
          "id",
          "labelKey",
          "order"
        ]
      },
      "SignupFieldDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "first_name"
          },
          "labelKey": {
            "type": "string",
            "example": "signup.field.first_name",
            "description": "Translation key. Present on platform fields; mutually exclusive with label."
          },
          "label": {
            "type": "string",
            "example": "Fax",
            "description": "Literal display text. Present on tenant fields; mutually exclusive with labelKey."
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean",
              "date",
              "enum",
              "file_ref"
            ]
          },
          "required": {
            "type": "boolean",
            "example": true
          },
          "step": {
            "type": "string",
            "example": "personal"
          },
          "order": {
            "type": "number",
            "example": 0
          },
          "rules": {
            "type": "object",
            "example": {
              "maxLength": 60
            }
          }
        },
        "required": [
          "key",
          "type",
          "required",
          "step",
          "order",
          "rules"
        ]
      },
      "SignupFormFeaturesDto": {
        "type": "object",
        "properties": {
          "contactVerificationEnabled": {
            "type": "boolean",
            "description": "Whether this tenant runs the email-code verification step before the form unlocks."
          },
          "smsOtpEnabled": {
            "type": "boolean",
            "description": "False only when this tenant switched SMS off; unset counts as on. The sms_phone_number field is on the form only when true."
          }
        },
        "required": [
          "contactVerificationEnabled",
          "smsOtpEnabled"
        ]
      },
      "SignupFormResponseDto": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignupStepDto"
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignupFieldDto"
            }
          },
          "features": {
            "$ref": "#/components/schemas/SignupFormFeaturesDto"
          }
        },
        "required": [
          "steps",
          "fields",
          "features"
        ]
      },
      "SignupSubmitDto": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "description": "Submitted values keyed by form field key — credential, core, and tenant fields alike. Validated server-side against the tenant-configured sign-up form.",
            "example": {
              "username": "jane",
              "email": "jane@example.test",
              "password": "..."
            }
          },
          "verificationTokenId": {
            "type": "string",
            "format": "uuid",
            "description": "Token id of the consumed verification OTP from the sign-up verification step."
          },
          "botChallengeToken": {
            "type": "string",
            "description": "Bot-challenge proof; required when the tenant has the challenge enabled."
          },
          "termsAgreed": {
            "type": "boolean",
            "description": "Terms-and-conditions agreement. Must be true — a missing or false value refuses the submission against this field."
          },
          "gdprAccepted": {
            "type": "boolean",
            "description": "GDPR notice acceptance. Required when the tenant's gdpr module is on; ignored otherwise."
          },
          "locale": {
            "type": "string",
            "enum": [
              "en_US",
              "zh_CN",
              "de_DE",
              "es_ES",
              "fr_FR",
              "it_IT",
              "ko_KR",
              "nl_NL",
              "pt_BR",
              "ar_AR",
              "ja_JP",
              "ru_RU",
              "bn_BD"
            ],
            "description": "The locale the page presented the GDPR notice in; the acceptance archive renders the notice in this locale. Absent or not enabled for the tenant, the tenant's default locale applies."
          }
        },
        "required": [
          "values",
          "termsAgreed"
        ]
      },
      "SignupSubmitResultDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "SignupGdprNoticeDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "The notice's heading."
          },
          "notice": {
            "type": "string",
            "description": "The notice body (sanitised HTML)."
          },
          "locale": {
            "type": "string",
            "description": "The locale the text was resolved in — the requested one when the tenant offers it, else the tenant's default."
          }
        },
        "required": [
          "label",
          "notice",
          "locale"
        ]
      },
      "SignupTermsDto": {
        "type": "object",
        "properties": {
          "terms": {
            "type": "string",
            "description": "The terms and conditions, as stored HTML."
          },
          "locale": {
            "type": "string",
            "description": "The locale the text was resolved in — the requested one when the tenant offers it, else the tenant's default."
          }
        },
        "required": [
          "terms",
          "locale"
        ]
      },
      "SignupVerificationRequestDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "The address the caller intends to sign up with; the code is emailed to it."
          }
        },
        "required": [
          "email"
        ]
      },
      "SignupVerificationChallengeDto": {
        "type": "object",
        "properties": {
          "verificationTokenId": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the issued verification token; proves nothing without the emailed code."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "verificationTokenId",
          "expiresAt"
        ]
      },
      "SignupVerificationVerifyDto": {
        "type": "object",
        "properties": {
          "verificationTokenId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "pattern": "^\\d+$",
            "description": "The code from the verification email."
          }
        },
        "required": [
          "verificationTokenId",
          "code"
        ]
      },
      "SignupVerificationProofDto": {
        "type": "object",
        "properties": {
          "verificationTokenId": {
            "type": "string",
            "format": "uuid",
            "description": "The consumed token id — pass it as verificationTokenId on POST /auth/signup."
          }
        },
        "required": [
          "verificationTokenId"
        ]
      },
      "ViewAsRequestDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 16,
            "description": "The profile to view as."
          },
          "reason": {
            "type": "string",
            "maxLength": 255,
            "description": "Why support is opening this view; a ticket reference is enough. Audited."
          }
        },
        "required": [
          "profileId",
          "reason"
        ]
      },
      "ViewPassTicketDto": {
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string",
            "maxLength": 64,
            "description": "One-time ticket that opens the support view in the customer app. Valid 60 seconds."
          }
        },
        "required": [
          "ticket"
        ]
      },
      "AdminClassResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "protected": {
            "type": "boolean",
            "description": "A protected built-in class cannot be deleted."
          },
          "allowAll": {
            "type": "boolean",
            "description": "An allow-all class passes every permission check and never enumerates grants."
          },
          "stickyInherit": {
            "type": "boolean",
            "description": "A sticky-inherit class auto-receives every new permission atom at catalog sync."
          },
          "bankAdmin": {
            "type": "boolean",
            "description": "The Principal Access class, held by the account principals: always holds every grantable action, and its grants and members can't be changed."
          },
          "profileIds": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "protected",
          "allowAll",
          "stickyInherit",
          "bankAdmin",
          "profileIds"
        ]
      },
      "CreateAdminClassDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "actionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "AdminClassDetailResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "protected": {
            "type": "boolean",
            "description": "A protected built-in class cannot be deleted."
          },
          "allowAll": {
            "type": "boolean",
            "description": "An allow-all class passes every permission check and never enumerates grants."
          },
          "stickyInherit": {
            "type": "boolean",
            "description": "A sticky-inherit class auto-receives every new permission atom at catalog sync."
          },
          "bankAdmin": {
            "type": "boolean",
            "description": "The Principal Access class, held by the account principals: always holds every grantable action, and its grants and members can't be changed."
          },
          "profileIds": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "actionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "protected",
          "allowAll",
          "stickyInherit",
          "bankAdmin",
          "profileIds",
          "actionKeys"
        ]
      },
      "UpdateAdminClassDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "actionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "actionKeys"
        ]
      },
      "SystemLogSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The log entry's own id"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the action happened"
          },
          "actorProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "Who performed the action. Null for system-initiated entries"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The actor's login identity, the email address people sign in by. Null when there is no actor or their profile is gone"
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string",
            "description": "The action category, one of the system log vocabulary"
          },
          "dataTitle": {
            "type": "string",
            "nullable": true,
            "description": "Short sub-label of the entry, shown next to the action"
          },
          "ip": {
            "type": "string",
            "nullable": true,
            "description": "Full-fidelity request address, IPv6 included. Null for system-initiated entries"
          },
          "isCorporate": {
            "type": "boolean",
            "description": "Whether the entry concerns a corporate profile's activity"
          }
        },
        "required": [
          "id",
          "occurredAt",
          "actorProfileId",
          "username",
          "fullName",
          "action",
          "dataTitle",
          "ip",
          "isCorporate"
        ]
      },
      "SystemLogRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The log entry's own id"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the action happened"
          },
          "actorProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "Who performed the action. Null for system-initiated entries"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The actor's login identity, the email address people sign in by. Null when there is no actor or their profile is gone"
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string",
            "description": "The action category, one of the system log vocabulary"
          },
          "dataTitle": {
            "type": "string",
            "nullable": true,
            "description": "Short sub-label of the entry, shown next to the action"
          },
          "ip": {
            "type": "string",
            "nullable": true,
            "description": "Full-fidelity request address, IPv6 included. Null for system-initiated entries"
          },
          "isCorporate": {
            "type": "boolean",
            "description": "Whether the entry concerns a corporate profile's activity"
          },
          "context": {
            "type": "object",
            "nullable": true,
            "description": "Structured detail attached to the entry, such as field diffs."
          }
        },
        "required": [
          "id",
          "occurredAt",
          "actorProfileId",
          "username",
          "fullName",
          "action",
          "dataTitle",
          "ip",
          "isCorporate",
          "context"
        ]
      },
      "RegistrationRequestKycDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Latest verification attempt status"
          },
          "decision": {
            "type": "string",
            "nullable": true,
            "description": "Provider decision, e.g. GREEN/RED"
          },
          "rejectType": {
            "type": "string",
            "nullable": true,
            "description": "Retryable or final rejection"
          },
          "rejectLabels": {
            "description": "Provider rejection tags; empty when none",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "moderationComment": {
            "type": "string",
            "nullable": true,
            "description": "Applicant-facing comment"
          },
          "clientComment": {
            "type": "string",
            "nullable": true,
            "description": "Bank-only comment (admin eyes)"
          }
        },
        "required": [
          "status",
          "decision",
          "rejectType",
          "rejectLabels",
          "moderationComment",
          "clientComment"
        ]
      },
      "RegistrationRequestListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "profileId": {
            "type": "integer",
            "nullable": true,
            "description": "The profile the signup created; null if the linked profile is absent"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "cancelled"
            ]
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "Submitted value retained after cancellation; null if absent in a historical record"
          },
          "firstName": {
            "type": "string",
            "nullable": true,
            "description": "Submitted value retained after cancellation; null if absent in a historical record"
          },
          "lastName": {
            "type": "string",
            "nullable": true,
            "description": "Submitted value retained after cancellation; null if absent in a historical record"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "Null on a cancelled request: the cancel clears the request copy of the email"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The applicant's active corporate company (its registered name); null when they hold none"
          },
          "cancellationReason": {
            "type": "string",
            "nullable": true,
            "description": "Optional reason set by the cancel decision and retained without expiry"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "kyc": {
            "nullable": true,
            "description": "Present only when the tenant runs a KYC provider; null when the applicant has no attempt",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RegistrationRequestKycDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "profileId",
          "status",
          "username",
          "firstName",
          "lastName",
          "email",
          "companyName",
          "cancellationReason",
          "createdAt"
        ]
      },
      "ImportExportOperationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "userId": {
            "type": "integer",
            "description": "The profile that submitted the operation"
          },
          "type": {
            "type": "string",
            "enum": [
              "csv_import",
              "csv_export"
            ]
          },
          "action": {
            "type": "string",
            "example": "transfers.batch_update"
          },
          "description": {
            "type": "string",
            "example": "RequestsUpdateCsv",
            "description": "A short title for what the operation does"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_progress",
              "failed",
              "finished"
            ]
          },
          "processedCount": {
            "type": "number"
          },
          "totalCount": {
            "type": "number",
            "nullable": true
          },
          "progress": {
            "type": "string",
            "example": "42%",
            "description": "Rows processed as a percentage of the total, rounded up. A finished run reads 100%."
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "token": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "A random token minted per operation. Null for an operation created before tokens were added."
          },
          "location": {
            "type": "string",
            "nullable": true,
            "description": "The storage key of the operation's file, the uploaded input for an import and the produced output for an export. Null until that file exists."
          },
          "storage": {
            "type": "string",
            "enum": [
              "s3"
            ],
            "nullable": true,
            "description": "Where the file in location is kept. Null when there is no file."
          },
          "summary": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "nullable": true,
            "description": "Set on a finished import: always totalCount, successCount and failedCount, plus whatever the action adds (e.g. duplicateCount, pendingApprovalCount). Null for an export."
          },
          "outputFileId": {
            "type": "integer",
            "nullable": true,
            "description": "Set once the run finished. The artifact download route resolves it."
          },
          "errorFileId": {
            "type": "integer",
            "nullable": true,
            "description": "Set only when rows failed. Null on a run where every row succeeded."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "userId",
          "type",
          "action",
          "description",
          "status",
          "processedCount",
          "totalCount",
          "progress",
          "message",
          "token",
          "location",
          "storage",
          "summary",
          "outputFileId",
          "errorFileId",
          "createdAt",
          "startedAt",
          "finishedAt"
        ]
      },
      "RegistrationRequestProfileDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "The profile's own lifecycle status"
          },
          "blockedUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the block lifts; null when never blocked. A past value is no block"
          },
          "blocked": {
            "type": "boolean",
            "description": "Whether a block holds right now: blockedUntil is set and still in the future"
          },
          "email": {
            "type": "string",
            "description": "The profile's live email, which the snapshot may lag"
          },
          "profileType": {
            "type": "string",
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "The applicant profile's isCorporate as a label"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "Registered name of the applicant's active company membership, principal first; null (personal) without one. The sign-up snapshot is never used"
          },
          "userGroup": {
            "type": "string",
            "nullable": true,
            "description": "Assigned group name; null when none"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "smsPhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "homePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "officePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "faxNumber": {
            "type": "string",
            "nullable": true
          },
          "countryOfResidenceIso2": {
            "type": "string",
            "nullable": true
          },
          "countryOfCitizenshipIso2": {
            "type": "string",
            "nullable": true
          },
          "preferredLanguage": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "object",
            "nullable": true,
            "description": "Physical address"
          },
          "mailingAddress": {
            "type": "object",
            "nullable": true,
            "description": "Mailing address"
          },
          "beneficialOwner": {
            "type": "object",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true
          },
          "documentType": {
            "type": "string",
            "nullable": true
          },
          "documentId": {
            "type": "string",
            "nullable": true
          },
          "documentExpiresAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "referrerCode": {
            "type": "string",
            "nullable": true
          },
          "extras": {
            "type": "object",
            "description": "Tenant-specific extra fields as submitted, without hidden or undefined fields"
          }
        },
        "required": [
          "status",
          "blockedUntil",
          "blocked",
          "email",
          "profileType",
          "companyName",
          "userGroup",
          "dateOfBirth",
          "phone",
          "smsPhoneNumber",
          "homePhoneNumber",
          "officePhoneNumber",
          "faxNumber",
          "countryOfResidenceIso2",
          "countryOfCitizenshipIso2",
          "preferredLanguage",
          "address",
          "mailingAddress",
          "beneficialOwner",
          "position",
          "documentType",
          "documentId",
          "documentExpiresAt",
          "referrerCode",
          "extras"
        ]
      },
      "RegistrationRequestDetailKycDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Latest verification attempt status"
          },
          "decision": {
            "type": "string",
            "nullable": true,
            "description": "Provider decision, e.g. GREEN/RED"
          },
          "rejectType": {
            "type": "string",
            "nullable": true,
            "description": "Retryable or final rejection"
          },
          "rejectLabels": {
            "description": "Provider rejection tags; empty when none",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "moderationComment": {
            "type": "string",
            "nullable": true,
            "description": "Applicant-facing comment"
          },
          "clientComment": {
            "type": "string",
            "nullable": true,
            "description": "Bank-only comment (admin eyes)"
          },
          "level": {
            "type": "string",
            "description": "Verification level the attempt was started with"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt was created"
          }
        },
        "required": [
          "status",
          "decision",
          "rejectType",
          "rejectLabels",
          "moderationComment",
          "clientComment",
          "level",
          "createdAt"
        ]
      },
      "RegistrationRequestDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "profileId": {
            "type": "integer",
            "nullable": true,
            "description": "The profile the signup created; null if the linked profile is absent"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "cancelled"
            ]
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "Submitted value retained after cancellation; null if absent in a historical record"
          },
          "firstName": {
            "type": "string",
            "nullable": true,
            "description": "Submitted value retained after cancellation; null if absent in a historical record"
          },
          "lastName": {
            "type": "string",
            "nullable": true,
            "description": "Submitted value retained after cancellation; null if absent in a historical record"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "Null on a cancelled request: the cancel clears the request copy of the email"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The applicant's active corporate company (its registered name); null when they hold none"
          },
          "cancellationReason": {
            "type": "string",
            "nullable": true,
            "description": "Optional reason set by the cancel decision and retained without expiry"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "ip": {
            "type": "string",
            "nullable": true,
            "description": "IP the signup was submitted from. Submitted value retained after cancellation; null if absent in a historical record"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "profile": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RegistrationRequestProfileDto"
              }
            ]
          },
          "kyc": {
            "nullable": true,
            "description": "Present only when the tenant runs a KYC provider; null when the applicant has no attempt",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RegistrationRequestDetailKycDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "profileId",
          "status",
          "username",
          "firstName",
          "lastName",
          "email",
          "companyName",
          "cancellationReason",
          "createdAt",
          "ip",
          "updatedAt",
          "profile"
        ]
      },
      "RegistrationRequestApprovalDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "profileId": {
            "type": "integer",
            "description": "The profile the approval activated"
          },
          "status": {
            "type": "string",
            "enum": [
              "approved"
            ]
          }
        },
        "required": [
          "id",
          "profileId",
          "status"
        ]
      },
      "CancelRegistrationRequestBody": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 1000,
            "description": "Why the request was cancelled; kept on the request and shown in the cancellation email"
          }
        }
      },
      "RegistrationRequestCancellationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "cancelled"
            ]
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "RegistrationRequestResendDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "profileId": {
            "type": "integer",
            "description": "The applicant profile"
          },
          "recipientEmail": {
            "type": "string",
            "description": "The applicant profile's address the email went to"
          }
        },
        "required": [
          "id",
          "profileId",
          "recipientEmail"
        ]
      },
      "RegistrationRequestVerificationLinkDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "profileId": {
            "type": "integer",
            "description": "The applicant profile"
          },
          "verificationUrl": {
            "type": "string",
            "description": "The freshly minted verification link. It carries the code, reusable until `expiresAt`, so treat it as a secret."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the link stops working"
          }
        },
        "required": [
          "id",
          "profileId",
          "verificationUrl",
          "expiresAt"
        ]
      },
      "ProfileFileDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "File id"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "number"
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "adminOnly": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Upload time"
          }
        },
        "required": [
          "id",
          "filename",
          "contentType",
          "sizeBytes",
          "category",
          "adminOnly",
          "createdAt"
        ]
      },
      "AttachOwnProfileFileDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "Id returned by the file upload"
          },
          "category": {
            "type": "string",
            "nullable": true,
            "maxLength": 64,
            "description": "Optional document category. 'gdpr' is reserved and rejected with 400."
          }
        },
        "required": [
          "fileId"
        ]
      },
      "AttachProfileFileDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "Id returned by the file upload"
          },
          "category": {
            "type": "string",
            "nullable": true,
            "maxLength": 64,
            "description": "Optional document category, e.g. 'gdpr' (reserved for platform filings)"
          },
          "adminOnly": {
            "type": "boolean",
            "default": false,
            "description": "Mark as an internal document hidden from the end user (admin attach only)"
          }
        },
        "required": [
          "fileId"
        ]
      },
      "BulkDeleteProfileFilesDto": {
        "type": "object",
        "properties": {
          "fileIds": {
            "maxItems": 100,
            "description": "The exact set of file ids to delete",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "all": {
            "type": "boolean",
            "description": "Delete every one of the profile's files"
          }
        }
      },
      "TwoFactorWhitelistIpsDto": {
        "type": "object",
        "properties": {
          "ips": {
            "maxItems": 100,
            "description": "Plain IPv4/IPv6 addresses, matched exactly. A whitelisted profile skips the second factor only when it signs in from one of them. Replaces the whole list.",
            "example": [
              "203.0.113.10"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "ips"
        ]
      },
      "UpdateTwoFactorWhitelistProfileDto": {
        "type": "object",
        "properties": {
          "whitelisted": {
            "type": "boolean"
          }
        },
        "required": [
          "whitelisted"
        ]
      },
      "TwoFactorWhitelistProfileResponseDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "whitelisted": {
            "type": "boolean"
          }
        },
        "required": [
          "profileId",
          "whitelisted"
        ]
      },
      "PushSettingsActorDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`"
          },
          "username": {
            "type": "string",
            "description": "Login identifier"
          }
        },
        "required": [
          "profileId"
        ]
      },
      "FcmCredentialViewDto": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "clientEmail": {
            "type": "string",
            "description": "The service account the credential belongs to"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last uploaded"
          },
          "updatedBy": {
            "nullable": true,
            "description": "Who last uploaded it. null when that is no longer known.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PushSettingsActorDto"
              }
            ]
          }
        },
        "required": [
          "projectId",
          "clientEmail",
          "updatedAt",
          "updatedBy"
        ]
      },
      "PushSettingsResponseDto": {
        "type": "object",
        "properties": {
          "fcm": {
            "nullable": true,
            "description": "null until a credential is uploaded; the key itself is never returned",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/FcmCredentialViewDto"
              }
            ]
          }
        },
        "required": [
          "fcm"
        ]
      },
      "GoogleServiceAccountDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "service_account"
            ]
          },
          "project_id": {
            "type": "string",
            "example": "demo-bank"
          },
          "private_key": {
            "type": "string",
            "description": "Write-only. The PEM-encoded RSA private key from the file."
          },
          "client_email": {
            "type": "string",
            "example": "mailer@demo-bank.iam.gserviceaccount.com"
          }
        },
        "required": [
          "type",
          "project_id",
          "private_key",
          "client_email"
        ]
      },
      "UpdatePushSettingsDto": {
        "type": "object",
        "properties": {
          "serviceAccount": {
            "$ref": "#/components/schemas/GoogleServiceAccountDto"
          }
        },
        "required": [
          "serviceAccount"
        ]
      },
      "TestPushSendResponseDto": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "accepted",
              "failed",
              "skipped"
            ],
            "description": "accepted means FCM validated a message with the stored credential without delivering it; skipped means no credential is stored"
          },
          "providerCode": {
            "type": "string",
            "description": "Provider outcome code for diagnosing a misconfiguration"
          },
          "detail": {
            "type": "string",
            "nullable": true,
            "description": "The provider's own explanation of a failure"
          }
        },
        "required": [
          "outcome",
          "providerCode",
          "detail"
        ]
      },
      "FieldDefinitionResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "fieldKey": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean",
              "date",
              "enum",
              "file_ref"
            ]
          },
          "validationRules": {
            "type": "object"
          },
          "category": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "displayOrder": {
            "type": "number"
          },
          "signupStep": {
            "type": "string",
            "nullable": true
          },
          "editability": {
            "type": "string",
            "enum": [
              "self_serve",
              "admin_only",
              "re_kyc_required"
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "admin_only",
              "hidden"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "fieldKey",
          "label",
          "type",
          "validationRules",
          "category",
          "required",
          "displayOrder",
          "signupStep",
          "editability",
          "visibility",
          "active",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProfileSessionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Session id, usable with the revoke route"
          },
          "createdAt": {
            "type": "string",
            "description": "When the session was created (ISO-8601)"
          },
          "lastSeenAt": {
            "type": "string",
            "description": "When the session was last active (ISO-8601)"
          },
          "ip": {
            "type": "string",
            "nullable": true,
            "description": "Client IP recorded at login; null for sessions predating capture"
          },
          "userAgent": {
            "type": "string",
            "nullable": true,
            "description": "Raw User-Agent recorded at login; null for sessions predating capture"
          },
          "current": {
            "type": "boolean",
            "description": "Whether this is the session making the request"
          }
        },
        "required": [
          "id",
          "createdAt",
          "lastSeenAt",
          "ip",
          "userAgent",
          "current"
        ]
      },
      "MobileDeviceChallengeDto": {
        "type": "object",
        "properties": {
          "required": {
            "type": "boolean",
            "description": "Whether the action needs the code just emailed"
          },
          "tokenId": {
            "type": "string",
            "format": "uuid"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "recipient": {
            "type": "string",
            "description": "The masked address the code went to"
          },
          "resendIntervalInSeconds": {
            "type": "integer",
            "description": "Seconds before another code may be asked for, the tenant's resend interval"
          }
        },
        "required": [
          "required"
        ]
      },
      "MobileDeviceCodeDto": {
        "type": "object",
        "properties": {
          "tokenId": {
            "type": "string",
            "format": "uuid",
            "description": "The tokenId the code request answered with; required with code"
          },
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "description": "The code emailed to the customer; required when the tenant asks for one"
          }
        }
      },
      "MobileDevicePairingStartedDto": {
        "type": "object",
        "properties": {
          "pairingId": {
            "type": "integer",
            "example": 42
          },
          "code": {
            "type": "string",
            "description": "The one-time pairing code to show as a QR. Returned only here."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "pairingId",
          "code",
          "expiresAt"
        ]
      },
      "MobileDevicePairingDeviceDto": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "deviceName": {
            "type": "string",
            "nullable": true
          },
          "osType": {
            "type": "string",
            "enum": [
              "ios",
              "android"
            ]
          }
        },
        "required": [
          "deviceId",
          "deviceName",
          "osType"
        ]
      },
      "MobileDevicePairingDto": {
        "type": "object",
        "properties": {
          "pairingId": {
            "type": "integer",
            "example": 42
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "scanned",
              "awaiting_confirmation",
              "paired",
              "failed",
              "cancelled",
              "expired"
            ]
          },
          "failureReason": {
            "type": "string",
            "enum": [
              "attestation_rejected",
              "hardware_attestation_rejected",
              "device_bound_to_another_customer",
              "device_already_paired",
              "confirmation_code_invalid",
              "confirmation_code_locked"
            ],
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "confirmationAttemptsLeft": {
            "type": "number",
            "nullable": true,
            "description": "Wrong confirmation codes still tolerated; null before the app finished"
          },
          "confirmationLockedUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "While too many wrong codes lock confirming, when it opens again; null otherwise"
          },
          "device": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/MobileDevicePairingDeviceDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "pairingId",
          "status",
          "failureReason",
          "expiresAt",
          "confirmationAttemptsLeft",
          "confirmationLockedUntil",
          "device",
          "createdAt"
        ]
      },
      "ConfirmMobileDevicePairingDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "description": "The code the app displays"
          }
        },
        "required": [
          "code"
        ]
      },
      "PairedMobileDeviceDto": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "deviceName": {
            "type": "string",
            "nullable": true
          },
          "osType": {
            "type": "string",
            "enum": [
              "ios",
              "android"
            ]
          },
          "registeredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the device was paired"
          },
          "pushTokenUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the push token last changed"
          },
          "pushTokenRejectedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the push provider last reported the current token as unregistered; pushes stop arriving until the app refreshes the token. Null while the token is good."
          },
          "recoveryCodes": {
            "description": "The recovery codes for answering a challenge without the phone. Returned only here, once",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "deviceId",
          "deviceName",
          "osType",
          "registeredAt",
          "pushTokenUpdatedAt",
          "pushTokenRejectedAt",
          "recoveryCodes"
        ]
      },
      "MobileDevicePairingOutcomeDto": {
        "type": "object",
        "properties": {
          "pairingId": {
            "type": "integer",
            "example": 42
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "scanned",
              "awaiting_confirmation",
              "paired",
              "failed",
              "cancelled",
              "expired"
            ]
          },
          "failureReason": {
            "type": "string",
            "enum": [
              "attestation_rejected",
              "hardware_attestation_rejected",
              "device_bound_to_another_customer",
              "device_already_paired",
              "confirmation_code_invalid",
              "confirmation_code_locked"
            ],
            "nullable": true
          }
        },
        "required": [
          "pairingId",
          "status",
          "failureReason"
        ]
      },
      "MobileDeviceDto": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "deviceName": {
            "type": "string",
            "nullable": true
          },
          "osType": {
            "type": "string",
            "enum": [
              "ios",
              "android"
            ]
          },
          "registeredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the device was paired"
          },
          "pushTokenUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the push token last changed"
          },
          "pushTokenRejectedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the push provider last reported the current token as unregistered; pushes stop arriving until the app refreshes the token. Null while the token is good."
          }
        },
        "required": [
          "deviceId",
          "deviceName",
          "osType",
          "registeredAt",
          "pushTokenUpdatedAt",
          "pushTokenRejectedAt"
        ]
      },
      "RefreshPushTokenDto": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string",
            "maxLength": 255,
            "description": "Client-generated installation id of the device"
          },
          "osType": {
            "type": "string",
            "enum": [
              "ios",
              "android"
            ]
          },
          "pushToken": {
            "type": "string",
            "maxLength": 512,
            "description": "The current Firebase Cloud Messaging registration token"
          },
          "deviceName": {
            "type": "string",
            "maxLength": 200,
            "description": "Display name of the device"
          }
        },
        "required": [
          "deviceId",
          "osType",
          "pushToken"
        ]
      },
      "MobileDeviceOwnUnpairDto": {
        "type": "object",
        "properties": {
          "tokenId": {
            "type": "string",
            "format": "uuid",
            "description": "The tokenId the code request answered with; required with code"
          },
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "description": "The code emailed to the customer; required when the tenant asks for one"
          },
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "WebauthnDeviceDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifies this key when removing it"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Display name given at enrollment"
          },
          "state": {
            "type": "string",
            "nullable": true,
            "description": "The key's state at the identity provider, e.g. AUTH_FACTOR_STATE_READY"
          }
        },
        "required": [
          "id",
          "name",
          "state"
        ]
      },
      "TwoFactorStateDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether any second factor is registered"
          },
          "methods": {
            "description": "Method type names of the registered second factors, e.g. AUTHENTICATION_METHOD_TYPE_TOTP",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "webauthnDevices": {
            "description": "The individually-addressable WebAuthn keys behind the U2F method. No enrollment or last-used dates are available for these.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebauthnDeviceDto"
            }
          }
        },
        "required": [
          "enabled",
          "methods",
          "webauthnDevices"
        ]
      },
      "MobileDevicePairingCodeDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The pairing code the QR carried"
          }
        },
        "required": [
          "code"
        ]
      },
      "MobileDevicePairingRedeemedDto": {
        "type": "object",
        "properties": {
          "pairingId": {
            "type": "integer",
            "example": 42
          },
          "publicKeyCredentialCreationOptions": {
            "type": "object",
            "description": "Passkey creation options (discoverable credential, user verification required), passed to the platform authenticator verbatim"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "pairingId",
          "publicKeyCredentialCreationOptions",
          "expiresAt"
        ]
      },
      "MobileDeviceAttestationDto": {
        "type": "object",
        "properties": {
          "certificateChain": {
            "description": "Android: the key attestation certificate chain, base64 DER, leaf first, as KeyStore.getCertificateChain returns it",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "keyId": {
            "type": "string",
            "description": "iOS: the App Attest key identifier, base64"
          },
          "attestationObject": {
            "type": "string",
            "description": "iOS: the App Attest attestation object, base64 CBOR"
          }
        }
      },
      "FinishMobileDevicePairingDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The pairing code the QR carried"
          },
          "publicKeyCredential": {
            "type": "object",
            "description": "The authenticator's attestation response, as WebAuthn credential JSON"
          },
          "deviceId": {
            "type": "string",
            "maxLength": 255,
            "description": "Client-generated installation id of the device"
          },
          "deviceName": {
            "type": "string",
            "maxLength": 200,
            "description": "Display name of the device"
          },
          "osType": {
            "type": "string",
            "enum": [
              "ios",
              "android"
            ]
          },
          "pushToken": {
            "type": "string",
            "maxLength": 512,
            "description": "The current Firebase Cloud Messaging registration token"
          },
          "attestation": {
            "description": "The phone's hardware attestation, bound to this pairing's challenge and the device id: the Android key attestation chain, or the Apple App Attest key id and object. Required.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MobileDeviceAttestationDto"
              }
            ]
          }
        },
        "required": [
          "code",
          "publicKeyCredential",
          "deviceId",
          "osType",
          "pushToken",
          "attestation"
        ]
      },
      "MobileDevicePairingFinishedDto": {
        "type": "object",
        "properties": {
          "pairingId": {
            "type": "integer",
            "example": 42
          },
          "confirmationCode": {
            "type": "string",
            "description": "The 6-digit code the app shows for the customer to type on the web"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "pairingId",
          "confirmationCode",
          "expiresAt"
        ]
      },
      "OpenProfileResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "dormant",
              "cancelled"
            ]
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "nullable": true,
            "format": "date"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "preferredLanguage": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "object",
            "nullable": true
          },
          "mailingAddress": {
            "type": "object",
            "nullable": true,
            "description": "Mailing/correspondence address"
          },
          "smsPhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "homePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "officePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "faxNumber": {
            "type": "string",
            "nullable": true
          },
          "countryOfResidenceIso2": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "countryOfCitizenshipIso2": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "blocked": {
            "type": "boolean"
          },
          "blockedUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "userGroupId": {
            "type": "integer",
            "nullable": true,
            "example": 42
          },
          "userGroupName": {
            "type": "string",
            "nullable": true
          },
          "adminClassId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "At most one class per profile; null for users and unassigned admins"
          },
          "adminClassName": {
            "type": "string",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true,
            "maxLength": 255,
            "description": "The person's job title. Readable and editable by the profile's owner"
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "maxLength": 65535,
            "description": "Staff-facing commentary. Present only for an admin viewer — a profile owner reading their own profile never receives this key"
          },
          "isCorporate": {
            "type": "boolean",
            "description": "The stored personal or corporate profile type"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "maxLength": 128,
            "description": "The profile owner’s declared company name"
          },
          "username": {
            "type": "string",
            "description": "The stored login username, served to every viewer, the profile's owner included"
          },
          "batchImportAllowed": {
            "type": "boolean",
            "description": "On the batch-import allow list. Present only for an admin viewer"
          },
          "corporateBatchImportAllowed": {
            "type": "boolean",
            "description": "On the company-member batch-import allow list. Present only for an admin viewer"
          },
          "referrerCode": {
            "type": "string",
            "nullable": true,
            "description": "Free-text referrer code typed at sign-up. Present only for an admin viewer — a profile owner reading their own profile never receives this key"
          },
          "documentType": {
            "type": "string",
            "nullable": true,
            "description": "Identity document type"
          },
          "documentId": {
            "type": "string",
            "nullable": true,
            "description": "Identity document number"
          },
          "documentExpiresAt": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Identity document expiry, yyyy-mm-dd"
          },
          "beneficialOwner": {
            "type": "object",
            "nullable": true,
            "description": "Beneficial owner details"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastLoginIp": {
            "type": "string",
            "nullable": true,
            "description": "The IP of the profile's newest sign-in; null when it never signed in. Only present on the single-profile reads (GET /profiles/me and GET /profiles/:id)."
          },
          "invitationPending": {
            "type": "boolean",
            "description": "True until the invitee sets a password, after which re-sending the invitation answers 409 `iam.invitation.already_activated`. Also false when the identity provider cannot be read. Only present on GET /profiles/:id."
          },
          "lastActedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "closedAt": {
            "type": "string",
            "nullable": true,
            "description": "Always null for open profiles"
          },
          "extras": {
            "type": "object",
            "description": "Registry-defined fields, filtered by the caller role per the tenant field registry: hidden fields are never present; admin_only fields appear only for admin viewers."
          },
          "profileType": {
            "type": "string",
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "The caller's isCorporate as a label. Only present on the self read (GET /profiles/me)."
          }
        },
        "required": [
          "id",
          "role",
          "status",
          "firstName",
          "lastName",
          "dateOfBirth",
          "email",
          "phone",
          "preferredLanguage",
          "address",
          "mailingAddress",
          "smsPhoneNumber",
          "homePhoneNumber",
          "officePhoneNumber",
          "faxNumber",
          "countryOfResidenceIso2",
          "countryOfCitizenshipIso2",
          "blocked",
          "blockedUntil",
          "externalId",
          "userGroupId",
          "userGroupName",
          "adminClassId",
          "adminClassName",
          "position",
          "username",
          "createdAt",
          "updatedAt",
          "lastLoginAt",
          "lastActedAt",
          "closedAt",
          "extras"
        ]
      },
      "UpdateSelfProfileDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "nullable": true
          },
          "preferredLanguage": {
            "type": "string",
            "description": "Must be a tenant-supported locale."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "currentPassword": {
            "type": "string",
            "maxLength": 256,
            "description": "Needed when a non-root user on a public demo changes their own email."
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "smsPhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "homePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "officePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "faxNumber": {
            "type": "string",
            "nullable": true
          },
          "countryOfResidenceIso2": {
            "type": "string",
            "nullable": true
          },
          "countryOfCitizenshipIso2": {
            "type": "string",
            "nullable": true
          },
          "documentType": {
            "type": "string",
            "nullable": true
          },
          "documentId": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "object",
            "nullable": true
          },
          "mailingAddress": {
            "type": "object",
            "nullable": true
          },
          "beneficialOwner": {
            "type": "object",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 255,
            "description": "The person's job title. Null clears it; an empty string is refused"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 128,
            "description": "Trimmed; required while the profile is corporate. Dropped while the tenant switch is off. An empty string is refused"
          },
          "extras": {
            "type": "object",
            "description": "Registry-defined field values keyed by field_key, validated against the active tenant field registry; only self_serve fields are accepted from the owner. An explicit null clears a non-required field."
          }
        }
      },
      "UserProfileResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "preferredLanguage": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "object",
            "nullable": true
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "dormant",
              "closed",
              "cancelled"
            ]
          },
          "blocked": {
            "type": "boolean"
          },
          "blockedUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "userGroupId": {
            "type": "integer",
            "nullable": true,
            "example": 42
          },
          "closedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastActedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "dateOfBirth",
          "email",
          "phone",
          "preferredLanguage",
          "address",
          "role",
          "status",
          "blocked",
          "blockedUntil",
          "userGroupId",
          "closedAt",
          "createdAt",
          "updatedAt",
          "lastLoginAt",
          "lastActedAt",
          "position"
        ]
      },
      "UpdateProfileDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "username": {
            "type": "string",
            "minLength": 4,
            "maxLength": 50,
            "pattern": "^[a-zA-Z0-9_.'@’\\- \\t\\n\\f\\r]+$",
            "example": "john.doe",
            "description": "New login username, mirrored to the identity provider. Unique per tenant, case-insensitively. Absent = unchanged."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "example": "john.doe@example.com",
            "description": "New email, mirrored to the identity provider with no re-verification. Unique per tenant, case-insensitively. Absent = unchanged."
          },
          "currentPassword": {
            "type": "string",
            "maxLength": 256,
            "description": "Needed when a non-root user on a public demo changes their own email."
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "preferredLanguage": {
            "type": "string",
            "description": "Must be a locale the platform supports."
          },
          "address": {
            "type": "object",
            "nullable": true
          },
          "mailingAddress": {
            "type": "object",
            "nullable": true,
            "description": "Mailing/correspondence address"
          },
          "externalId": {
            "type": "string",
            "nullable": true,
            "pattern": "^(?=.{1,60}$)[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$",
            "description": "Admin-only; accepted on user profiles only. An empty string or null clears the ID."
          },
          "documentType": {
            "type": "string",
            "enum": [
              "passport",
              "driver-license",
              "gov-issued-photo-id"
            ],
            "nullable": true,
            "description": "Identity document type. Must be paired with documentId — both or neither; null clears both"
          },
          "documentId": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "Identity document number. Must be paired with documentType — both or neither; null clears both"
          },
          "documentExpiresAt": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Identity document expiry, yyyy-mm-dd. Requires documentType and documentId; clearing the pair clears it too"
          },
          "beneficialOwner": {
            "type": "object",
            "nullable": true,
            "description": "Beneficial owner details; admin-only on reads"
          },
          "smsPhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "homePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "officePhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "faxNumber": {
            "type": "string",
            "nullable": true
          },
          "countryOfResidenceIso2": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "countryOfCitizenshipIso2": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "userGroupId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "User profiles only; null clears the membership"
          },
          "batchImportAllowed": {
            "type": "boolean",
            "description": "User profiles only. Puts the customer on the batch-import allow list."
          },
          "corporateBatchImportAllowed": {
            "type": "boolean",
            "description": "User profiles only. Puts the customer on the company-member allow list."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "dormant"
            ],
            "description": "Target status. Only transitions allowed by the profile lifecycle are accepted; closing a profile is not one of them."
          },
          "position": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 255,
            "description": "The person's job title. Null clears it; an empty string is refused"
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 65535,
            "description": "Staff-facing commentary, never shown to the profile owner. Null clears it; an empty string is refused"
          },
          "isCorporate": {
            "type": "boolean",
            "description": "Corporate (true) or personal (false) profile type. Switching a customer assigned to a company to personal is refused with 409 iam.profile.type_change_refused"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 128,
            "description": "Trimmed; required while isCorporate is true. Null clears it; an empty string is refused"
          },
          "extras": {
            "type": "object",
            "description": "Registry-defined field values keyed by field_key. Validated against the active tenant field registry; an explicit null clears a non-required field."
          },
          "passwordChangedInSave": {
            "type": "boolean",
            "description": "Set by the admin edit form when the same save also changed the password: the caller's own, or a temporary password set for another profile. It suppresses the duplicate username-change notice, but only when the identity provider confirms the password changed within the last two minutes."
          }
        }
      },
      "AdminProfileResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "preferredLanguage": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "object",
            "nullable": true
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "dormant",
              "closed",
              "cancelled"
            ]
          },
          "blocked": {
            "type": "boolean"
          },
          "blockedUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "userGroupId": {
            "type": "integer",
            "nullable": true,
            "example": 42
          },
          "closedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastActedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "username": {
            "type": "string",
            "description": "Login username, unique per tenant."
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "documentType": {
            "type": "string",
            "enum": [
              "passport",
              "driver-license",
              "gov-issued-photo-id"
            ],
            "nullable": true
          },
          "documentId": {
            "type": "string",
            "nullable": true,
            "maxLength": 100
          },
          "documentExpiresAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "maxLength": 65535,
            "description": "Left out when the caller reads or saves their own profile"
          },
          "batchImportAllowed": {
            "type": "boolean",
            "description": "On the batch-import allow list"
          },
          "corporateBatchImportAllowed": {
            "type": "boolean",
            "description": "On the company-member batch-import allow list"
          },
          "isCorporate": {
            "type": "boolean",
            "description": "Corporate (true) or personal (false) profile type"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "maxLength": 128
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "dateOfBirth",
          "email",
          "phone",
          "preferredLanguage",
          "address",
          "role",
          "status",
          "blocked",
          "blockedUntil",
          "userGroupId",
          "closedAt",
          "createdAt",
          "updatedAt",
          "lastLoginAt",
          "lastActedAt",
          "position",
          "username",
          "externalId",
          "documentType",
          "documentId",
          "documentExpiresAt",
          "batchImportAllowed",
          "corporateBatchImportAllowed",
          "isCorporate",
          "companyName"
        ]
      },
      "ProfileContextPanelDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "unavailable": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "unavailable"
        ]
      },
      "ProfileContextResponseDto": {
        "type": "object",
        "properties": {
          "devices": {
            "$ref": "#/components/schemas/ProfileContextPanelDto"
          },
          "logins": {
            "$ref": "#/components/schemas/ProfileContextPanelDto"
          },
          "accounts": {
            "$ref": "#/components/schemas/ProfileContextPanelDto"
          }
        },
        "required": [
          "devices",
          "logins",
          "accounts"
        ]
      },
      "ProfileSearchItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "username": {
            "type": "string"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The profile's own stored company name when corporate; an empty string when personal with one stored; null when none is stored."
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "blocked": {
            "type": "boolean"
          },
          "userGroupId": {
            "type": "integer",
            "nullable": true,
            "example": 42
          },
          "userGroupName": {
            "type": "string",
            "nullable": true,
            "description": "Name of the assigned user group; null when the profile has none."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "adminClassId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "The admin class this profile currently belongs to, or null if none."
          },
          "extras": {
            "type": "object",
            "description": "Only the registry fields explicitly requested as extras.* filters, and only those the caller role may see (hidden fields are never present; admin_only fields appear only for admin viewers)."
          }
        },
        "required": [
          "id",
          "role",
          "status",
          "firstName",
          "lastName",
          "email",
          "username",
          "companyName",
          "externalId",
          "blocked",
          "userGroupId",
          "userGroupName",
          "createdAt",
          "lastLoginAt",
          "adminClassId",
          "extras"
        ]
      },
      "ProfileSearchPageResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileSearchItemDto"
            }
          },
          "total": {
            "type": "number",
            "description": "Total rows matching the filter across all pages"
          }
        },
        "required": [
          "items",
          "total"
        ]
      },
      "CreateProfileDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "example": "Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "example": "john.doe@example.com"
          },
          "username": {
            "type": "string",
            "minLength": 4,
            "maxLength": 50,
            "pattern": "^[a-zA-Z0-9_.'@’\\- \\t\\n\\f\\r]+$",
            "example": "john.doe",
            "description": "Login username, mirrored to the identity provider at invite. Unique per tenant, case-insensitively."
          },
          "phone": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9 \\\\()-\\\\+]+$",
            "maxLength": 25
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "preferredLanguage": {
            "type": "string",
            "description": "Must be a tenant-supported locale"
          },
          "address": {
            "type": "object",
            "nullable": true
          },
          "mailingAddress": {
            "type": "object",
            "nullable": true,
            "description": "Mailing/correspondence address"
          },
          "smsPhoneNumber": {
            "type": "string",
            "pattern": "^[+][0-9]{9,15}$"
          },
          "homePhoneNumber": {
            "type": "string",
            "pattern": "^\\+?[0-9][0-9 ()-]{3,31}$"
          },
          "officePhoneNumber": {
            "type": "string",
            "pattern": "^\\+?[0-9][0-9 ()-]{3,31}$"
          },
          "faxNumber": {
            "type": "string",
            "pattern": "^\\+?[0-9][0-9 ()-]{3,31}$"
          },
          "countryOfResidenceIso2": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "ISO 3166-1 alpha-2"
          },
          "countryOfCitizenshipIso2": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "ISO 3166-1 alpha-2"
          },
          "externalId": {
            "type": "string",
            "pattern": "^(?=.{1,60}$)[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"
          },
          "documentType": {
            "type": "string",
            "enum": [
              "passport",
              "driver-license",
              "gov-issued-photo-id"
            ],
            "description": "Identity document type. Must be paired with documentId — both or neither"
          },
          "documentId": {
            "type": "string",
            "maxLength": 100,
            "description": "Identity document number. Must be paired with documentType — both or neither"
          },
          "documentExpiresAt": {
            "type": "string",
            "format": "date",
            "description": "Identity document expiry, yyyy-mm-dd. Requires documentType and documentId"
          },
          "beneficialOwner": {
            "type": "object",
            "nullable": true,
            "description": "Beneficial owner details; admin-only on reads"
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin"
            ],
            "default": "user",
            "description": "Profile role; omitted creates a user"
          },
          "adminClassId": {
            "type": "integer",
            "example": 42,
            "description": "Required when role is admin; refused on user profiles"
          },
          "userGroupId": {
            "type": "integer",
            "example": 42,
            "description": "User profiles only; refused on admin profiles"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "dormant"
            ],
            "description": "Initial status. Omit for the default (pending). `closed` cannot be set at create."
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "Head of Compliance",
            "description": "The person's job title. Accepted for either role; admin-only on reads. Omit the key to leave it unset — an empty string is refused"
          },
          "internalNotes": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65535,
            "example": "Escalate anything over 50k.",
            "description": "Staff-facing commentary. Accepted for either role; never returned to the profile owner on their own profile read. Omit the key to leave it unset — an empty string is refused"
          },
          "isCorporate": {
            "type": "boolean",
            "default": false,
            "description": "Corporate (true) or personal (false) profile type"
          },
          "companyName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "example": "Acme Ltd",
            "description": "Trimmed; required when isCorporate is true"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "email",
          "username"
        ]
      },
      "UnblockProfilesDto": {
        "type": "object",
        "properties": {
          "ids": {
            "example": [
              42
            ],
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "required": [
          "ids"
        ]
      },
      "UnblockProfileResultDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "outcome": {
            "type": "string",
            "enum": [
              "unblocked",
              "already_unblocked",
              "not_found",
              "rejected"
            ],
            "description": "'already_unblocked' emits no audit event; 'rejected' means the profile is closed."
          }
        },
        "required": [
          "id",
          "outcome"
        ]
      },
      "ResendInvitationResponseDto": {
        "type": "object",
        "properties": {
          "emailDispatched": {
            "type": "boolean",
            "description": "Whether an invitation email dispatch was requested."
          },
          "reason": {
            "type": "string",
            "enum": [
              "dispatched",
              "missing_customer_app_url",
              "missing_admin_app_url",
              "email_suppressed"
            ]
          }
        },
        "required": [
          "emailDispatched",
          "reason"
        ]
      },
      "TwoFactorProviderDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable provider code, e.g. \"totp\""
          },
          "name": {
            "type": "string",
            "description": "Display name of the provider"
          },
          "isAllowDisable": {
            "type": "boolean",
            "description": "Whether the caller may remove this provider here. Always false for webauthn: security keys are removed one at a time. False for every provider when policy requires 2FA."
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether the caller has this provider enrolled"
          }
        },
        "required": [
          "code",
          "name",
          "isAllowDisable",
          "isEnabled"
        ]
      },
      "TwoFactorNudgeStateDto": {
        "type": "object",
        "properties": {
          "armed": {
            "type": "boolean",
            "description": "Whether the login enrollment prompt should show: true only while the caller has neither dismissed it nor enrolled a second factor"
          },
          "dismissed": {
            "type": "boolean",
            "description": "Whether the caller has dismissed the prompt, independent of factor state"
          }
        },
        "required": [
          "armed",
          "dismissed"
        ]
      },
      "TotpRemovalDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The current code from the authenticator app"
          }
        },
        "required": [
          "code"
        ]
      },
      "TotpEnrollmentStartDto": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "The otpauth:// URI for the authenticator app, rendered as a QR code by the client. Shown exactly once; it is never stored, logged, or returned again."
          },
          "secret": {
            "type": "string",
            "description": "The base32 secret for manual entry into the authenticator app."
          }
        },
        "required": [
          "uri",
          "secret"
        ]
      },
      "TotpEnrollmentConfirmDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The first code from the authenticator app"
          }
        },
        "required": [
          "code"
        ]
      },
      "RecoveryCodesDto": {
        "type": "object",
        "properties": {
          "recoveryCodes": {
            "description": "One-time recovery codes, returned only here and never again. Every code the profile held before this call is now void.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "recoveryCodes"
        ]
      },
      "WebauthnEnrollmentChallengeDto": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "integer",
            "example": 42,
            "description": "Opaque handle for this enrollment; the verify call presents it back"
          },
          "publicKeyCredentialCreationOptions": {
            "type": "object",
            "description": "WebAuthn creation options from the identity provider, forwarded unchanged. JSON cannot carry the ArrayBuffers WebAuthn needs, so `publicKey.challenge`, `publicKey.user.id` and each `publicKey.excludeCredentials[].id` arrive as base64url (RFC 4648 §5, unpadded). The client decodes those three to ArrayBuffer before calling navigator.credentials.create()."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "challengeId",
          "publicKeyCredentialCreationOptions",
          "expiresAt"
        ]
      },
      "WebauthnEnrollmentVerifyDto": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "integer",
            "example": 42
          },
          "publicKeyCredential": {
            "type": "object",
            "description": "The authenticator's attestation response, as WebAuthn credential JSON"
          },
          "tokenName": {
            "type": "string",
            "description": "Display name for the authenticator"
          }
        },
        "required": [
          "challengeId",
          "publicKeyCredential"
        ]
      },
      "TwoFactorResetDto": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "totp",
              "webauthn",
              "mobile_device",
              "otp_sms",
              "otp_email"
            ],
            "description": "The provider to remove; other enrolled providers stay"
          },
          "justification": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "The operator's reason for clearing the profile's second factors"
          }
        },
        "required": [
          "provider",
          "justification"
        ]
      },
      "MobileDeviceUnpairDto": {
        "type": "object",
        "properties": {
          "justification": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "The operator's reason for unpairing the profile's device"
          }
        },
        "required": [
          "justification"
        ]
      },
      "RailSettingEntryDto": {
        "type": "object",
        "properties": {
          "send": {
            "type": "string",
            "enum": [
              "allowed",
              "denied",
              "inherited"
            ]
          },
          "batchImport": {
            "type": "string",
            "enum": [
              "allowed",
              "denied",
              "inherited"
            ]
          }
        },
        "required": [
          "send",
          "batchImport"
        ]
      },
      "AccountTypeResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "defaultCreditLimit": {
            "type": "string",
            "nullable": true
          },
          "autoGeneration": {
            "type": "boolean"
          },
          "numberPrefix": {
            "type": "string",
            "nullable": true
          },
          "corporate": {
            "type": "boolean"
          },
          "swiftBatchImportAllowed": {
            "type": "boolean",
            "deprecated": true,
            "description": "Deprecated alias for railSettings.SWIFT.batchImport === \"allowed\""
          },
          "railSettings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RailSettingEntryDto"
            },
            "description": "All routable rails, both keys always explicit"
          },
          "accountCount": {
            "type": "number"
          },
          "maintenanceFee": {
            "type": "string",
            "nullable": true
          },
          "minBalanceThreshold": {
            "type": "string",
            "nullable": true
          },
          "minBalanceFee": {
            "type": "string",
            "nullable": true
          },
          "minBalanceChargeDay": {
            "type": "number",
            "nullable": true
          },
          "creditLineAnnualRate": {
            "type": "string",
            "nullable": true
          },
          "creditLinePeriod": {
            "type": "string",
            "enum": [
              "daily",
              "monthly",
              "quarterly",
              "bi_annually",
              "annually",
              "at_maturity"
            ],
            "nullable": true
          },
          "creditLineChargeDay": {
            "type": "number",
            "nullable": true
          },
          "creditLineChargeMonth": {
            "type": "number",
            "nullable": true
          },
          "depositInterestAnnualRate": {
            "type": "string",
            "nullable": true
          },
          "depositPayoutPeriod": {
            "type": "string",
            "enum": [
              "daily",
              "monthly",
              "quarterly",
              "bi_annually",
              "annually",
              "at_maturity"
            ],
            "nullable": true
          },
          "depositPayoutDay": {
            "type": "number",
            "nullable": true
          },
          "depositPayoutMonth": {
            "type": "number",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "currency",
          "defaultCreditLimit",
          "autoGeneration",
          "numberPrefix",
          "corporate",
          "swiftBatchImportAllowed",
          "railSettings",
          "accountCount",
          "maintenanceFee",
          "minBalanceThreshold",
          "minBalanceFee",
          "minBalanceChargeDay",
          "creditLineAnnualRate",
          "creditLinePeriod",
          "creditLineChargeDay",
          "creditLineChargeMonth",
          "depositInterestAnnualRate",
          "depositPayoutPeriod",
          "depositPayoutDay",
          "depositPayoutMonth",
          "createdAt",
          "updatedAt"
        ]
      },
      "RailSettingEntryPatchDto": {
        "type": "object",
        "properties": {
          "send": {
            "type": "string",
            "enum": [
              "allowed",
              "denied",
              "inherited"
            ]
          },
          "batchImport": {
            "type": "string",
            "enum": [
              "allowed",
              "denied",
              "inherited"
            ]
          }
        }
      },
      "CreateAccountTypeDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "currency": {
            "type": "string"
          },
          "autoGeneration": {
            "type": "boolean"
          },
          "numberPrefix": {
            "type": "string",
            "maxLength": 4,
            "nullable": true,
            "description": "Prepended to generated account numbers; alphanumeric"
          },
          "corporate": {
            "type": "boolean",
            "default": false
          },
          "swiftBatchImportAllowed": {
            "type": "boolean",
            "default": false,
            "deprecated": true,
            "description": "Deprecated alias for railSettings.SWIFT.batchImport"
          },
          "railSettings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RailSettingEntryPatchDto"
            },
            "description": "Per-rail settings keyed by rail code; per-key merge (absent key untouched)"
          },
          "defaultCreditLimit": {
            "type": "string",
            "nullable": true
          },
          "maintenanceFee": {
            "type": "string",
            "nullable": true
          },
          "minBalanceThreshold": {
            "type": "string",
            "nullable": true
          },
          "minBalanceFee": {
            "type": "string",
            "nullable": true
          },
          "minBalanceChargeDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31,
            "nullable": true
          },
          "creditLineAnnualRate": {
            "type": "string",
            "nullable": true
          },
          "creditLinePeriod": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "bi_annually",
              "annually"
            ],
            "nullable": true
          },
          "creditLineChargeDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31,
            "nullable": true
          },
          "creditLineChargeMonth": {
            "type": "number",
            "minimum": 1,
            "maximum": 12,
            "nullable": true
          },
          "depositInterestAnnualRate": {
            "type": "string",
            "nullable": true
          },
          "depositPayoutPeriod": {
            "type": "string",
            "enum": [
              "daily",
              "monthly",
              "quarterly",
              "bi_annually",
              "annually",
              "at_maturity"
            ],
            "nullable": true
          },
          "depositPayoutDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31,
            "nullable": true
          },
          "depositPayoutMonth": {
            "type": "number",
            "minimum": 1,
            "maximum": 12,
            "nullable": true
          }
        },
        "required": [
          "name",
          "currency",
          "autoGeneration"
        ]
      },
      "UpdateAccountTypeDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "currency": {
            "type": "string"
          },
          "autoGeneration": {
            "type": "boolean"
          },
          "numberPrefix": {
            "type": "string",
            "maxLength": 4,
            "nullable": true,
            "description": "Prepended to generated account numbers; alphanumeric"
          },
          "corporate": {
            "type": "boolean",
            "default": false
          },
          "swiftBatchImportAllowed": {
            "type": "boolean",
            "default": false,
            "deprecated": true,
            "description": "Deprecated alias for railSettings.SWIFT.batchImport"
          },
          "railSettings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RailSettingEntryPatchDto"
            },
            "description": "Per-rail settings keyed by rail code; per-key merge (absent key untouched)"
          },
          "defaultCreditLimit": {
            "type": "string",
            "nullable": true
          },
          "maintenanceFee": {
            "type": "string",
            "nullable": true
          },
          "minBalanceThreshold": {
            "type": "string",
            "nullable": true
          },
          "minBalanceFee": {
            "type": "string",
            "nullable": true
          },
          "minBalanceChargeDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31,
            "nullable": true
          },
          "creditLineAnnualRate": {
            "type": "string",
            "nullable": true
          },
          "creditLinePeriod": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "bi_annually",
              "annually"
            ],
            "nullable": true
          },
          "creditLineChargeDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31,
            "nullable": true
          },
          "creditLineChargeMonth": {
            "type": "number",
            "minimum": 1,
            "maximum": 12,
            "nullable": true
          },
          "depositInterestAnnualRate": {
            "type": "string",
            "nullable": true
          },
          "depositPayoutPeriod": {
            "type": "string",
            "enum": [
              "daily",
              "monthly",
              "quarterly",
              "bi_annually",
              "annually",
              "at_maturity"
            ],
            "nullable": true
          },
          "depositPayoutDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31,
            "nullable": true
          },
          "depositPayoutMonth": {
            "type": "number",
            "minimum": 1,
            "maximum": 12,
            "nullable": true
          }
        }
      },
      "BrandingUploadResponseDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The stable public URL now served on the tenant identity payload"
          }
        },
        "required": [
          "url"
        ]
      },
      "BrandingCropDto": {
        "type": "object",
        "properties": {
          "x": {
            "type": "integer"
          },
          "y": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          }
        },
        "required": [
          "x",
          "y",
          "width",
          "height"
        ]
      },
      "TanOverviewDto": {
        "type": "object",
        "properties": {
          "unused": {
            "type": "number",
            "description": "TANs the caller holds, as v2 counted them"
          },
          "requiredSchemes": {
            "description": "Transfer types the bank requires a TAN for, e.g. swift",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smsRequestAvailable": {
            "type": "boolean",
            "description": "Whether the caller can ask for a TAN by SMS: the bank has SMS and they have a number"
          }
        },
        "required": [
          "unused",
          "requiredSchemes",
          "smsRequestAvailable"
        ]
      },
      "TanTransferDto": {
        "type": "object",
        "properties": {
          "scheme": {
            "type": "string",
            "enum": [
              "swift",
              "sepa_ct",
              "sepa_inst",
              "fps",
              "chaps",
              "ach",
              "fedwire",
              "tba",
              "tbu",
              "cft"
            ]
          },
          "fromAccountId": {
            "type": "number"
          },
          "amount": {
            "type": "string",
            "example": "100.50"
          },
          "beneficiaryName": {
            "type": "string",
            "description": "Named in the SMS; the caller otherwise"
          }
        },
        "required": [
          "scheme",
          "fromAccountId",
          "amount"
        ]
      },
      "RequestTanBySmsDto": {
        "type": "object",
        "properties": {
          "transfer": {
            "description": "The transfer being entered. The TAN then only works for its source account and amount, for an hour. Without it the TAN works for any transfer.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TanTransferDto"
              }
            ]
          }
        }
      },
      "TanSentDto": {
        "type": "object",
        "properties": {
          "sentTo": {
            "type": "string",
            "description": "The caller's full phone number the TAN went to"
          }
        },
        "required": [
          "sentTo"
        ]
      },
      "TanAdminOverviewDto": {
        "type": "object",
        "properties": {
          "unused": {
            "type": "number",
            "description": "TANs the customer holds, as v2 counted them"
          },
          "smsAvailable": {
            "type": "boolean",
            "description": "Whether TANs can go to this customer by SMS: the bank has a provider and the profile a number"
          }
        },
        "required": [
          "unused",
          "smsAvailable"
        ]
      },
      "IssueTansDto": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "number",
            "minimum": 1,
            "maximum": 100
          },
          "cancelRemaining": {
            "type": "boolean",
            "description": "Cancel the TANs the customer still holds first"
          },
          "sendBySms": {
            "type": "boolean",
            "description": "Send by SMS instead of an internal message"
          }
        },
        "required": [
          "quantity",
          "cancelRemaining",
          "sendBySms"
        ]
      },
      "TanCountDto": {
        "type": "object",
        "properties": {
          "unused": {
            "type": "number",
            "description": "TANs the customer holds, as v2 counted them"
          }
        },
        "required": [
          "unused"
        ]
      },
      "TanSettingsRailsDto": {
        "type": "object",
        "properties": {
          "active": {
            "type": "array",
            "description": "The rails the bank runs, of those the OTP-list tab and transfer types list",
            "items": {
              "type": "string",
              "enum": [
                "TBA",
                "TBU",
                "SWIFT",
                "SEPA_CT",
                "SEPA_INST",
                "FPS",
                "CHAPS",
                "ACH",
                "FEDWIRE"
              ]
            }
          }
        },
        "required": [
          "active"
        ]
      },
      "BeneficiaryResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "bankName": {
            "type": "string",
            "nullable": true
          },
          "countryIso2": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "stateProvRegion": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "swiftBic": {
            "type": "string",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "nullable": true
          },
          "sortCode": {
            "type": "string",
            "nullable": true
          },
          "abaRtn": {
            "type": "string",
            "nullable": true
          },
          "bankAccountType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "checking",
              "savings"
            ],
            "description": "The US account kind an ACH payment names"
          },
          "bankAddress": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's address"
          },
          "bankLocation": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's city"
          },
          "bankCountryIso2": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's country, ISO 3166-1 alpha-2"
          },
          "intermediaryBeneficiaryId": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "bankName",
          "countryIso2",
          "addressLine1",
          "addressLine2",
          "city",
          "stateProvRegion",
          "iban",
          "swiftBic",
          "accountNumber",
          "sortCode",
          "abaRtn",
          "bankAccountType",
          "bankAddress",
          "bankLocation",
          "bankCountryIso2",
          "intermediaryBeneficiaryId"
        ]
      },
      "ResolvedBeneficiaryResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "bankName": {
            "type": "string",
            "nullable": true
          },
          "countryIso2": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "stateProvRegion": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "swiftBic": {
            "type": "string",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "nullable": true
          },
          "sortCode": {
            "type": "string",
            "nullable": true
          },
          "abaRtn": {
            "type": "string",
            "nullable": true
          },
          "bankAccountType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "checking",
              "savings"
            ],
            "description": "The US account kind an ACH payment names"
          },
          "bankAddress": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's address"
          },
          "bankLocation": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's city"
          },
          "bankCountryIso2": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's country, ISO 3166-1 alpha-2"
          },
          "intermediaryBeneficiaryId": {
            "type": "integer",
            "nullable": true
          },
          "intermediary": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/BeneficiaryResponseDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "bankName",
          "countryIso2",
          "addressLine1",
          "addressLine2",
          "city",
          "stateProvRegion",
          "iban",
          "swiftBic",
          "accountNumber",
          "sortCode",
          "abaRtn",
          "bankAccountType",
          "bankAddress",
          "bankLocation",
          "bankCountryIso2",
          "intermediaryBeneficiaryId",
          "intermediary"
        ]
      },
      "CreateBeneficiaryRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "bankName": {
            "type": "string",
            "maxLength": 255
          },
          "countryIso2": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2"
          },
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 100
          },
          "stateProvRegion": {
            "type": "string",
            "maxLength": 255
          },
          "iban": {
            "type": "string"
          },
          "swiftBic": {
            "type": "string"
          },
          "accountNumber": {
            "type": "string"
          },
          "sortCode": {
            "type": "string"
          },
          "abaRtn": {
            "type": "string"
          },
          "bankAccountType": {
            "type": "string",
            "enum": [
              "checking",
              "savings"
            ]
          },
          "bankAddress": {
            "type": "string",
            "maxLength": 255
          },
          "bankLocation": {
            "type": "string",
            "maxLength": 255
          },
          "bankCountryIso2": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2"
          },
          "intermediaryBeneficiaryId": {
            "type": "integer"
          },
          "routingOnly": {
            "type": "boolean",
            "description": "The role this record is created with. True marks a correspondent or intermediary bank, hidden from the beneficiary list and removed once orphaned. False or absent marks a real payee. Create-only, PATCH does not accept it."
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateBeneficiaryRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "bankName": {
            "type": "string",
            "maxLength": 255
          },
          "countryIso2": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2"
          },
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 100
          },
          "stateProvRegion": {
            "type": "string",
            "maxLength": 255
          },
          "iban": {
            "type": "string"
          },
          "swiftBic": {
            "type": "string"
          },
          "accountNumber": {
            "type": "string"
          },
          "sortCode": {
            "type": "string"
          },
          "abaRtn": {
            "type": "string"
          },
          "bankAccountType": {
            "type": "string",
            "enum": [
              "checking",
              "savings"
            ]
          },
          "bankAddress": {
            "type": "string",
            "maxLength": 255
          },
          "bankLocation": {
            "type": "string",
            "maxLength": 255
          },
          "bankCountryIso2": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2"
          },
          "intermediaryBeneficiaryId": {
            "type": "integer"
          }
        }
      },
      "CreditAccountPreviewResponseDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "amount": {
            "type": "string",
            "example": "100.00"
          },
          "currentAvailable": {
            "type": "string",
            "example": "250.00"
          },
          "resultingAvailable": {
            "type": "string",
            "example": "350.00"
          },
          "fee": {
            "type": "string",
            "example": "10.00",
            "description": "The incoming-payment fee this credit would be charged, returned only when the request asked for it. Already deducted from resultingAvailable; amount stays gross"
          }
        },
        "required": [
          "accountId",
          "currency",
          "amount",
          "currentAvailable",
          "resultingAvailable"
        ]
      },
      "CreditAccountRequestDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer",
            "description": "Customer account to credit"
          },
          "amount": {
            "type": "string",
            "example": "100.00",
            "description": "Amount to credit, in the account currency"
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "example": "Chargeback correction for ticket #4821",
            "description": "The operator's reason. Required on submit — enforced server-side (accounts.adjustment.description_required); ignored on preview."
          },
          "reference": {
            "type": "string",
            "maxLength": 140
          },
          "chargeIncomingFee": {
            "type": "boolean",
            "description": "Charge the tenant's incoming-payment fee on this credit. The customer is credited the amount and debited the fee as two separate entries. Fails when no fee rule matches the credited profile"
          },
          "useRevenueAccount": {
            "type": "boolean",
            "description": "Post the other side on the bank's revenue account for this currency instead of the Adjustments account. A credit is paid out of revenue. Fails when the currency has no revenue account"
          }
        },
        "required": [
          "accountId",
          "amount"
        ]
      },
      "CreditAccountAckDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The created transfer request id"
          },
          "status": {
            "type": "string",
            "enum": [
              "executed",
              "duplicate"
            ],
            "description": "`duplicate` means this Idempotency-Key already created the adjustment"
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "DebitAccountPreviewResponseDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "amount": {
            "type": "string",
            "example": "100.00"
          },
          "currentAvailable": {
            "type": "string",
            "example": "250.00"
          },
          "resultingAvailable": {
            "type": "string",
            "example": "150.00",
            "description": "Balance the submit would leave. Negative when the debit exceeds the available amount — a manual debit is allowed to overdraw, so this is a figure to weigh, not an error"
          }
        },
        "required": [
          "accountId",
          "currency",
          "amount",
          "currentAvailable",
          "resultingAvailable"
        ]
      },
      "DebitAccountRequestDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer",
            "description": "Customer account to debit"
          },
          "amount": {
            "type": "string",
            "example": "100.00",
            "description": "Amount to debit, in the account currency"
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "example": "Chargeback correction for ticket #4821",
            "description": "The operator's reason. Required on submit — enforced server-side (accounts.adjustment.description_required); ignored on preview."
          },
          "reference": {
            "type": "string",
            "maxLength": 140
          },
          "useRevenueAccount": {
            "type": "boolean",
            "description": "Post the other side on the bank's revenue account for this currency instead of the Adjustments account. A debit goes into revenue. Fails when the currency has no revenue account"
          }
        },
        "required": [
          "accountId",
          "amount"
        ]
      },
      "DebitAccountAckDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The created transfer request id"
          },
          "status": {
            "type": "string",
            "enum": [
              "executed",
              "duplicate"
            ],
            "description": "`duplicate` means this Idempotency-Key already created the adjustment"
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "DebitRevenueAccountPreviewResponseDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "amount": {
            "type": "string",
            "example": "100.00"
          },
          "currentAvailable": {
            "type": "string",
            "example": "250.00",
            "description": "The account's balance, computed from its transactions."
          },
          "resultingAvailable": {
            "type": "string",
            "example": "150.00",
            "description": "The balance the debit would leave. Negative when the debit exceeds what the account has accrued; a manual debit may overdraw."
          }
        },
        "required": [
          "accountId",
          "currency",
          "amount",
          "currentAvailable",
          "resultingAvailable"
        ]
      },
      "DebitRevenueAccountRequestDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer",
            "description": "Revenue account to debit"
          },
          "amount": {
            "type": "string",
            "example": "100.00",
            "description": "Amount to debit, in the account currency"
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "example": "Quarterly fee income payout",
            "description": "The operator's optional note. Ignored on preview."
          },
          "reference": {
            "type": "string",
            "maxLength": 140
          }
        },
        "required": [
          "accountId",
          "amount"
        ]
      },
      "DebitRevenueAccountAckDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The created transfer request id"
          },
          "status": {
            "type": "string",
            "enum": [
              "executed",
              "duplicate"
            ],
            "description": "`duplicate` means this Idempotency-Key already created the adjustment"
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "CardTypeResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "iconFileId": {
            "type": "integer",
            "nullable": true
          },
          "category": {
            "type": "string",
            "enum": [
              "manual",
              "integrated"
            ]
          },
          "numberFormat": {
            "type": "string",
            "enum": [
              "alphanumeric",
              "sixteen_numeric"
            ]
          },
          "cardCount": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "currency",
          "iconFileId",
          "category",
          "numberFormat",
          "cardCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "CardTypeLookupOptionDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "CreateCardTypeDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "currency": {
            "type": "string"
          },
          "numberFormat": {
            "type": "string",
            "enum": [
              "alphanumeric",
              "sixteen_numeric"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "manual",
              "integrated"
            ],
            "default": "manual"
          },
          "iconFileId": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "name",
          "currency",
          "numberFormat"
        ]
      },
      "UpdateCardTypeDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "currency": {
            "type": "string"
          },
          "numberFormat": {
            "type": "string",
            "enum": [
              "alphanumeric",
              "sixteen_numeric"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "manual",
              "integrated"
            ],
            "default": "manual"
          },
          "iconFileId": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "AdminAccountOwnerDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "profileId",
          "firstName",
          "lastName",
          "email"
        ]
      },
      "CardResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "accountId": {
            "type": "integer",
            "description": "The account backing this card, where the balance lives"
          },
          "profileId": {
            "type": "integer"
          },
          "cardTypeId": {
            "type": "integer"
          },
          "cardTypeName": {
            "type": "string"
          },
          "numberFormat": {
            "type": "string",
            "enum": [
              "alphanumeric",
              "sixteen_numeric"
            ]
          },
          "currency": {
            "type": "string",
            "description": "Currency code, fixed by the card type"
          },
          "number": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "blocked",
              "expired",
              "cancelled"
            ]
          },
          "expirationMonth": {
            "type": "number"
          },
          "expirationYear": {
            "type": "number"
          },
          "balance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableAmount": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "owner": {
            "description": "The owning profile. Never null: card accounts are always personal.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AdminAccountOwnerDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "accountId",
          "profileId",
          "cardTypeId",
          "cardTypeName",
          "numberFormat",
          "currency",
          "number",
          "status",
          "expirationMonth",
          "expirationYear",
          "balance",
          "availableAmount",
          "owner",
          "createdAt",
          "updatedAt"
        ]
      },
      "CardOwnerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active"
            ]
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "username",
          "status"
        ]
      },
      "CreateCardRequestDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "description": "Profile the card is issued to"
          },
          "cardTypeId": {
            "type": "integer"
          },
          "number": {
            "type": "string",
            "maxLength": 20,
            "description": "The card number, matching the type's number format"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "blocked",
              "expired",
              "cancelled"
            ]
          },
          "expirationMonth": {
            "type": "number",
            "minimum": 1,
            "maximum": 12
          },
          "expirationYear": {
            "type": "number",
            "minimum": 1
          }
        },
        "required": [
          "profileId",
          "cardTypeId",
          "number",
          "status",
          "expirationMonth",
          "expirationYear"
        ]
      },
      "UpdateCardRequestDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "blocked",
              "expired",
              "cancelled"
            ]
          },
          "expirationMonth": {
            "type": "number",
            "minimum": 1,
            "maximum": 12
          },
          "expirationYear": {
            "type": "number",
            "minimum": 1
          }
        }
      },
      "OwnCardResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "accountId": {
            "type": "integer",
            "description": "The account backing this card, where the balance lives"
          },
          "cardTypeId": {
            "type": "integer"
          },
          "cardTypeName": {
            "type": "string"
          },
          "cardTypeHasIcon": {
            "type": "boolean",
            "description": "Whether the type has an icon, served by GET /card-types/{id}/icon"
          },
          "numberFormat": {
            "type": "string",
            "enum": [
              "alphanumeric",
              "sixteen_numeric"
            ]
          },
          "currency": {
            "type": "string",
            "description": "Currency code, fixed by the card type"
          },
          "maskedNumber": {
            "type": "string",
            "description": "Masked to the last 4 (`****1234`)"
          },
          "number": {
            "type": "string",
            "description": "The full card number. Only on the single-card read, never in the list."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "blocked",
              "expired",
              "cancelled"
            ]
          },
          "expirationMonth": {
            "type": "number"
          },
          "expirationYear": {
            "type": "number"
          },
          "balance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableAmount": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "accountId",
          "cardTypeId",
          "cardTypeName",
          "cardTypeHasIcon",
          "numberFormat",
          "currency",
          "maskedNumber",
          "status",
          "expirationMonth",
          "expirationYear",
          "balance",
          "availableAmount",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateCurrencyDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "fiat",
              "crypto",
              "other"
            ]
          },
          "decimalPlaces": {
            "type": "number"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "type",
          "decimalPlaces",
          "isActive"
        ]
      },
      "CurrencyResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "fiat",
              "crypto",
              "other"
            ]
          },
          "decimalPlaces": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "feed": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "type",
          "decimalPlaces",
          "status",
          "feed",
          "createdAt",
          "updatedAt"
        ]
      },
      "SetMainCurrencyDto": {
        "type": "object",
        "properties": {
          "currencyId": {
            "type": "integer"
          }
        },
        "required": [
          "currencyId"
        ]
      },
      "MainCurrencyResponseDto": {
        "type": "object",
        "properties": {
          "currency": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyResponseDto"
              }
            ]
          }
        },
        "required": [
          "currency"
        ]
      },
      "UpdateCurrencyDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "TransferPreviewAmountsDto": {
        "type": "object",
        "properties": {
          "marginAmount": {
            "type": "string",
            "description": "FX margin in the source currency, at full precision"
          },
          "principal": {
            "type": "string",
            "description": "Decimal string"
          },
          "fee": {
            "type": "string",
            "description": "Decimal string"
          },
          "totalDebit": {
            "type": "string",
            "description": "Principal plus fee, and on external transfers the FX margin too, which is charged beside the principal rather than taken out of it."
          },
          "outputAmount": {
            "type": "string",
            "description": "What the beneficiary receives, rounded to the destination currency. On internal transfers this is already net of the FX margin, which comes out of the amount sent."
          }
        },
        "required": [
          "principal",
          "fee",
          "totalDebit",
          "outputAmount"
        ]
      },
      "TransferPreviewQuoteResponseDto": {
        "type": "object",
        "properties": {
          "fee": {
            "type": "string",
            "description": "Decimal string"
          },
          "rate": {
            "type": "string",
            "description": "Exchange rate as a decimal string"
          },
          "marginPercent": {
            "type": "string",
            "description": "FX margin for the pair as a percent at two decimals; '0.00' on same-currency. Where it lands differs by rail: internal transfers take it out of the amount sent, so the output amount is already net of it; external transfers charge it beside the principal, so the total debit carries it and the whole principal converts."
          },
          "amounts": {
            "$ref": "#/components/schemas/TransferPreviewAmountsDto"
          },
          "rateLockInToken": {
            "type": "string",
            "nullable": true,
            "description": "opaque token holding the quote: the rate (when the currencies differ) and the fee shown. Send it with the submit. On every external rail, a changed fee refuses the submit with `accounts.transfer.fee_changed`, and the client previews again to show the new fee. Internal submits charge the current fee; same-currency internal previews return null."
          }
        },
        "required": [
          "fee",
          "rate",
          "marginPercent",
          "amounts",
          "rateLockInToken"
        ]
      },
      "TransferPreviewRequestDto": {
        "type": "object",
        "properties": {}
      },
      "TbaPreviewRequestDto": {
        "type": "object",
        "properties": {
          "sourceAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the source account"
          },
          "destinationAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the destination account"
          },
          "amount": {
            "type": "string",
            "description": "Transfer amount as a decimal string"
          }
        },
        "required": [
          "sourceAccountId",
          "destinationAccountId",
          "amount"
        ]
      },
      "TbuPreviewRequestDto": {
        "type": "object",
        "properties": {
          "sourceAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the source account"
          },
          "destinationAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the recipient's account"
          },
          "recipientUsername": {
            "type": "string",
            "example": "alice",
            "description": "Username of the recipient. Refused unless the account is theirs (a company account's Principal Contact)."
          },
          "amount": {
            "type": "string",
            "description": "Transfer amount as a positive decimal string"
          }
        },
        "required": [
          "sourceAccountId",
          "destinationAccountId",
          "recipientUsername",
          "amount"
        ]
      },
      "CftPreviewRequestDto": {
        "type": "object",
        "properties": {
          "sourceAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the funding account"
          },
          "cardAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the card's account row"
          },
          "amount": {
            "type": "string",
            "description": "Top-up amount as a positive decimal string"
          }
        },
        "required": [
          "sourceAccountId",
          "cardAccountId",
          "amount"
        ]
      },
      "CftOnBehalfPreviewRequestDto": {
        "type": "object",
        "properties": {
          "sourceAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the funding account"
          },
          "cardAccountId": {
            "type": "integer",
            "example": 42,
            "description": "Id of the card's account row"
          },
          "amount": {
            "type": "string",
            "description": "Top-up amount as a positive decimal string"
          }
        },
        "required": [
          "sourceAccountId",
          "cardAccountId",
          "amount"
        ]
      },
      "TransferFeeOptionResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The fee config this option comes from."
          },
          "name": {
            "type": "string"
          },
          "fee": {
            "type": "string",
            "example": "2.50"
          }
        },
        "required": [
          "id",
          "name",
          "fee"
        ]
      },
      "BeneficiaryFieldSpecDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Beneficiary field key (e.g. \"iban\")"
          },
          "required": {
            "type": "boolean"
          },
          "hint": {
            "type": "string",
            "enum": [
              "iban",
              "bic",
              "sortCode",
              "abaRtn",
              "abaRoutingNumber",
              "country"
            ],
            "description": "Input format hint. The value is still validated on submit."
          },
          "requires": {
            "description": "fields that become required once this one is filled",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "minLength": {
            "type": "integer",
            "description": "live minimum length for this field"
          },
          "maxLength": {
            "type": "integer",
            "description": "live maximum length for this field"
          },
          "pattern": {
            "type": "string",
            "description": "live regex the value must match (source string); still validated on submit"
          },
          "options": {
            "description": "the values the field must take one of, offered as a picker",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "key",
          "required"
        ]
      },
      "BeneficiaryInputSpecDto": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "payee",
              "accountReference"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BeneficiaryFieldSpecDto"
            }
          },
          "oneOf": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "groups of keys; at least one key of each group must be filled"
          },
          "source": {
            "type": "string",
            "enum": [
              "ownAccounts",
              "otherCustomers",
              "ownCards"
            ]
          }
        },
        "required": [
          "mode"
        ]
      },
      "TransferOptionCandidateResponseDto": {
        "type": "object",
        "properties": {
          "rail": {
            "type": "string",
            "description": "rail code (e.g. \"SWIFT\")"
          },
          "speedClass": {
            "type": "string",
            "enum": [
              "instant",
              "same-day",
              "next-day"
            ]
          },
          "fee": {
            "type": "string",
            "description": "The fee charged if you send on this rail, in the source account currency. Present once the destination is known: from a beneficiaryId, or from beneficiary details that identify a country. Absent when no exchange rate is available for the pair, or when feeOptions is returned instead."
          },
          "feeOptions": {
            "description": "Returned instead of fee when more than one fee config matches this rail. Pick one before preview and submit.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferFeeOptionResponseDto"
            }
          },
          "settlementMode": {
            "type": "string",
            "enum": [
              "manual",
              "provider"
            ],
            "description": "external rails only: 'manual' means the bank settles the payment outside the platform"
          },
          "requiresReference": {
            "type": "boolean",
            "description": "true when the rail carries a mandatory transfer reference on its wire (the SEPA remittance line)"
          },
          "hasDocumentAttachmentPath": {
            "type": "boolean",
            "description": "true when the rail takes a supporting document; absent rails never require one"
          },
          "beneficiary": {
            "$ref": "#/components/schemas/BeneficiaryInputSpecDto"
          }
        },
        "required": [
          "rail",
          "speedClass",
          "beneficiary"
        ]
      },
      "TransferOptionsResponseDto": {
        "type": "object",
        "properties": {
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferOptionCandidateResponseDto"
            }
          }
        },
        "required": [
          "candidates"
        ]
      },
      "TransferOptionsRequestDto": {
        "type": "object",
        "properties": {}
      },
      "TransferLimitsResponseDto": {
        "type": "object",
        "properties": {
          "tba": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "EUR": "10000.00"
            }
          },
          "tbu": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "EUR": "5000.00"
            }
          }
        },
        "required": [
          "tba",
          "tbu"
        ]
      },
      "TransferTypesResponseDto": {
        "type": "object",
        "properties": {
          "enabledRails": {
            "example": [
              "SWIFT",
              "SEPA_CT",
              "TBA",
              "TBU"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabledRails"
        ]
      },
      "BatchUpdateRowFailureDto": {
        "type": "object",
        "properties": {
          "rowNumber": {
            "type": "number",
            "nullable": true,
            "description": "1-based row number in the submitted file, header included. Null for a record whose cell count differs from the first record"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "rowNumber",
          "reason"
        ]
      },
      "BatchUpdateResultDto": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "number"
          },
          "successCount": {
            "type": "number"
          },
          "failedCount": {
            "type": "number",
            "description": "Failures that carry a row number"
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BatchUpdateRowFailureDto"
            }
          }
        },
        "required": [
          "totalCount",
          "successCount",
          "failedCount",
          "failures"
        ]
      },
      "UserGroupResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "batchImportAllowed": {
            "type": "boolean",
            "description": "On the batch-import allow list: every member of the group may upload"
          },
          "swiftBatchImportAllowed": {
            "type": "boolean",
            "deprecated": true,
            "description": "Deprecated alias for railSettings.SWIFT.batchImport === \"allowed\""
          },
          "railSettings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RailSettingEntryDto"
            },
            "description": "All routable rails, both keys always explicit"
          },
          "memberCount": {
            "type": "number",
            "description": "Profiles currently assigned to the group"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "batchImportAllowed",
          "swiftBatchImportAllowed",
          "railSettings",
          "memberCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateUserGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "batchImportAllowed": {
            "type": "boolean",
            "description": "On the batch-import allow list: every member of the group may upload"
          },
          "swiftBatchImportAllowed": {
            "type": "boolean",
            "deprecated": true,
            "description": "Deprecated alias for railSettings.SWIFT.batchImport"
          },
          "railSettings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RailSettingEntryPatchDto"
            },
            "description": "Per-rail settings keyed by rail code; per-key merge (absent key untouched)"
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateUserGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "batchImportAllowed": {
            "type": "boolean",
            "description": "On the batch-import allow list: every member of the group may upload"
          },
          "swiftBatchImportAllowed": {
            "type": "boolean",
            "deprecated": true,
            "description": "Deprecated alias for railSettings.SWIFT.batchImport"
          },
          "railSettings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RailSettingEntryPatchDto"
            },
            "description": "Per-rail settings keyed by rail code; per-key merge (absent key untouched)"
          }
        }
      },
      "AssignUserGroupDto": {
        "type": "object",
        "properties": {
          "userGroupId": {
            "type": "integer",
            "nullable": true,
            "description": "Target user group; an explicit null clears the assignment"
          }
        },
        "required": [
          "userGroupId"
        ]
      },
      "AssignUserGroupResultDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "assigned",
              "unassigned"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "TermsDocumentSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "versionNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "title",
          "versionNumber",
          "status",
          "publishedAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "TermsAcceptanceLogEntryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "profileId": {
            "type": "integer"
          },
          "profileName": {
            "type": "string"
          },
          "profileEmail": {
            "type": "string"
          },
          "termsDocumentId": {
            "type": "integer"
          },
          "versionNumber": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "accept",
              "decline"
            ]
          },
          "actedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ipAddress": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          },
          "contentSha256": {
            "type": "string",
            "nullable": true,
            "description": "SHA-256 of the version text the customer answered"
          },
          "hasPdf": {
            "type": "boolean",
            "description": "The version has its official PDF, at GET /admin/terms/{termsDocumentId}/pdf"
          }
        },
        "required": [
          "id",
          "profileId",
          "profileName",
          "profileEmail",
          "termsDocumentId",
          "versionNumber",
          "action",
          "actedAt",
          "ipAddress",
          "userAgent",
          "contentSha256",
          "hasPdf"
        ]
      },
      "TermsDocumentDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "versionNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "content": {
            "type": "string",
            "description": "Editor HTML as the admin saved it"
          },
          "contentHtml": {
            "type": "string",
            "nullable": true,
            "description": "Sanitized HTML frozen at publish; null on a draft"
          },
          "hasPdf": {
            "type": "boolean",
            "description": "The official PDF exists (published versions)"
          }
        },
        "required": [
          "id",
          "title",
          "versionNumber",
          "status",
          "publishedAt",
          "createdAt",
          "updatedAt",
          "content",
          "contentHtml",
          "hasPdf"
        ]
      },
      "CreateTermsDocumentDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "content": {
            "type": "string",
            "maxLength": 1000000,
            "description": "Editor HTML"
          },
          "versionNumber": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "title",
          "content",
          "versionNumber"
        ]
      },
      "UpdateTermsDocumentDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "content": {
            "type": "string",
            "maxLength": 1000000,
            "description": "Editor HTML"
          },
          "versionNumber": {
            "type": "string",
            "maxLength": 64
          }
        }
      },
      "TermsLatestSummaryDto": {
        "type": "object",
        "properties": {
          "versionNumber": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "versionNumber",
          "title",
          "publishedAt"
        ]
      },
      "TermsCustomerStateDto": {
        "type": "object",
        "properties": {
          "mandatory": {
            "type": "boolean",
            "description": "The tenant requires customers to accept"
          },
          "acceptanceRequired": {
            "type": "boolean",
            "description": "Every other route refuses until the customer accepts"
          },
          "lastAction": {
            "type": "string",
            "enum": [
              "accept",
              "decline"
            ],
            "nullable": true,
            "description": "The customer's newest answer to the version in force"
          },
          "latest": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TermsLatestSummaryDto"
              }
            ]
          }
        },
        "required": [
          "mandatory",
          "acceptanceRequired",
          "lastAction",
          "latest"
        ]
      },
      "TermsLatestDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "versionNumber": {
            "type": "string"
          },
          "contentHtml": {
            "type": "string",
            "description": "Sanitized HTML of the version in force"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "title",
          "versionNumber",
          "contentHtml",
          "publishedAt"
        ]
      },
      "TermsAcceptedDetailsDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "versionNumber": {
            "type": "string"
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ipAddress": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          },
          "contentSha256": {
            "type": "string",
            "nullable": true
          },
          "fileId": {
            "type": "integer",
            "nullable": true,
            "description": "The customer's profile file holding the PDF they accepted; null when not filed"
          }
        },
        "required": [
          "title",
          "versionNumber",
          "acceptedAt",
          "ipAddress",
          "userAgent",
          "contentSha256",
          "fileId"
        ]
      },
      "TermsAnswerDto": {
        "type": "object",
        "properties": {
          "versionNumber": {
            "type": "string",
            "description": "The version the customer was shown"
          }
        },
        "required": [
          "versionNumber"
        ]
      },
      "TermsAnswerResultDto": {
        "type": "object",
        "properties": {
          "versionNumber": {
            "type": "string"
          },
          "actedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "versionNumber",
          "actedAt"
        ]
      },
      "PermissionActionDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "transfers.execute"
          },
          "description": {
            "type": "string",
            "example": "Initiate/Execute User Transfers"
          },
          "requiresFreshCheck": {
            "type": "boolean",
            "description": "Granting or checking this action bypasses the permission cache"
          },
          "category": {
            "type": "string",
            "nullable": true,
            "example": "Transfers",
            "description": "Category heading top-level actions group under"
          },
          "group": {
            "type": "string",
            "nullable": true,
            "example": "Transfer Requests",
            "description": "Block heading inside the category; null renders outside any block"
          },
          "apiOnly": {
            "type": "boolean",
            "description": "No admin screen uses this action; it is only reachable through the API"
          },
          "displayPriority": {
            "type": "number",
            "example": 1000,
            "description": "Ordering within a level; a higher priority renders first"
          },
          "dependsOn": {
            "type": "string",
            "nullable": true,
            "example": "transfers.view",
            "description": "Key of the prerequisite action this one nests under. Revoking the prerequisite from a class also revokes this action."
          },
          "children": {
            "description": "Actions depending on this one, ordered by display priority",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionActionDto"
            }
          }
        },
        "required": [
          "key",
          "description",
          "requiresFreshCheck",
          "category",
          "group",
          "apiOnly",
          "displayPriority",
          "dependsOn",
          "children"
        ]
      },
      "NotificationPreferenceDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "funds.credited"
          },
          "enabled": {
            "type": "boolean"
          },
          "channel": {
            "type": "string",
            "enum": [
              "in_app",
              "email"
            ]
          }
        },
        "required": [
          "key",
          "enabled",
          "channel"
        ]
      },
      "NotificationPreferenceEntryDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "funds.credited"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "enabled"
        ]
      },
      "VerificationEmailDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "email"
        ]
      },
      "VerificationSessionDto": {
        "type": "object",
        "properties": {
          "attemptId": {
            "type": "integer",
            "description": "The verification attempt this session belongs to. Unchanged across a resume or a token refresh; a restart returns a new one."
          },
          "provider": {
            "type": "string",
            "description": "Verification provider running the attempt"
          },
          "level": {
            "type": "string",
            "description": "The provider's verification level for the attempt"
          },
          "token": {
            "type": "string",
            "description": "Short-lived token for the provider SDK. Opaque to EBANQ; hand it straight to the SDK and refresh it through the token endpoint when it expires."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the token stops working"
          },
          "resumed": {
            "type": "boolean",
            "description": "True when an attempt was already in progress and this session continues it, rather than starting a new one."
          }
        },
        "required": [
          "attemptId",
          "provider",
          "level",
          "token",
          "expiresAt",
          "resumed"
        ]
      },
      "VerificationTokenDto": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Short-lived token for the provider SDK"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "token",
          "expiresAt"
        ]
      },
      "VerificationHandoffRequestDto": {
        "type": "object",
        "properties": {
          "lang": {
            "type": "string",
            "description": "Language the hosted flow renders in. Defaults to English.",
            "example": "de"
          }
        }
      },
      "VerificationHandoffDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Provider-hosted flow for the same attempt, for the customer to open on another device, typically rendered as a QR code."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the link stops working"
          }
        },
        "required": [
          "url",
          "expiresAt"
        ]
      },
      "VerificationStatusDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "not_started",
              "in_progress",
              "under_review",
              "refused",
              "approved"
            ],
            "description": "Where the verification stands, in customer-facing buckets: not started, in progress (attempt open, nothing submitted), under review (submitted, awaiting a decision), refused, or approved."
          },
          "retryAllowed": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether another attempt is open. Only meaningful on a refused verification; null everywhere else."
          },
          "attemptsUsed": {
            "type": "number",
            "nullable": true,
            "description": "Starts spent in the rolling budget window. Only meaningful on a refused verification; null everywhere else."
          },
          "attemptsLimit": {
            "type": "number",
            "nullable": true,
            "description": "The tenant's start budget for that window; null outside refused."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the verification last moved; null when it never started."
          }
        },
        "required": [
          "status",
          "retryAllowed",
          "attemptsUsed",
          "attemptsLimit",
          "updatedAt"
        ]
      },
      "VerificationAttemptDto": {
        "type": "object",
        "properties": {
          "attemptId": {
            "type": "integer",
            "description": "The verification attempt"
          },
          "provider": {
            "type": "string",
            "description": "Verification provider that ran the attempt"
          },
          "level": {
            "type": "string",
            "description": "The provider's verification level for the attempt"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_review",
              "approved",
              "rejected",
              "resubmission_requested",
              "abandoned"
            ],
            "description": "The attempt’s status. Abandoned marks an attempt retired by a restart; the fresh attempt is its own entry."
          },
          "decision": {
            "type": "string",
            "nullable": true,
            "description": "The provider’s decision on the attempt (e.g. GREEN or RED), when it made one."
          },
          "rejectType": {
            "type": "string",
            "nullable": true,
            "description": "Whether a rejection is retryable (RETRY) or final (FINAL)."
          },
          "rejectLabels": {
            "description": "Provider rejection tags; empty when the attempt was not rejected.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "moderationComment": {
            "type": "string",
            "nullable": true,
            "description": "The provider’s applicant-facing comment, when present."
          },
          "clientComment": {
            "type": "string",
            "nullable": true,
            "description": "The provider’s bank-only comment, carrying the rejection reasons. Back-office only — never returned to a customer-facing client."
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt started"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt last moved"
          }
        },
        "required": [
          "attemptId",
          "provider",
          "level",
          "status",
          "decision",
          "rejectType",
          "rejectLabels",
          "moderationComment",
          "clientComment",
          "startedAt",
          "updatedAt"
        ]
      },
      "VerificationStateDto": {
        "type": "object",
        "properties": {
          "attemptId": {
            "type": "integer",
            "description": "The verification attempt the resync targeted, the profile’s newest."
          },
          "provider": {
            "type": "string",
            "description": "Verification provider running the attempt"
          },
          "level": {
            "type": "string",
            "description": "The provider's verification level for the attempt"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_review",
              "approved",
              "rejected",
              "resubmission_requested"
            ],
            "description": "The verification status after the resync, matching current provider state."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the record was resynced"
          }
        },
        "required": [
          "attemptId",
          "provider",
          "level",
          "status",
          "updatedAt"
        ]
      },
      "VerificationLinkExchangeDto": {
        "type": "object",
        "properties": {
          "linkTokenId": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the link token from the emailed URL; proves nothing without the code."
          },
          "code": {
            "type": "string",
            "description": "The code from the emailed URL."
          }
        },
        "required": [
          "linkTokenId",
          "code"
        ]
      },
      "VerificationGrantDto": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the granted verification access stops working."
          }
        },
        "required": [
          "expiresAt"
        ]
      },
      "SignupFollowUpsDto": {
        "type": "object",
        "properties": {
          "unfilledSteps": {
            "type": "array",
            "description": "Follow-up steps with a required field left empty or nothing saved on them, in form order.",
            "example": [
              "address"
            ],
            "items": {
              "type": "string",
              "enum": [
                "personal",
                "address"
              ]
            }
          }
        },
        "required": [
          "unfilledSteps"
        ]
      },
      "SignupCompletionDto": {
        "type": "object",
        "properties": {
          "step": {
            "type": "string",
            "enum": [
              "personal",
              "address"
            ],
            "description": "The follow-up step these values belong to. Only its required fields are checked, and a value for a field on another step is refused.",
            "example": "personal"
          },
          "values": {
            "type": "object",
            "description": "The step values keyed by form field key. Validated server-side against that step of the tenant-configured sign-up form; resubmitting overwrites, null or blank clears, a key left out keeps its stored value.",
            "example": {
              "date_of_birth": "1990-05-01"
            }
          }
        },
        "required": [
          "step",
          "values"
        ]
      },
      "KycLevelsRequestDto": {
        "type": "object",
        "properties": {
          "appToken": {
            "type": "string",
            "description": "Candidate app token to fetch levels with, before anything is saved. Omit both credential fields to use the stored configuration instead."
          },
          "secretKey": {
            "type": "string",
            "description": "Candidate secret key, paired with appToken."
          }
        }
      },
      "KycLevelDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The level's provider-side name"
          }
        },
        "required": [
          "name"
        ]
      },
      "KycLevelsDto": {
        "type": "object",
        "properties": {
          "levels": {
            "description": "Verification levels the provider offers",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KycLevelDto"
            }
          }
        },
        "required": [
          "levels"
        ]
      },
      "KycConfigUpdateDto": {
        "type": "object",
        "properties": {
          "appToken": {
            "type": "string",
            "description": "Sumsub app token. Omit to keep the stored one; required on the first save."
          },
          "secretKey": {
            "type": "string",
            "description": "Sumsub secret key. Omit to keep the stored one; required on the first save."
          },
          "webhookSecret": {
            "type": "string",
            "description": "Signs inbound Sumsub webhooks - a different value from secretKey, set under the webhook config in the Sumsub dashboard. Omit to keep the stored one; required on the first save."
          },
          "levelName": {
            "type": "string",
            "description": "Verification level applicants are put through. Must be one of the levels the provider reports for the supplied credentials, or the stored ones where omitted."
          }
        },
        "required": [
          "levelName"
        ]
      },
      "KycConfigDto": {
        "type": "object",
        "properties": {
          "levelName": {
            "type": "string",
            "description": "The configured verification level"
          },
          "credentialsSecretRef": {
            "type": "string",
            "description": "Opaque, versioned reference to the stored credentials. Not a secret; credentials themselves are never returned."
          }
        },
        "required": [
          "levelName",
          "credentialsSecretRef"
        ]
      },
      "BicAvailabilityDto": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether live BIC lookup is available for this tenant"
          }
        },
        "required": [
          "available"
        ]
      },
      "BicBankDto": {
        "type": "object",
        "properties": {
          "bic": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          }
        },
        "required": [
          "bic",
          "name",
          "address",
          "city",
          "country",
          "countryCode"
        ]
      },
      "BicLookupResultDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "found",
              "not_found",
              "unavailable"
            ]
          },
          "bank": {
            "description": "The bank behind the BIC, when found",
            "allOf": [
              {
                "$ref": "#/components/schemas/BicBankDto"
              }
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "CorporateApprovalFlagsRequestDto": {
        "type": "object",
        "properties": {
          "approvalFlow": {
            "type": "boolean",
            "description": "Whether the internal approval flow is enabled"
          },
          "approvalTransferTypes": {
            "type": "array",
            "description": "Transfer categories requiring internal authorization: between own accounts (tba), between users (tbu), outgoing wire/SEPA (owt), card funding (cft)",
            "items": {
              "type": "string",
              "enum": [
                "tba",
                "tbu",
                "owt",
                "cft"
              ]
            }
          },
          "approvalRequiredForAuthorized": {
            "type": "boolean",
            "description": "Require a second internal authorization even when the initiator also holds the authorize permission"
          }
        },
        "required": [
          "approvalFlow",
          "approvalTransferTypes",
          "approvalRequiredForAuthorized"
        ]
      },
      "CustomerAccountResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string"
          },
          "iban": {
            "type": "string",
            "nullable": true,
            "description": "The account's IBAN; null until issuance assigns one"
          },
          "alias": {
            "type": "string",
            "nullable": true,
            "description": "Customer-set label; null when unset"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The bank's annotation on the account, admin-written; null when unset"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "allowWithdrawals": {
            "type": "boolean",
            "description": "Whether debits may post on this account; credits are unaffected"
          },
          "allowDeposits": {
            "type": "boolean",
            "description": "Whether credits may post on this account; debits are unaffected"
          },
          "maturityDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "payoutDay": {
            "type": "number",
            "nullable": true
          },
          "payoutTargetAccountId": {
            "type": "integer",
            "example": 42,
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableAmount": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "corporateProfileId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "The company a corporate (shared) account belongs to; null on personal and internal accounts"
          },
          "corporateFlags": {
            "nullable": true,
            "description": "The corporate approval rule; null outside corporate accounts",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateApprovalFlagsRequestDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "decimalPlaces": {
            "type": "number",
            "description": "The account currency's display precision (0-18)"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The holding company's name, null on a personal account"
          },
          "accountTypeName": {
            "type": "string",
            "nullable": true,
            "description": "The account type's name on the caller's own account list, null with no type"
          }
        },
        "required": [
          "id",
          "number",
          "iban",
          "alias",
          "description",
          "status",
          "allowWithdrawals",
          "allowDeposits",
          "maturityDate",
          "payoutDay",
          "payoutTargetAccountId",
          "currency",
          "balance",
          "availableAmount",
          "corporateProfileId",
          "corporateFlags",
          "createdAt",
          "updatedAt",
          "decimalPlaces"
        ]
      },
      "AccountTypeBalanceTotalsDto": {
        "type": "object",
        "properties": {
          "accountTypeId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "Null for accounts that carry no product type"
          },
          "accountTypeName": {
            "type": "string",
            "nullable": true,
            "description": "Product-type label"
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "accountCount": {
            "type": "number"
          },
          "totalBalance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          }
        },
        "required": [
          "accountTypeId",
          "accountTypeName",
          "currency",
          "accountCount",
          "totalBalance"
        ]
      },
      "CurrencyBalanceTotalsDto": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "totalBalance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "pendingTransactionCount": {
            "type": "number",
            "description": "Pending ledger lines on the caller's accounts. A transfer's debit and its fee are lines of their own, and its credit counts when it lands on one of those accounts. The hidden exchange-margin line moves the future balance but is not counted. A transfer awaiting approval is not pending yet."
          },
          "futureBalance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued. The total balance once every pending transfer has landed"
          }
        },
        "required": [
          "currency",
          "totalBalance",
          "pendingTransactionCount",
          "futureBalance"
        ]
      },
      "BalanceSummaryPaginationDto": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "example": 1
          },
          "pageSize": {
            "type": "number",
            "example": 25
          },
          "total": {
            "type": "number",
            "description": "Account-type rows across every page"
          }
        },
        "required": [
          "page",
          "pageSize",
          "total"
        ]
      },
      "BalanceSummaryResponseDto": {
        "type": "object",
        "properties": {
          "byAccountType": {
            "description": "One page of account-type rows",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountTypeBalanceTotalsDto"
            }
          },
          "byCurrency": {
            "description": "Every currency total, on every page",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyBalanceTotalsDto"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/BalanceSummaryPaginationDto"
          }
        },
        "required": [
          "byAccountType",
          "byCurrency",
          "pagination"
        ]
      },
      "AccountResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string"
          },
          "iban": {
            "type": "string",
            "nullable": true,
            "description": "The account's IBAN; null until issuance assigns one"
          },
          "alias": {
            "type": "string",
            "nullable": true,
            "description": "Customer-set label; null when unset"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The bank's annotation on the account, admin-written; null when unset"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "allowWithdrawals": {
            "type": "boolean",
            "description": "Whether debits may post on this account; credits are unaffected"
          },
          "allowDeposits": {
            "type": "boolean",
            "description": "Whether credits may post on this account; debits are unaffected"
          },
          "maturityDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "payoutDay": {
            "type": "number",
            "nullable": true
          },
          "payoutTargetAccountId": {
            "type": "integer",
            "example": 42,
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableAmount": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "corporateProfileId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "The company a corporate (shared) account belongs to; null on personal and internal accounts"
          },
          "corporateFlags": {
            "nullable": true,
            "description": "The corporate approval rule; null outside corporate accounts",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateApprovalFlagsRequestDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "number",
          "iban",
          "alias",
          "description",
          "status",
          "allowWithdrawals",
          "allowDeposits",
          "maturityDate",
          "payoutDay",
          "payoutTargetAccountId",
          "currency",
          "balance",
          "availableAmount",
          "corporateProfileId",
          "corporateFlags",
          "createdAt",
          "updatedAt"
        ]
      },
      "BeneficiaryBankResponseDto": {
        "type": "object",
        "properties": {
          "swiftBic": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "countryIso2": {
            "type": "string"
          },
          "abaRtn": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "swiftBic",
          "bankName",
          "address",
          "location",
          "countryIso2",
          "abaRtn",
          "iban"
        ]
      },
      "BeneficiaryCustomerResponseDto": {
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string"
          },
          "stateProvRegion": {
            "type": "string"
          },
          "countryIso2": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          }
        },
        "required": [
          "accountName",
          "addressLine1",
          "addressLine2",
          "city",
          "stateProvRegion",
          "countryIso2",
          "iban"
        ]
      },
      "IntermediaryBankResponseDto": {
        "type": "object",
        "properties": {
          "swiftBic": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "countryIso2": {
            "type": "string"
          },
          "abaRtn": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string"
          }
        },
        "required": [
          "swiftBic",
          "bankName",
          "address",
          "location",
          "countryIso2",
          "abaRtn",
          "iban"
        ]
      },
      "FundingInstructionResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "beneficiaryBank": {
            "$ref": "#/components/schemas/BeneficiaryBankResponseDto"
          },
          "beneficiaryCustomer": {
            "$ref": "#/components/schemas/BeneficiaryCustomerResponseDto"
          },
          "intermediaryBank": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/IntermediaryBankResponseDto"
              }
            ]
          },
          "additionalInstructions": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "currency",
          "isEnabled",
          "beneficiaryBank",
          "beneficiaryCustomer",
          "intermediaryBank",
          "additionalInstructions",
          "createdAt",
          "updatedAt"
        ]
      },
      "CustomerFundingInstructionsResponseDto": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "The account's own number, quoted as the payment reference"
          },
          "instructions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FundingInstructionResponseDto"
            }
          }
        },
        "required": [
          "reference",
          "instructions"
        ]
      },
      "UpdateAccountRequestDto": {
        "type": "object",
        "properties": {
          "alias": {
            "type": "string",
            "nullable": true,
            "maxLength": 256,
            "description": "Free-text account label; null clears it"
          }
        },
        "required": [
          "alias"
        ]
      },
      "AdminAccountTypeInterestDto": {
        "type": "object",
        "properties": {
          "paysDepositInterest": {
            "type": "boolean"
          },
          "depositPayoutPeriod": {
            "type": "string",
            "enum": [
              "daily",
              "monthly",
              "quarterly",
              "bi_annually",
              "annually",
              "at_maturity"
            ],
            "nullable": true
          }
        },
        "required": [
          "paysDepositInterest",
          "depositPayoutPeriod"
        ]
      },
      "AdminAccountListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string"
          },
          "iban": {
            "type": "string",
            "nullable": true,
            "description": "The account's IBAN; null until issuance assigns one"
          },
          "alias": {
            "type": "string",
            "nullable": true,
            "description": "Customer-set label; null when unset"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The bank's annotation on the account, admin-written; null when unset"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "allowWithdrawals": {
            "type": "boolean",
            "description": "Whether debits may post on this account; credits are unaffected"
          },
          "allowDeposits": {
            "type": "boolean",
            "description": "Whether credits may post on this account; debits are unaffected"
          },
          "maturityDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "payoutDay": {
            "type": "number",
            "nullable": true
          },
          "payoutTargetAccountId": {
            "type": "integer",
            "example": 42,
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableAmount": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "corporateProfileId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "The company a corporate (shared) account belongs to; null on personal and internal accounts"
          },
          "corporateFlags": {
            "nullable": true,
            "description": "The corporate approval rule; null outside corporate accounts",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateApprovalFlagsRequestDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "externalReference": {
            "type": "string",
            "nullable": true,
            "description": "The account's id in an external/back-office system, admin-written; null when unset"
          },
          "kind": {
            "type": "string",
            "enum": [
              "customer",
              "revenue",
              "fee",
              "suspense",
              "clearing",
              "system",
              "card"
            ]
          },
          "owner": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/AdminAccountOwnerDto"
              }
            ]
          },
          "accountTypeName": {
            "type": "string",
            "nullable": true,
            "description": "The linked account type's name; null when the account has no type"
          },
          "accountTypeInterest": {
            "nullable": true,
            "description": "Whether the linked account type pays deposit interest, and its payout period; null when the account has no type",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/AdminAccountTypeInterestDto"
              }
            ]
          },
          "corporate": {
            "type": "boolean",
            "nullable": true,
            "description": "The linked account type's corporate flag; null when the account has no type"
          },
          "corporateName": {
            "type": "string",
            "nullable": true,
            "description": "The linked corporate profile's registered name; null on personal and internal accounts"
          },
          "corporateBlocked": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the owning corporate profile is blocked; null on personal and internal accounts"
          },
          "principalUsername": {
            "type": "string",
            "nullable": true,
            "description": "A company account's principal contact username: the account's own principal contact, else the company's. Null on personal and internal accounts, and on a company account with no principal contact"
          }
        },
        "required": [
          "id",
          "number",
          "iban",
          "alias",
          "description",
          "status",
          "allowWithdrawals",
          "allowDeposits",
          "maturityDate",
          "payoutDay",
          "payoutTargetAccountId",
          "currency",
          "balance",
          "availableAmount",
          "corporateProfileId",
          "corporateFlags",
          "createdAt",
          "updatedAt",
          "externalReference",
          "kind",
          "owner",
          "accountTypeName",
          "accountTypeInterest",
          "corporate",
          "corporateName",
          "corporateBlocked",
          "principalUsername"
        ]
      },
      "AccountOwnerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "email",
          "username"
        ]
      },
      "OpenAccountUserRequestDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42,
            "description": "Active member of the owning company"
          },
          "roleId": {
            "type": "integer",
            "example": 42,
            "description": "Corporate role the member holds on this account"
          }
        },
        "required": [
          "profileId",
          "roleId"
        ]
      },
      "OpenAccountRequestDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42,
            "description": "Profile the account is opened for; one of profileId and corporateProfileId. When both are sent, corporateProfileId wins and profileId is ignored"
          },
          "corporateProfileId": {
            "type": "integer",
            "example": 42,
            "description": "Company the corporate (shared) account is opened for; needs the corporate module and accounts.corporate.modify"
          },
          "corporateFlags": {
            "description": "Approval-flow settings stored on the corporate account at open",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateApprovalFlagsRequestDto"
              }
            ]
          },
          "users": {
            "maxItems": 100,
            "description": "Users placed on the corporate account at open, stored with it atomically; the corporate branch requires at least one, the personal branch refuses the field. Row refusals come back as accounts.corporate_users.* errors with meta {index, profileId}",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenAccountUserRequestDto"
            }
          },
          "accountTypeId": {
            "type": "integer",
            "example": 42,
            "description": "Account type to open against"
          },
          "currency": {
            "type": "string",
            "description": "Currency code; must be the account type's own currency"
          },
          "number": {
            "type": "string",
            "maxLength": 128,
            "description": "Account number, required when the type does not auto-generate; otherwise the previewed number, generated when absent"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 255,
            "description": "The bank's own annotation on the account"
          },
          "externalReference": {
            "type": "string",
            "nullable": true,
            "maxLength": 36,
            "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
            "description": "The account's id in an external/back-office system; alphanumeric groups joined by single hyphens (e.g. CORE-77), max 36 chars"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "description": "Status the account opens in"
          },
          "allowWithdrawals": {
            "type": "boolean",
            "default": false
          },
          "allowDeposits": {
            "type": "boolean",
            "default": false
          },
          "initialBalance": {
            "type": "string",
            "description": "Amount to open the account with, negative to open it overdrawn; posts as a balanced pair and needs accounts.create_with_balance"
          },
          "maturityDate": {
            "type": "string",
            "format": "date",
            "example": "2027-01-31"
          },
          "payoutDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31
          },
          "payoutTargetAccountId": {
            "type": "integer",
            "example": 42
          }
        },
        "required": [
          "accountTypeId",
          "currency",
          "status"
        ]
      },
      "AdminAccountResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string"
          },
          "iban": {
            "type": "string",
            "nullable": true,
            "description": "The account's IBAN; null until issuance assigns one"
          },
          "alias": {
            "type": "string",
            "nullable": true,
            "description": "Customer-set label; null when unset"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The bank's annotation on the account, admin-written; null when unset"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "allowWithdrawals": {
            "type": "boolean",
            "description": "Whether debits may post on this account; credits are unaffected"
          },
          "allowDeposits": {
            "type": "boolean",
            "description": "Whether credits may post on this account; debits are unaffected"
          },
          "maturityDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "payoutDay": {
            "type": "number",
            "nullable": true
          },
          "payoutTargetAccountId": {
            "type": "integer",
            "example": 42,
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableAmount": {
            "type": "string",
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "corporateProfileId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "The company a corporate (shared) account belongs to; null on personal and internal accounts"
          },
          "corporateFlags": {
            "nullable": true,
            "description": "The corporate approval rule; null outside corporate accounts",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateApprovalFlagsRequestDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "externalReference": {
            "type": "string",
            "nullable": true,
            "description": "The account's id in an external/back-office system, admin-written; null when unset"
          }
        },
        "required": [
          "id",
          "number",
          "iban",
          "alias",
          "description",
          "status",
          "allowWithdrawals",
          "allowDeposits",
          "maturityDate",
          "payoutDay",
          "payoutTargetAccountId",
          "currency",
          "balance",
          "availableAmount",
          "corporateProfileId",
          "corporateFlags",
          "createdAt",
          "updatedAt",
          "externalReference"
        ]
      },
      "GenerateAccountNumberRequestDto": {
        "type": "object",
        "properties": {
          "accountTypeId": {
            "type": "integer",
            "example": 42,
            "description": "Account type whose prefix shapes the number"
          }
        },
        "required": [
          "accountTypeId"
        ]
      },
      "GeneratedAccountNumberDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          }
        },
        "required": [
          "number"
        ]
      },
      "AdminUpdateAccountRequestDto": {
        "type": "object",
        "properties": {
          "alias": {
            "type": "string",
            "nullable": true,
            "maxLength": 256,
            "description": "The customer's own account label; null clears it"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 255,
            "description": "The bank's own annotation on the account; null clears it"
          },
          "externalReference": {
            "type": "string",
            "nullable": true,
            "maxLength": 36,
            "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
            "description": "The account's id in an external/back-office system; alphanumeric groups joined by single hyphens (e.g. CORE-77), max 36 chars; null clears it"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "description": "Restrict the account (`inactive` stops movement both ways) or lift that (`active`)"
          },
          "allowWithdrawals": {
            "type": "boolean",
            "description": "Whether debits may post on this account; credits are unaffected"
          },
          "allowDeposits": {
            "type": "boolean",
            "description": "Whether credits may post on this account; debits are unaffected"
          },
          "corporateFlags": {
            "description": "Replace the corporate approval rule; corporate accounts only, needs accounts.corporate.modify",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateApprovalFlagsRequestDto"
              }
            ]
          },
          "maturityDate": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "example": "2027-01-31",
            "description": "Deposit maturity as YYYY-MM-DD, after today; null clears it unless the type pays at maturity"
          },
          "payoutDay": {
            "type": "number",
            "minimum": 1,
            "maximum": 31,
            "nullable": true,
            "description": "Day of the month interest pays out; null clears it"
          },
          "payoutTargetAccountId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "Account that receives the interest: same owner, same currency, allows deposits; null clears it"
          }
        }
      },
      "CompanyMailingAddressDto": {
        "type": "object",
        "properties": {
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "stateProvRegion": {
            "type": "string",
            "nullable": true
          },
          "countryIso2": {
            "type": "string",
            "nullable": true,
            "example": "NL"
          },
          "zipPostalCode": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "addressLine1",
          "addressLine2",
          "city",
          "stateProvRegion",
          "countryIso2",
          "zipPostalCode"
        ]
      },
      "CompanyReportHeaderDto": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string"
          },
          "principalContactUsername": {
            "type": "string",
            "nullable": true,
            "description": "The principal contact's login identity (their email address); null when the company is between principal contacts"
          },
          "principalContactFullName": {
            "type": "string",
            "nullable": true
          },
          "mailingAddress": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyMailingAddressDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the corporate profile was created"
          }
        },
        "required": [
          "companyName",
          "principalContactUsername",
          "principalContactFullName",
          "mailingAddress",
          "createdAt"
        ]
      },
      "TransferReportSummaryDto": {
        "type": "object",
        "properties": {
          "dateFrom": {
            "type": "string",
            "description": "The requested lower bound, echoed verbatim"
          },
          "dateTo": {
            "type": "string",
            "description": "The requested upper bound, echoed verbatim"
          },
          "currency": {
            "type": "string",
            "description": "The currency the report was run for, which is what makes the total addable"
          },
          "total": {
            "type": "string",
            "description": "The period's signed outgoing total as a DECIMAL(36,18) string: the sum of the rows the report lists, negative for an outgoing report, over the whole filtered period rather than the visible page"
          }
        },
        "required": [
          "dateFrom",
          "dateTo",
          "currency",
          "total"
        ]
      },
      "RevenueReportSummaryDto": {
        "type": "object",
        "properties": {
          "dateFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The period the totals cover. Echoes date[from] when given; otherwise the earliest transaction in the filtered set. Null only when that set is empty."
          },
          "dateTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "totalDebit": {
            "type": "string",
            "description": "Sum of the debit lines as a positive magnitude — revenue paid back out"
          },
          "totalCredit": {
            "type": "string",
            "description": "Sum of the credit lines as a positive magnitude — revenue earned"
          }
        },
        "required": [
          "dateFrom",
          "dateTo",
          "currency",
          "totalDebit",
          "totalCredit"
        ]
      },
      "SystemOverviewRevenueDto": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number",
            "description": "Number of revenue credits counted"
          },
          "amount": {
            "type": "string",
            "description": "Revenue earned up to the as-of instant, before anything drawn back out"
          }
        },
        "required": [
          "count",
          "amount"
        ]
      },
      "SystemOverviewCurrencyPositionDto": {
        "type": "object",
        "properties": {
          "totalBalance": {
            "type": "string",
            "description": "Settled customer balance"
          },
          "pendingTransactionCount": {
            "type": "number",
            "description": "Pending ledger lines on customer accounts as of the instant. A transfer pending then contributes its debit, its fee and its exchange margin as lines of their own, and its credit when that lands on a customer account. A transfer awaiting approval is not pending yet."
          },
          "pendingTransactionAmount": {
            "type": "string",
            "description": "The signed sum of those lines: debits negative, credits positive, each in the currency of the account it lands on"
          },
          "futureBalance": {
            "type": "string",
            "description": "totalBalance + pendingTransactionAmount, once everything in flight settles"
          }
        },
        "required": [
          "totalBalance",
          "pendingTransactionCount",
          "pendingTransactionAmount",
          "futureBalance"
        ]
      },
      "ReportPersonPickerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "username"
        ]
      },
      "ReportCompanyPickerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "registeredName": {
            "type": "string"
          },
          "principalContactUsername": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "registeredName",
          "principalContactUsername"
        ]
      },
      "TransactionReportRowDto": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "integer",
            "description": "The transaction's own id"
          },
          "transferId": {
            "type": "integer",
            "description": "The transfer this transaction belongs to"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "When its transfer executed (the transfer's status-change time)"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The owner's login identity: the profile's stored username (per-tenant unique, distinct from the email). Null on an account with no personal owner."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's registered name; null on a personal or internal account"
          },
          "profileType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "Null on the bank's own internal accounts, which have no owner"
          },
          "accountNumber": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "nullable": true,
            "description": "The account type's product name; null when the account carries no type"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Signed DECIMAL(36,18) string (debit negative). When the transaction carries a display amount, that is the one shown."
          }
        },
        "required": [
          "transactionId",
          "transferId",
          "date",
          "username",
          "fullName",
          "companyName",
          "profileType",
          "accountNumber",
          "accountType",
          "description",
          "currency",
          "amount"
        ]
      },
      "BalanceReportRowDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer",
            "description": "The account's own id"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The owner's login identity: the profile's stored username (per-tenant unique, distinct from the email). On a company account, the principal contact."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's registered name; null on a personal account"
          },
          "profileType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "Whether a person or a company owns the account. Always set: the report lists customer accounts only"
          },
          "accountCreatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the account was opened"
          },
          "accountNumber": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "nullable": true,
            "description": "The account type's product name; null when the account carries no type"
          },
          "accountKind": {
            "type": "string",
            "enum": [
              "customer",
              "card"
            ],
            "description": "A customer account or a card wallet. The report lists no other kind"
          },
          "currency": {
            "type": "string"
          },
          "availableBalance": {
            "type": "string",
            "description": "Spendable balance as a DECIMAL(36,18) string"
          },
          "currentBalance": {
            "type": "string",
            "description": "Posted balance, holds included, as a DECIMAL(36,18) string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          }
        },
        "required": [
          "accountId",
          "username",
          "fullName",
          "companyName",
          "profileType",
          "accountCreatedAt",
          "accountNumber",
          "accountType",
          "accountKind",
          "currency",
          "availableBalance",
          "currentBalance",
          "status"
        ]
      },
      "MaturityReportRowDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer",
            "description": "The account's own id"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The owner's login identity: the profile's stored username (per-tenant unique, distinct from the email). On a company account, the principal contact."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's registered name; null on a personal account"
          },
          "profileType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "Whether a person or a company owns the account. Always set: the report lists customer accounts only"
          },
          "accountCreatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the account was opened"
          },
          "accountNumber": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "nullable": true,
            "description": "The account type's product name; null when the account carries no type"
          },
          "accountKind": {
            "type": "string",
            "enum": [
              "customer",
              "card"
            ],
            "description": "A customer account or a card wallet. The report lists no other kind"
          },
          "currency": {
            "type": "string"
          },
          "availableBalance": {
            "type": "string",
            "description": "Spendable balance as a DECIMAL(36,18) string"
          },
          "currentBalance": {
            "type": "string",
            "description": "Posted balance, holds included, as a DECIMAL(36,18) string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "maturityDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The deposit's maturity timestamp; only dated customer accounts are listed"
          }
        },
        "required": [
          "accountId",
          "username",
          "fullName",
          "companyName",
          "profileType",
          "accountCreatedAt",
          "accountNumber",
          "accountType",
          "accountKind",
          "currency",
          "availableBalance",
          "currentBalance",
          "status",
          "maturityDate"
        ]
      },
      "TransferReportRowDto": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "integer",
            "description": "The transaction's own id"
          },
          "transferId": {
            "type": "integer",
            "description": "The transfer this transaction belongs to"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "When the transfer executed (statusChangedAt)"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The owner's login identity: the profile's stored username (per-tenant unique, distinct from the email). Null on an account with no personal owner."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's registered name; null on a personal or internal account"
          },
          "profileType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "Null on the bank's own internal accounts, which have no owner"
          },
          "accountNumber": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "nullable": true,
            "description": "The account type's product name; null when the account carries no type"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Signed DECIMAL(36,18) string (debit negative)"
          }
        },
        "required": [
          "transactionId",
          "transferId",
          "date",
          "username",
          "fullName",
          "companyName",
          "profileType",
          "accountNumber",
          "accountType",
          "description",
          "currency",
          "amount"
        ]
      },
      "ManualTransactionReportRowDto": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "integer",
            "description": "The transaction's own id, and the row's identity"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "When its transfer executed (the transfer's status-change time)"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The owner's login identity: the profile's stored username (per-tenant unique, distinct from the email). Null on an account with no personal owner."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's registered name; null on a personal account"
          },
          "profileType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "Whether a person or a company owns the account. Always set: the report lists customer accounts only"
          },
          "accountNumber": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "nullable": true,
            "description": "The account type's product name; null when the account carries no type"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Signed DECIMAL(36,18) string (debit negative)"
          },
          "revenueDirection": {
            "type": "string",
            "nullable": true,
            "enum": [
              "from_revenue",
              "to_revenue"
            ],
            "description": "to_revenue when the manual transaction paid into a revenue account, from_revenue when it drew from one, null when it never touched revenue"
          }
        },
        "required": [
          "transactionId",
          "date",
          "username",
          "fullName",
          "companyName",
          "profileType",
          "accountNumber",
          "accountType",
          "description",
          "currency",
          "amount",
          "revenueDirection"
        ]
      },
      "InterestReportRowDto": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "integer",
            "description": "The transaction's own id, and the row's identity"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "When its transfer executed (the status-change time)"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The owner's login identity: the profile's stored username (per-tenant unique, distinct from the email). On a company account, its acting member or principal contact."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's registered name; null on a personal or internal account"
          },
          "profileType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "personal",
              "corporate"
            ],
            "description": "The owner's kind; null for the bank's own internal accounts"
          },
          "accountNumber": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "nullable": true,
            "description": "The account type's product name; null when the account carries no type"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Signed DECIMAL(36,18) string (debit negative)"
          }
        },
        "required": [
          "transactionId",
          "date",
          "username",
          "fullName",
          "companyName",
          "profileType",
          "accountNumber",
          "accountType",
          "currency",
          "amount"
        ]
      },
      "RevenueReportRowDto": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "integer",
            "description": "The revenue transaction's own id"
          },
          "transferId": {
            "type": "integer",
            "description": "The transfer this transaction belongs to"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "When the transfer executed (statusChangedAt)"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "The customer owner; for a company, the initiating customer or principal contact. Without a customer counterpart, the requesting admin."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's registered name; null on a personal counterpart"
          },
          "profileType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "personal",
              "corporate"
            ]
          },
          "accountNumber": {
            "type": "string",
            "nullable": true,
            "description": "The customer account this revenue came from, not the bank's revenue account. Null when there is no customer counterpart, such as an adjustment between two internal accounts."
          },
          "accountType": {
            "type": "string",
            "nullable": true,
            "description": "The counterpart account type's product name"
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "description": "The request type name, such as Outgoing Wire Transfer"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The revenue line's description, with the charging fee rule name on fee lines"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Signed DECIMAL(36,18) string (debit negative)"
          },
          "origin": {
            "type": "string",
            "enum": [
              "system",
              "manual"
            ],
            "description": "system — revenue the platform booked by itself, such as rail fees; manual — revenue a person booked, such as an admin adjustment"
          }
        },
        "required": [
          "transactionId",
          "transferId",
          "date",
          "username",
          "fullName",
          "companyName",
          "profileType",
          "accountNumber",
          "accountType",
          "subject",
          "description",
          "currency",
          "amount",
          "origin"
        ]
      },
      "SystemOverviewProfilesDto": {
        "type": "object",
        "properties": {
          "pendingRegistrations": {
            "type": "number",
            "description": "Registration requests made by the instant and neither approved nor cancelled by then"
          },
          "pending": {
            "type": "number"
          },
          "active": {
            "type": "number"
          },
          "inactive": {
            "type": "number"
          },
          "blocked": {
            "type": "number",
            "description": "Profiles under an active block. Orthogonal to status — a blocked profile keeps whichever status it had — so this deliberately overlaps the counts above. Cancelled applicants count while blocked."
          }
        },
        "required": [
          "pendingRegistrations",
          "pending",
          "active",
          "inactive",
          "blocked"
        ]
      },
      "SystemOverviewDepositDto": {
        "type": "object",
        "properties": {
          "accountTypeId": {
            "type": "integer"
          },
          "accountTypeName": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "accountCount": {
            "type": "number",
            "description": "Accounts of this type opened by the as-of instant"
          },
          "totalDeposits": {
            "type": "string",
            "description": "Their combined balance, at this row's currency precision"
          }
        },
        "required": [
          "accountTypeId",
          "accountTypeName",
          "currency",
          "accountCount",
          "totalDeposits"
        ]
      },
      "SystemOverviewReportDto": {
        "type": "object",
        "properties": {
          "asOf": {
            "type": "string",
            "format": "date-time",
            "description": "The instant every figure is taken as of"
          },
          "currencies": {
            "description": "The report's currency axis in display order — every currency an account is denominated in plus every currency an account type is configured for. The keyed blocks below use these codes; render a column per entry, since a currency whose figures are all zero is configured-but-idle rather than absent.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "$ref": "#/components/schemas/SystemOverviewProfilesDto"
          },
          "deposits": {
            "description": "Ordered by name",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SystemOverviewDepositDto"
            }
          },
          "generatedRevenues": {
            "description": "Keyed by currency code",
            "additionalProperties": {
              "$ref": "#/components/schemas/SystemOverviewRevenueDto"
            },
            "allOf": [
              {
                "$ref": "#/components/schemas/SystemOverviewRevenueDto"
              }
            ]
          },
          "revenueAccountBalances": {
            "type": "string",
            "description": "Keyed by currency code; the formatted revenue-account balance",
            "additionalProperties": {
              "type": "string"
            }
          },
          "currencyOverview": {
            "description": "Keyed by currency code",
            "additionalProperties": {
              "$ref": "#/components/schemas/SystemOverviewCurrencyPositionDto"
            },
            "allOf": [
              {
                "$ref": "#/components/schemas/SystemOverviewCurrencyPositionDto"
              }
            ]
          }
        },
        "required": [
          "asOf",
          "currencies",
          "profiles",
          "deposits",
          "generatedRevenues",
          "revenueAccountBalances",
          "currencyOverview"
        ]
      },
      "ReportJobRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "description": {
            "type": "string",
            "description": "What the job exports"
          },
          "type": {
            "type": "string",
            "enum": [
              "csv_export",
              "pdf_export"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Updated at page boundaries while the job runs"
          },
          "failureReason": {
            "type": "string",
            "nullable": true,
            "description": "Set only on a failed job"
          },
          "dateRangeFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Lower bound of the exported date range, when the criteria carried one"
          },
          "dateRangeTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the job reached a terminal state"
          },
          "fileId": {
            "type": "integer",
            "nullable": true,
            "description": "Set once the job completed; the download route resolves it"
          }
        },
        "required": [
          "id",
          "description",
          "type",
          "status",
          "progress",
          "failureReason",
          "dateRangeFrom",
          "dateRangeTo",
          "createdAt",
          "finishedAt",
          "fileId"
        ]
      },
      "AccessLogReportRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The access log entry's own id"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "When the sign-in happened"
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "Who signed in, as their login identity: the profile's stored username. Null when the profile is gone."
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "ip": {
            "type": "string",
            "description": "Full-fidelity address string, IPv6 included"
          },
          "userAgent": {
            "type": "string",
            "nullable": true,
            "description": "Null when the client sent no User-Agent header"
          }
        },
        "required": [
          "id",
          "date",
          "username",
          "fullName",
          "ip",
          "userAgent"
        ]
      },
      "ScheduledTransactionReportRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The scheduled charge's own id"
          },
          "reason": {
            "type": "string",
            "enum": [
              "maintenance_fee",
              "limit_balance_fee",
              "interest_generation",
              "credit_line_fee"
            ],
            "description": "The task the charge runs"
          },
          "accountNumber": {
            "type": "string",
            "description": "The account the charge is queued against"
          },
          "currency": {
            "type": "string",
            "description": "Currency code the charge is denominated in"
          },
          "decimalPlaces": {
            "type": "integer",
            "description": "The currency's display precision, 2 when the catalogue omits the currency"
          },
          "amount": {
            "type": "string",
            "description": "Negative for a fee, positive for an interest payout. A pending interest or credit line charge carries its accruals so far"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "executed"
            ]
          },
          "scheduledDate": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "description": "Daily charges use their queued instant; longer periods use the UTC due day"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the charge was queued"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The last accrual, settlement or queueing that changed the charge"
          }
        },
        "required": [
          "id",
          "reason",
          "accountNumber",
          "currency",
          "decimalPlaces",
          "amount",
          "status",
          "scheduledDate",
          "createdAt",
          "updatedAt"
        ]
      },
      "ReportExportPreviewDto": {
        "type": "object",
        "properties": {
          "rowCount": {
            "type": "number",
            "minimum": 0,
            "description": "How many rows the export of these criteria holds. The same count the export route reads to decide between streaming the file and queueing a report job."
          }
        },
        "required": [
          "rowCount"
        ]
      },
      "BeneficiaryBankDto": {
        "type": "object",
        "properties": {
          "swiftBic": {
            "type": "string",
            "example": "DEUTDEFF"
          },
          "bankName": {
            "type": "string",
            "maxLength": 64
          },
          "address": {
            "type": "string",
            "maxLength": 255
          },
          "location": {
            "type": "string",
            "maxLength": 64
          },
          "countryIso2": {
            "type": "string",
            "example": "DE"
          },
          "abaRtn": {
            "type": "string",
            "nullable": true,
            "example": "026009593"
          },
          "iban": {
            "type": "string",
            "nullable": true,
            "maxLength": 64
          }
        },
        "required": [
          "swiftBic",
          "bankName",
          "address",
          "location",
          "countryIso2"
        ]
      },
      "BeneficiaryCustomerDto": {
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 100
          },
          "stateProvRegion": {
            "type": "string",
            "maxLength": 255
          },
          "countryIso2": {
            "type": "string",
            "example": "MT"
          },
          "iban": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "accountName",
          "addressLine1",
          "city",
          "stateProvRegion",
          "countryIso2",
          "iban"
        ]
      },
      "IntermediaryBankDto": {
        "type": "object",
        "properties": {
          "swiftBic": {
            "type": "string",
            "example": "DEUTDEFF"
          },
          "bankName": {
            "type": "string",
            "maxLength": 64
          },
          "address": {
            "type": "string",
            "maxLength": 255
          },
          "location": {
            "type": "string",
            "maxLength": 64
          },
          "countryIso2": {
            "type": "string",
            "example": "DE"
          },
          "abaRtn": {
            "type": "string",
            "nullable": true,
            "example": "026009593"
          },
          "iban": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "swiftBic",
          "bankName",
          "address",
          "location",
          "countryIso2",
          "iban"
        ]
      },
      "CreateFundingInstructionDto": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "isEnabled": {
            "type": "boolean",
            "default": true
          },
          "beneficiaryBank": {
            "$ref": "#/components/schemas/BeneficiaryBankDto"
          },
          "beneficiaryCustomer": {
            "$ref": "#/components/schemas/BeneficiaryCustomerDto"
          },
          "intermediaryBank": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/IntermediaryBankDto"
              }
            ]
          },
          "additionalInstructions": {
            "type": "string",
            "nullable": true,
            "maxLength": 550
          }
        },
        "required": [
          "currency",
          "beneficiaryBank",
          "beneficiaryCustomer"
        ]
      },
      "UpdateFundingInstructionDto": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "isEnabled": {
            "type": "boolean",
            "default": true
          },
          "beneficiaryBank": {
            "$ref": "#/components/schemas/BeneficiaryBankDto"
          },
          "beneficiaryCustomer": {
            "$ref": "#/components/schemas/BeneficiaryCustomerDto"
          },
          "intermediaryBank": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/IntermediaryBankDto"
              }
            ]
          },
          "additionalInstructions": {
            "type": "string",
            "nullable": true,
            "maxLength": 550
          }
        }
      },
      "CorporateAccountMemberDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`"
          },
          "username": {
            "type": "string",
            "description": "Login identifier (the profile email)"
          },
          "roleId": {
            "type": "integer",
            "example": 42
          },
          "roleName": {
            "type": "string"
          },
          "isPrincipal": {
            "type": "boolean",
            "description": "Whether the member is the company's principal contact"
          }
        },
        "required": [
          "profileId",
          "roleId",
          "roleName",
          "isPrincipal"
        ]
      },
      "AssignCorporateAccountMemberDto": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "integer",
            "example": 42,
            "description": "A role from the corporate role catalog"
          }
        },
        "required": [
          "roleId"
        ]
      },
      "TransactionListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "accountId": {
            "type": "integer"
          },
          "amount": {
            "type": "string",
            "description": "Signed, debit negative. Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "status": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currentBalanceSnapshot": {
            "type": "string",
            "nullable": true,
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableBalanceSnapshot": {
            "type": "string",
            "nullable": true,
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          }
        },
        "required": [
          "id",
          "accountId",
          "amount",
          "status",
          "description",
          "createdAt",
          "currentBalanceSnapshot",
          "availableBalanceSnapshot"
        ]
      },
      "PendingTransactionTotalsDto": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Visible outgoing principal and fee lines"
          },
          "totalAmount": {
            "type": "string",
            "description": "Signed decimal string: the pending set's effect on the balance (outgoing negative, fees and FX margin included). Rendered at the account currency's precision, or at the full stored scale when nothing is pending or the currency is not catalogued"
          }
        },
        "required": [
          "count",
          "totalAmount"
        ]
      },
      "PendingTransactionItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The transfer id, shared by its principal and fee"
          },
          "line": {
            "type": "string",
            "enum": [
              "principal",
              "fee"
            ],
            "description": "Which line of the transfer this is; opens it at /transactions/pending/{id}/{line}"
          },
          "accountId": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "pending_approval",
              "processing"
            ]
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "string",
            "description": "Signed, debit negative. Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the pending status began"
          }
        },
        "required": [
          "id",
          "line",
          "accountId",
          "status",
          "description",
          "amount",
          "createdAt"
        ]
      },
      "TransactionAccountDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "nullable": true,
            "description": "The customer's own label"
          },
          "currency": {
            "type": "string"
          },
          "typeName": {
            "type": "string",
            "nullable": true,
            "description": "The account type's name; null when the account has no type"
          }
        },
        "required": [
          "id",
          "number",
          "alias",
          "currency",
          "typeName"
        ]
      },
      "TransactionHolderDto": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          }
        },
        "required": [
          "companyName",
          "firstName",
          "lastName"
        ]
      },
      "TransactionPartyDto": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/TransactionAccountDto"
          },
          "profile": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionHolderDto"
              }
            ]
          }
        },
        "required": [
          "account",
          "profile"
        ]
      },
      "TransferBeneficiarySnapshotDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "swiftBic": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "bankName": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "stateProvRegion": {
            "type": "string",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "nullable": true,
            "description": "The payee's own account number, distinct from the IBAN"
          },
          "sortCode": {
            "type": "string",
            "nullable": true
          },
          "abaRtn": {
            "type": "string",
            "nullable": true
          },
          "bankAccountType": {
            "type": "string",
            "nullable": true,
            "description": "ACH only: checking or savings"
          },
          "bankAddress": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's address"
          },
          "bankLocation": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's location"
          },
          "bankCountryIso2": {
            "type": "string",
            "nullable": true,
            "description": "The beneficiary bank's ISO2 country"
          },
          "intermediaryBankName": {
            "type": "string",
            "nullable": true
          },
          "intermediaryBankSwiftBic": {
            "type": "string",
            "nullable": true
          },
          "intermediaryBankAddress": {
            "type": "string",
            "nullable": true
          },
          "intermediaryBankLocation": {
            "type": "string",
            "nullable": true
          },
          "intermediaryBankCountryIso2": {
            "type": "string",
            "nullable": true
          },
          "intermediaryBankAbaRtn": {
            "type": "string",
            "nullable": true
          },
          "intermediaryBankAccIban": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "TransactionDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "accountId": {
            "type": "integer"
          },
          "amount": {
            "type": "string",
            "description": "Signed, debit negative. Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "status": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currentBalanceSnapshot": {
            "type": "string",
            "nullable": true,
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableBalanceSnapshot": {
            "type": "string",
            "nullable": true,
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "direction": {
            "type": "string",
            "enum": [
              "debit",
              "credit"
            ]
          },
          "account": {
            "$ref": "#/components/schemas/TransactionAccountDto"
          },
          "holder": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionHolderDto"
              }
            ]
          },
          "sender": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPartyDto"
              }
            ]
          },
          "recipient": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPartyDto"
              }
            ]
          },
          "scheme": {
            "type": "string"
          },
          "beneficiary": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferBeneficiarySnapshotDto"
              }
            ]
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "requestId": {
            "type": "integer",
            "nullable": true,
            "description": "The transfer id, shown as Request ID. Null when the transfer was never a request the customer could see: an adjustment, a system charge, or a TBA/TBU that executed at submit."
          }
        },
        "required": [
          "id",
          "accountId",
          "amount",
          "status",
          "description",
          "createdAt",
          "currentBalanceSnapshot",
          "availableBalanceSnapshot",
          "direction",
          "account",
          "holder",
          "sender",
          "recipient",
          "scheme",
          "beneficiary",
          "reference",
          "requestId"
        ]
      },
      "TransferDocumentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "filename": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "description": "Upload time (ISO-8601)"
          }
        },
        "required": [
          "id",
          "filename",
          "category",
          "contentType",
          "sizeBytes",
          "createdAt"
        ]
      },
      "StatementHeaderDto": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "ownerUsername": {
            "type": "string",
            "nullable": true
          },
          "ownerCompanyName": {
            "type": "string",
            "nullable": true
          },
          "profileType": {
            "type": "string",
            "enum": [
              "personal",
              "corporate"
            ],
            "nullable": true
          },
          "ownerMailingAddress": {
            "type": "string",
            "nullable": true
          },
          "ownerPhysicalAddress": {
            "type": "string",
            "nullable": true
          },
          "companyAddress": {
            "type": "string",
            "nullable": true
          },
          "ownerCreatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "companyCreatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "accountId": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "nullable": true
          },
          "typeName": {
            "type": "string",
            "nullable": true,
            "description": "Account-type product label"
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "status": {
            "type": "string"
          },
          "currentBalance": {
            "type": "string",
            "description": "Balance when the statement was generated"
          },
          "availableBalance": {
            "type": "string"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "Registered name of the owning company, null on a personal or internal account"
          },
          "ownerName": {
            "type": "string",
            "nullable": true,
            "description": "The owning company's principal contact, null on a personal or internal account or when the company has none"
          }
        },
        "required": [
          "accountId",
          "number",
          "alias",
          "typeName",
          "currency",
          "status",
          "currentBalance",
          "availableBalance"
        ]
      },
      "StatementLineDto": {
        "type": "object",
        "properties": {
          "transferId": {
            "type": "integer"
          },
          "id": {
            "type": "integer",
            "example": 42
          },
          "postedAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "string",
            "description": "Signed by direction: debit negative, credit positive"
          },
          "runningBalance": {
            "type": "string",
            "nullable": true,
            "description": "Balance after this line posted"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "postedAt",
          "description",
          "amount",
          "runningBalance",
          "status"
        ]
      },
      "StatementPaginationDto": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "example": 1
          },
          "pageSize": {
            "type": "number",
            "example": 20
          },
          "total": {
            "type": "number",
            "description": "Total lines in the period, across every page"
          }
        },
        "required": [
          "page",
          "pageSize",
          "total"
        ]
      },
      "StatementResponseDto": {
        "type": "object",
        "properties": {
          "header": {
            "$ref": "#/components/schemas/StatementHeaderDto"
          },
          "lines": {
            "description": "One page of lines",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatementLineDto"
            }
          },
          "periodFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Start of the period. Null only on the admin statement read with no `from`"
          },
          "periodToExclusive": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Exclusive upper bound of the period. Null only on the admin statement read with no `to`"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "pagination": {
            "$ref": "#/components/schemas/StatementPaginationDto"
          }
        },
        "required": [
          "header",
          "lines",
          "periodFrom",
          "periodToExclusive",
          "generatedAt",
          "pagination"
        ]
      },
      "RateResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "baseCode": {
            "type": "string"
          },
          "quoteCode": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "marginPercent": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "seed",
              "manual",
              "feed"
            ]
          },
          "feedHint": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "baseCode",
          "quoteCode",
          "value",
          "marginPercent",
          "source",
          "feedHint",
          "createdAt",
          "updatedAt"
        ]
      },
      "RateFeedSettingsResponseDto": {
        "type": "object",
        "properties": {
          "autoUpdate": {
            "type": "boolean"
          }
        },
        "required": [
          "autoUpdate"
        ]
      },
      "RateFeedSettingsDto": {
        "type": "object",
        "properties": {
          "autoUpdate": {
            "type": "boolean",
            "description": "Whether the daily ECB feed refreshes the ECB-hinted pairs. Turning it on runs the feed straight away; only an EUR-main tenant can turn it on."
          }
        },
        "required": [
          "autoUpdate"
        ]
      },
      "PairRateResponseDto": {
        "type": "object",
        "properties": {
          "baseCode": {
            "type": "string"
          },
          "referenceCode": {
            "type": "string"
          },
          "rate": {
            "type": "string",
            "description": "Directional rate as a DECIMAL string, unadjusted by the margin"
          },
          "marginPercent": {
            "type": "string",
            "description": "The pair's exchange margin as a two-decimal percent; '0.00' on a same-currency pair"
          }
        },
        "required": [
          "baseCode",
          "referenceCode",
          "rate",
          "marginPercent"
        ]
      },
      "FeedProviderResponseDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Registry key, also the stored feed-reference value"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "fiat",
              "crypto"
            ]
          },
          "fiatCurrencies": {
            "description": "Main currencies this provider can serve",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "title",
          "kind",
          "fiatCurrencies"
        ]
      },
      "CryptoFeedSettingsResponseDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "provider": {
            "type": "string",
            "nullable": true,
            "description": "The configured crypto provider; null while the feed is off"
          },
          "lastUpdatedAt": {
            "type": "string",
            "nullable": true,
            "description": "The latest feed write over the crypto pairs; null before the first one"
          }
        },
        "required": [
          "enabled",
          "provider",
          "lastUpdatedAt"
        ]
      },
      "CryptoFeedSettingsDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the crypto feed streams live prices onto the crypto pairs. Turning it on prices them straight away; the provider must serve the tenant main currency."
          },
          "provider": {
            "type": "string",
            "maxLength": 64,
            "description": "A registered crypto feed-provider name. Omitted = keep the stored provider"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "UpsertRateDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "example": "1.0842",
            "description": "Required for manual prices; omit for active feed pairs"
          },
          "marginPercent": {
            "type": "string",
            "example": "0.5",
            "description": "0–999.99, two decimals"
          },
          "feedHint": {
            "type": "string",
            "nullable": true,
            "maxLength": 64,
            "description": "Which feed supplies this pair. Omitted = preserved, null = cleared. Clearing it on an EUR→fiat pair the ECB publishes is refused (accounts.rate.feed_hint_required)"
          }
        },
        "required": [
          "marginPercent"
        ]
      },
      "RateBulkUpsertItemDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "example": "1.0842",
            "description": "Required for manual prices; omit for active feed pairs"
          },
          "marginPercent": {
            "type": "string",
            "example": "0.5",
            "description": "0–999.99, two decimals"
          },
          "feedHint": {
            "type": "string",
            "nullable": true,
            "maxLength": 64,
            "description": "Which feed supplies this pair. Omitted = preserved, null = cleared. Clearing it on an EUR→fiat pair the ECB publishes is refused (accounts.rate.feed_hint_required)"
          },
          "quoteCode": {
            "type": "string",
            "description": "Quote currency code (the base is the main)"
          }
        },
        "required": [
          "marginPercent",
          "quoteCode"
        ]
      },
      "BulkUpsertRatesDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateBulkUpsertItemDto"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminTransactionListItemDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer"
          },
          "amount": {
            "type": "string",
            "description": "Signed, debit negative. Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "status": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currentBalanceSnapshot": {
            "type": "string",
            "nullable": true,
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "availableBalanceSnapshot": {
            "type": "string",
            "nullable": true,
            "description": "Decimal string at the currency's catalogued precision, or at the full stored scale when the currency is not catalogued"
          },
          "id": {
            "type": "integer",
            "nullable": true,
            "description": "Transaction id; null for a transfer that has not posted"
          },
          "transferId": {
            "type": "integer"
          }
        },
        "required": [
          "accountId",
          "amount",
          "status",
          "description",
          "createdAt",
          "currentBalanceSnapshot",
          "availableBalanceSnapshot",
          "id",
          "transferId"
        ]
      },
      "TransferRequestListItemViewDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "status": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "description": "Transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA"
          },
          "baseCurrency": {
            "type": "string",
            "description": "Currency code of the debit side"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string, always positive"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "initiatedByName": {
            "type": "string",
            "nullable": true,
            "description": "Full name of whose money moves: the debit account owner, else the on-behalf subject, else the initiator."
          },
          "reference": {
            "type": "string",
            "nullable": true,
            "description": "The requester's subject line; null when the scheme carries none"
          },
          "batchId": {
            "type": "string",
            "nullable": true,
            "description": "Batch import this request came from; null when it was raised by hand"
          },
          "executable": {
            "type": "boolean",
            "description": "True when the transfer can be released (executed) under its scheme"
          },
          "externalReferenceId": {
            "type": "string",
            "nullable": true,
            "description": "Client-supplied external reference from submit; null when none was given"
          },
          "canApprove": {
            "type": "boolean",
            "description": "True when the caller may approve/execute the transfer (needs transfers.approve)"
          },
          "canCancel": {
            "type": "boolean",
            "description": "True when the caller may cancel/reject the transfer (needs transfers.cancel)"
          }
        },
        "required": [
          "id",
          "status",
          "scheme",
          "baseCurrency",
          "amount",
          "createdAt",
          "initiatedByName",
          "reference",
          "batchId",
          "executable",
          "externalReferenceId",
          "canApprove",
          "canCancel"
        ]
      },
      "TransferPartyDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string",
            "description": "Display name; absent when the party's profile no longer resolves"
          },
          "username": {
            "type": "string",
            "description": "Login identifier (profile email); absent when the party's profile no longer resolves"
          }
        },
        "required": [
          "profileId"
        ]
      },
      "TransferInitiatorDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "user",
              "admin",
              "system"
            ]
          },
          "profile": {
            "nullable": true,
            "description": "Null for system rows",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          }
        },
        "required": [
          "type",
          "profile"
        ]
      },
      "TransferRequestDetailViewDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "scheme": {
            "type": "string",
            "description": "Transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA | DINT | CLINT | MFEE | MBFEE"
          },
          "status": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string, always positive"
          },
          "baseCurrency": {
            "type": "string",
            "description": "Currency code of the debit side"
          },
          "inputAmount": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "rate": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "destinationCurrency": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The requester's free-text note, captured at submit"
          },
          "beneficiary": {
            "nullable": true,
            "description": "The payee details as they were at submit; null on internal transfers",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferBeneficiarySnapshotDto"
              }
            ]
          },
          "debitAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Account number the transfer debits; null when that account no longer resolves"
          },
          "creditAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Internal credit account number; null when absent or unresolved"
          },
          "creditCardNumber": {
            "type": "string",
            "nullable": true,
            "description": "Number of the card a CFT credits; null on every other scheme"
          },
          "recipient": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "sender": {
            "nullable": true,
            "description": "Whose money moves: the debit account owner, else the on-behalf subject, else the initiator",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "hasSupportingDocuments": {
            "type": "boolean",
            "description": "Whether any file is attached to this transfer"
          },
          "resolvedFee": {
            "type": "string",
            "nullable": true,
            "description": "Fee locked at execute; null until resolved — distinct from a fee of 0"
          },
          "initiator": {
            "$ref": "#/components/schemas/TransferInitiatorDto"
          },
          "approver": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "releaser": {
            "nullable": true,
            "description": "Administrator who released (executed) the transfer; null if never released",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancelledBy": {
            "nullable": true,
            "description": "Actor who cancelled or rejected the transfer; null otherwise",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancellationReason": {
            "type": "string",
            "nullable": true
          },
          "externalReferenceId": {
            "type": "string",
            "nullable": true,
            "description": "Client-supplied external reference from submit; null when none was given"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "statusChangedAt": {
            "type": "string",
            "format": "date-time"
          },
          "executable": {
            "type": "boolean",
            "description": "True when the transfer can be released (executed) under its scheme"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The debit account's company, else the sender's own company when they are corporate; null when neither"
          },
          "isCompanyAccount": {
            "type": "boolean",
            "description": "Whether the debit account belongs to a company"
          },
          "canSetExternalReference": {
            "type": "boolean",
            "description": "True when the caller may set or change the external reference (needs transfers.approve)"
          },
          "canApprove": {
            "type": "boolean",
            "description": "True when the caller may approve/execute the transfer (needs transfers.approve)"
          },
          "canCancel": {
            "type": "boolean",
            "description": "True when the caller may cancel/reject the transfer (needs transfers.cancel)"
          },
          "canMarkProcessing": {
            "type": "boolean",
            "description": "True when the caller may mark this pending transfer as processing: needs transfers.process, the System Config switch on, and a rail that would not hand it to a payment provider"
          },
          "isHeldByProvider": {
            "type": "boolean",
            "description": "True when a payment provider holds this processing transfer, so it cannot be executed here and is cancelled only before the payout is approved"
          }
        },
        "required": [
          "id",
          "scheme",
          "status",
          "amount",
          "baseCurrency",
          "inputAmount",
          "rate",
          "destinationCurrency",
          "reference",
          "description",
          "beneficiary",
          "debitAccountNumber",
          "creditAccountNumber",
          "creditCardNumber",
          "recipient",
          "sender",
          "hasSupportingDocuments",
          "resolvedFee",
          "initiator",
          "approver",
          "releaser",
          "cancelledBy",
          "cancellationReason",
          "externalReferenceId",
          "createdAt",
          "statusChangedAt",
          "executable",
          "companyName",
          "isCompanyAccount",
          "canSetExternalReference",
          "canApprove",
          "canCancel",
          "canMarkProcessing",
          "isHeldByProvider"
        ]
      },
      "TransferTransactionLegDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true,
            "example": 42,
            "description": "Null on a planned line, which has no ledger row yet"
          },
          "accountId": {
            "type": "integer",
            "example": 42,
            "description": "Account the line moves money on"
          },
          "purpose": {
            "type": "string",
            "description": "What the line is for, e.g. tba_principal_debit or tba_fee_debit"
          },
          "direction": {
            "type": "string",
            "enum": [
              "debit",
              "credit"
            ]
          },
          "currency": {
            "type": "string",
            "description": "Currency code"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string; negative for a debit"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The transfer reference; a fee line reads \"Fee: <reference>\", or \"Fee\" when there is none"
          },
          "status": {
            "type": "string",
            "description": "The transfer's status. Lines have no status of their own"
          },
          "isPlanned": {
            "type": "boolean",
            "description": "True for a line a pending transfer will post at execution, not yet posted"
          }
        },
        "required": [
          "id",
          "accountId",
          "purpose",
          "direction",
          "currency",
          "amount",
          "createdAt",
          "description",
          "status",
          "isPlanned"
        ]
      },
      "ClearjunctionSettingsDto": {
        "type": "object",
        "properties": {
          "credentialsSet": {
            "type": "boolean",
            "description": "Whether an API key and password are stored. Never their value."
          },
          "apiKeyLastFour": {
            "type": "string",
            "nullable": true,
            "description": "The last 4 characters of the stored API key. Null when none is stored or it is under 12 characters."
          },
          "credentialsSavedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the stored credentials were saved. Null when unknown or none is stored."
          },
          "walletUuid": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether EBANQ ops has turned ClearJunction on for this bank. Off: the keys are only stored, no rail settles through ClearJunction and no currency converts there. Storing credentials never turns it on."
          },
          "fxMinAmount": {
            "type": "string",
            "nullable": true
          },
          "fxMaxAmount": {
            "type": "string",
            "nullable": true
          },
          "fxAccountMarker": {
            "type": "string",
            "nullable": true,
            "description": "Text both account numbers must contain to convert at ClearJunction."
          },
          "ibanAccountTypeIdEur": {
            "type": "number",
            "nullable": true,
            "description": "Account type an allocated EUR IBAN account opens under."
          },
          "ibanAccountTypeIdGbp": {
            "type": "number",
            "nullable": true,
            "description": "Account type an allocated GBP IBAN account opens under."
          },
          "useDefaultDocumentExpiry": {
            "type": "boolean",
            "description": "Whether IBAN allocation sends a fixed ID document expiry date (2029-12-31)."
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The bank company name printed under an allocated IBAN in the customer message."
          },
          "companyAddress": {
            "type": "string",
            "nullable": true,
            "description": "The bank company address."
          },
          "companyNumber": {
            "type": "string",
            "nullable": true,
            "description": "The bank company number."
          },
          "railBindings": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "clearjunction"
              ],
              "nullable": true
            },
            "description": "Which provider serves each bindable rail. Null means the rail is unbound.",
            "example": {
              "SEPA_CT": "clearjunction",
              "SEPA_INST": null,
              "FPS": null,
              "CHAPS": null
            }
          }
        },
        "required": [
          "credentialsSet",
          "apiKeyLastFour",
          "credentialsSavedAt",
          "walletUuid",
          "enabled",
          "fxMinAmount",
          "fxMaxAmount",
          "fxAccountMarker",
          "ibanAccountTypeIdEur",
          "ibanAccountTypeIdGbp",
          "useDefaultDocumentExpiry",
          "companyName",
          "companyAddress",
          "companyNumber",
          "railBindings"
        ]
      },
      "ClearjunctionCredentialsDto": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "description": "Write-only. Empty or absent keeps the stored key."
          },
          "apiPassword": {
            "type": "string",
            "description": "Write-only. Empty or absent keeps the stored password."
          },
          "walletUuid": {
            "type": "string",
            "description": "ClearJunction's identifier for the bank's wallet."
          }
        },
        "required": [
          "walletUuid"
        ]
      },
      "CorporateAddressDto": {
        "type": "object",
        "properties": {
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "stateProvRegion": {
            "type": "string",
            "maxLength": 255
          },
          "countryIso2": {
            "type": "string",
            "example": "NL",
            "description": "ISO 3166-1 alpha-2 country code"
          },
          "zipPostalCode": {
            "type": "string",
            "maxLength": 20
          }
        },
        "required": [
          "addressLine1",
          "city",
          "stateProvRegion",
          "countryIso2",
          "zipPostalCode"
        ]
      },
      "CorporateMemberInputDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "isPrincipal": {
            "type": "boolean",
            "default": false,
            "description": "The principal contact takes the Principal Contact role; other members hold none"
          }
        },
        "required": [
          "profileId"
        ]
      },
      "CreateCorporateProfileDto": {
        "type": "object",
        "properties": {
          "registeredName": {
            "type": "string",
            "maxLength": 255
          },
          "registrationNumber": {
            "type": "string",
            "maxLength": 255
          },
          "address": {
            "$ref": "#/components/schemas/CorporateAddressDto"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateMemberInputDto"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "externalReference": {
            "type": "string",
            "nullable": true,
            "maxLength": 60,
            "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$"
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "maxLength": 10000
          }
        },
        "required": [
          "registeredName",
          "registrationNumber",
          "address"
        ]
      },
      "CorporateMemberResponseDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "roleId": {
            "type": "integer",
            "nullable": true,
            "example": 42,
            "description": "Principal Contact for the principal, null for every other member"
          },
          "isPrincipal": {
            "type": "boolean"
          }
        },
        "required": [
          "profileId",
          "roleId",
          "isPrincipal"
        ]
      },
      "CorporateProfileResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "registeredName": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/CorporateAddressDto"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "externalReference": {
            "type": "string",
            "nullable": true
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateMemberResponseDto"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "registeredName",
          "registrationNumber",
          "address",
          "status",
          "externalReference",
          "members",
          "createdAt",
          "updatedAt"
        ]
      },
      "ValidateCorporateProfileDto": {
        "type": "object",
        "properties": {
          "registeredName": {
            "type": "string",
            "maxLength": 255
          },
          "registrationNumber": {
            "type": "string",
            "maxLength": 255
          }
        }
      },
      "CorporateProfileUniquenessDto": {
        "type": "object",
        "properties": {
          "registeredNameTaken": {
            "type": "boolean"
          },
          "registrationNumberTaken": {
            "type": "boolean"
          }
        },
        "required": [
          "registeredNameTaken",
          "registrationNumberTaken"
        ]
      },
      "CorporateProfileActorDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`"
          },
          "username": {
            "type": "string",
            "description": "Login identifier (the profile email)"
          }
        },
        "required": [
          "profileId"
        ]
      },
      "CorporateProfileListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "registeredName": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/CorporateAddressDto"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "memberCount": {
            "type": "number",
            "description": "How many profiles are assigned to this company"
          },
          "updatedBy": {
            "$ref": "#/components/schemas/CorporateProfileActorDto"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "registeredName",
          "registrationNumber",
          "address",
          "status",
          "memberCount",
          "updatedBy",
          "createdAt",
          "updatedAt"
        ]
      },
      "ImportFailureDto": {
        "type": "object",
        "properties": {
          "line": {
            "type": "number",
            "nullable": true,
            "description": "Row number in the file, header counted. Null for a record that could not be read as a row, such as one whose cell count differs from the header"
          },
          "reason": {
            "type": "string",
            "description": "Why the row was not applied"
          }
        },
        "required": [
          "line",
          "reason"
        ]
      },
      "CorporateProfileImportResultDto": {
        "type": "object",
        "properties": {
          "successCount": {
            "type": "number",
            "description": "Rows that created a corporate profile"
          },
          "failedCount": {
            "type": "number",
            "description": "Rows that were skipped or rejected"
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportFailureDto"
            }
          }
        },
        "required": [
          "successCount",
          "failedCount",
          "failures"
        ]
      },
      "CompanyDocumentLimitsDto": {
        "type": "object",
        "properties": {
          "maxFiles": {
            "type": "integer",
            "example": 5,
            "description": "Documents one company can hold"
          },
          "maxFileSizeMb": {
            "type": "integer",
            "example": 2,
            "description": "Largest document, in MB"
          }
        },
        "required": [
          "maxFiles",
          "maxFileSizeMb"
        ]
      },
      "MemberChangeDto": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "add",
              "setPrincipal",
              "remove",
              "reactivate",
              "delete"
            ],
            "description": "add = new membership; setPrincipal = atomic reassign-with-demote; remove = soft-remove (record retained); reactivate = undo a soft-remove; delete = hard-delete, only for a member who has never transacted or authorized a transfer"
          },
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "isPrincipal": {
            "type": "boolean",
            "default": false,
            "description": "add and reactivate only: designate the (re)joining member as the principal contact (demotes the current one, same reassign-with-demote as setPrincipal)"
          }
        },
        "required": [
          "action",
          "profileId"
        ]
      },
      "UpdateCorporateProfileDto": {
        "type": "object",
        "properties": {
          "registeredName": {
            "type": "string",
            "maxLength": 255
          },
          "registrationNumber": {
            "type": "string",
            "maxLength": 255
          },
          "address": {
            "$ref": "#/components/schemas/CorporateAddressDto"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "externalReference": {
            "type": "string",
            "nullable": true,
            "maxLength": 60,
            "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$"
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "maxLength": 10000
          },
          "memberChanges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberChangeDto"
            }
          }
        }
      },
      "CorporateProfileDetailResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "registeredName": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/CorporateAddressDto"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "memberCount": {
            "type": "number",
            "description": "How many profiles are assigned to this company"
          },
          "principalContact": {
            "nullable": true,
            "description": "The designated principal contact; null while the company has none",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateProfileActorDto"
              }
            ]
          },
          "updatedBy": {
            "$ref": "#/components/schemas/CorporateProfileActorDto"
          },
          "externalReference": {
            "type": "string",
            "nullable": true
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "description": "Staff-facing commentary. This admin route is the only surface that reads it."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "registeredName",
          "registrationNumber",
          "address",
          "status",
          "memberCount",
          "principalContact",
          "updatedBy",
          "externalReference",
          "internalNotes",
          "createdAt",
          "updatedAt"
        ]
      },
      "CorporateProfileMemberDto": {
        "type": "object",
        "properties": {
          "removedAt": {
            "type": "string",
            "nullable": true,
            "description": "Present when includeRemoved is requested"
          },
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`"
          },
          "username": {
            "type": "string",
            "description": "Login identifier (the profile email)"
          },
          "roleId": {
            "type": "integer",
            "nullable": true,
            "example": 42,
            "description": "Principal Contact for the principal, null for every other member"
          },
          "isPrincipal": {
            "type": "boolean"
          }
        },
        "required": [
          "profileId",
          "roleId",
          "isPrincipal"
        ]
      },
      "MemberUnassignPreviewDto": {
        "type": "object",
        "properties": {
          "profileIds": {
            "example": [
              42
            ],
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "required": [
          "profileIds"
        ]
      },
      "MemberApproverAccountDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "integer",
            "example": 42
          },
          "accountNumber": {
            "type": "string"
          },
          "approverRole": {
            "type": "string",
            "description": "What makes the member an approver there: `principal_contact`, or the first `transfers.authorize.*` atom their role on that account grants"
          }
        },
        "required": [
          "accountId",
          "accountNumber",
          "approverRole"
        ]
      },
      "MemberUnassignPreviewItemDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "example": 42
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberApproverAccountDto"
            }
          }
        },
        "required": [
          "profileId",
          "accounts"
        ]
      },
      "CompanyDocumentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Upload time"
          }
        },
        "required": [
          "id",
          "filename",
          "contentType",
          "sizeBytes",
          "createdAt"
        ]
      },
      "AttachCompanyDocumentDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "example": 42,
            "description": "Id returned by the file upload"
          }
        },
        "required": [
          "fileId"
        ]
      },
      "CorporateAffiliationRoleDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CorporateAffiliationAccountDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string",
            "description": "Customer-facing account number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "role": {
            "description": "This person's role on this account — per account, never per company",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateAffiliationRoleDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "role"
        ]
      },
      "CorporateAffiliationResponseDto": {
        "type": "object",
        "properties": {
          "isPrincipal": {
            "type": "boolean",
            "description": "Whether this person is the company Principal Contact"
          },
          "role": {
            "nullable": true,
            "description": "Principal Contact role, null for other members",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateAffiliationRoleDto"
              }
            ]
          },
          "id": {
            "type": "integer",
            "example": 42
          },
          "registeredName": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "accounts": {
            "description": "The accounts this person can reach under this company; may be empty",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateAffiliationAccountDto"
            }
          }
        },
        "required": [
          "isPrincipal",
          "role",
          "id",
          "registeredName",
          "status",
          "accounts"
        ]
      },
      "MyCorporateProfileListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "registeredName": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/CorporateAddressDto"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "roleName": {
            "type": "string",
            "nullable": true,
            "description": "The caller's own company role name. Only the principal contact has one"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "registeredName",
          "registrationNumber",
          "address",
          "status",
          "roleName",
          "createdAt",
          "updatedAt"
        ]
      },
      "MyCorporateProfileMemberDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "dormant",
              "closed",
              "cancelled"
            ],
            "description": "The member's profile status"
          },
          "roleId": {
            "type": "integer",
            "nullable": true,
            "example": 42,
            "description": "Only the principal contact has a company role"
          },
          "roleName": {
            "type": "string",
            "nullable": true,
            "description": "The member's company role name"
          },
          "isPrincipal": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "roleId",
          "roleName",
          "isPrincipal"
        ]
      },
      "MyCorporateProfileAccountDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string",
            "description": "Account number"
          }
        },
        "required": [
          "id",
          "number"
        ]
      },
      "MyCorporateProfileDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "registeredName": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/CorporateAddressDto"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyCorporateProfileMemberDto"
            }
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyCorporateProfileAccountDto"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "registeredName",
          "registrationNumber",
          "address",
          "status",
          "members",
          "accounts",
          "createdAt",
          "updatedAt"
        ]
      },
      "MyCorporateAccountTypeDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Currency code, one per type"
          }
        },
        "required": [
          "id",
          "name",
          "currency"
        ]
      },
      "MyCorporateAccountCompanyDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string",
            "description": "The registered company name"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "MyCorporateAccountRoleDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "MyCorporateAccountPrincipalDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`"
          }
        },
        "required": [
          "name"
        ]
      },
      "MyCorporateAccountResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "accountType": {
            "nullable": true,
            "description": "Null while the account carries no product type",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/MyCorporateAccountTypeDto"
              }
            ]
          },
          "company": {
            "$ref": "#/components/schemas/MyCorporateAccountCompanyDto"
          },
          "role": {
            "description": "The caller's role on this account (their assignment's role)",
            "allOf": [
              {
                "$ref": "#/components/schemas/MyCorporateAccountRoleDto"
              }
            ]
          },
          "principalContact": {
            "nullable": true,
            "description": "The company's designated principal contact; null while it has none or its profile is gone or closed",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/MyCorporateAccountPrincipalDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "number",
          "description",
          "status",
          "createdAt",
          "accountType",
          "company",
          "role",
          "principalContact"
        ]
      },
      "MyCorporateAccountApprovalFlagsDto": {
        "type": "object",
        "properties": {
          "approvalFlow": {
            "type": "boolean",
            "description": "Whether the internal approval flow is enabled"
          },
          "approvalTransferTypes": {
            "type": "array",
            "description": "Transfer categories requiring internal authorization",
            "items": {
              "type": "string",
              "enum": [
                "tba",
                "tbu",
                "owt",
                "cft"
              ]
            }
          },
          "approvalRequiredForAuthorized": {
            "type": "boolean",
            "description": "Whether a second authorization is needed when the initiator also holds the authorize permission"
          }
        },
        "required": [
          "approvalFlow",
          "approvalTransferTypes",
          "approvalRequiredForAuthorized"
        ]
      },
      "MyCorporateAccountMemberDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`; absent when the profile is closed"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "dormant",
              "closed",
              "cancelled"
            ],
            "description": "The member's profile status"
          },
          "roleName": {
            "type": "string",
            "description": "The member's role on this account"
          }
        },
        "required": [
          "status",
          "roleName"
        ]
      },
      "MyCorporateAccountInfoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string"
          },
          "accountType": {
            "nullable": true,
            "description": "Null while the account carries no product type",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/MyCorporateAccountTypeDto"
              }
            ]
          },
          "company": {
            "$ref": "#/components/schemas/MyCorporateAccountCompanyDto"
          },
          "corporateFlags": {
            "description": "Approval-flow settings; an account opened without any reads as flow off",
            "allOf": [
              {
                "$ref": "#/components/schemas/MyCorporateAccountApprovalFlagsDto"
              }
            ]
          },
          "members": {
            "description": "Everyone assigned to the account, in assignment order",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyCorporateAccountMemberDto"
            }
          }
        },
        "required": [
          "id",
          "number",
          "accountType",
          "company",
          "corporateFlags",
          "members"
        ]
      },
      "CorporateMyRoleCompanyDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "registeredName": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "registeredName"
        ]
      },
      "CorporateMyRoleAccountDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "number": {
            "type": "string",
            "description": "Customer-facing account number"
          }
        },
        "required": [
          "id",
          "number"
        ]
      },
      "CorporateMyRoleRoleDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string"
          },
          "purpose": {
            "type": "string",
            "nullable": true,
            "example": "principal_contact"
          },
          "actionKeys": {
            "description": "The grant atoms this role carries",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "purpose",
          "actionKeys"
        ]
      },
      "CorporateMyRoleResponseDto": {
        "type": "object",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/CorporateMyRoleCompanyDto"
          },
          "account": {
            "nullable": true,
            "description": "The account an account-level role applies to; null for a company-level role",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CorporateMyRoleAccountDto"
              }
            ]
          },
          "role": {
            "$ref": "#/components/schemas/CorporateMyRoleRoleDto"
          }
        },
        "required": [
          "company",
          "account",
          "role"
        ]
      },
      "CorporateUserInfoResponseDto": {
        "type": "object",
        "properties": {
          "assignedCorporateProfiles": {
            "type": "boolean",
            "description": "True when the caller has at least one active corporate membership"
          },
          "assignedCorporateAccounts": {
            "type": "boolean",
            "description": "True when the caller is assigned to at least one corporate account"
          }
        },
        "required": [
          "assignedCorporateProfiles",
          "assignedCorporateAccounts"
        ]
      },
      "ExternalImportRailAvailabilityDto": {
        "type": "object",
        "properties": {
          "rail": {
            "type": "string",
            "enum": [
              "swift",
              "sepa",
              "sepa-instant",
              "fps",
              "chaps"
            ],
            "description": "The rail segment of the import URL"
          },
          "allowed": {
            "type": "boolean",
            "description": "Whether at least one account the caller may batch-import from is allowed this rail"
          }
        },
        "required": [
          "rail",
          "allowed"
        ]
      },
      "ExternalImportAvailabilityDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the tenant has batch import switched on"
          },
          "allowed": {
            "type": "boolean",
            "description": "Whether the caller is on the allow list and in an open audience: owns an account under the retail switch, or is an active company member under the corporate switch"
          },
          "rowLimit": {
            "type": "number",
            "description": "Rows one upload may carry"
          },
          "inUse": {
            "type": "boolean",
            "description": "Whether any transfer in the tenant was created by a batch import"
          },
          "rails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalImportRailAvailabilityDto"
            }
          }
        },
        "required": [
          "enabled",
          "allowed",
          "rowLimit",
          "inUse",
          "rails"
        ]
      },
      "ExternalImportResultDto": {
        "type": "object",
        "properties": {
          "successCount": {
            "type": "number",
            "description": "Rows created as pending transfer requests"
          },
          "failedCount": {
            "type": "number",
            "description": "Rows that were skipped or rejected"
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportFailureDto"
            }
          },
          "duplicateCount": {
            "type": "number",
            "description": "Rows whose idempotency key had already been posted by an earlier upload, replayed and not re-created"
          },
          "pendingApprovalCount": {
            "type": "number",
            "description": "Subset of successCount that was parked for authoriser approval"
          },
          "batchId": {
            "type": "string",
            "description": "Shared id stamped on every transfer request this upload created"
          }
        },
        "required": [
          "successCount",
          "failedCount",
          "failures",
          "duplicateCount",
          "pendingApprovalCount",
          "batchId"
        ]
      },
      "TransferTemplateResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "description": "Rail code, as on transfers (SWIFT, SEPA_CT, TBU, …)"
          },
          "fromAccountId": {
            "type": "integer",
            "example": 42
          },
          "toAccountId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "Destination account on the internal rails; null on external rails"
          },
          "toUsername": {
            "type": "string",
            "nullable": true,
            "description": "The recipient username typed on a TBU transfer; null on other rails and legacy templates"
          },
          "toAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "The destination account number, so the platform-user lookup can be re-run"
          },
          "beneficiaryId": {
            "type": "integer",
            "example": 42,
            "nullable": true,
            "description": "The saved beneficiary on external rails; null on internal rails"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string"
          },
          "currency": {
            "type": "string"
          },
          "destinationAmount": {
            "type": "string",
            "nullable": true
          },
          "destinationCurrency": {
            "type": "string",
            "nullable": true
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "feeId": {
            "type": "integer",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "scheme",
          "fromAccountId",
          "toAccountId",
          "toUsername",
          "toAccountNumber",
          "beneficiaryId",
          "amount",
          "currency",
          "destinationAmount",
          "destinationCurrency",
          "reference",
          "description",
          "feeId",
          "createdAt"
        ]
      },
      "ApprovalChallengePendingEventDto": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "integer",
            "example": 42,
            "description": "The challenge the submit acked"
          },
          "correlationId": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "description": "The transfer scheme code (TBA, SWIFT, ...)"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The deadline the page counts down from"
          }
        },
        "required": [
          "challengeId",
          "correlationId",
          "scheme",
          "occurredAt",
          "status",
          "expiresAt"
        ]
      },
      "ApprovalChallengeTransferDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "duplicate",
              "executed",
              "aborted",
              "processing",
              "challenge_pending"
            ]
          },
          "correlationId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "correlationId"
        ]
      },
      "ApprovalChallengeApprovedEventDto": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "integer",
            "example": 42,
            "description": "The challenge the submit acked"
          },
          "correlationId": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "description": "The transfer scheme code (TBA, SWIFT, ...)"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "approved"
            ]
          },
          "transfer": {
            "description": "The transfer the replayed submission produced",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApprovalChallengeTransferDto"
              }
            ]
          }
        },
        "required": [
          "challengeId",
          "correlationId",
          "scheme",
          "occurredAt",
          "status",
          "transfer"
        ]
      },
      "ApprovalChallengeDeclinedEventDto": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "integer",
            "example": 42,
            "description": "The challenge the submit acked"
          },
          "correlationId": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "description": "The transfer scheme code (TBA, SWIFT, ...)"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "declined"
            ]
          }
        },
        "required": [
          "challengeId",
          "correlationId",
          "scheme",
          "occurredAt",
          "status"
        ]
      },
      "ApprovalChallengeFailedEventDto": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "integer",
            "example": 42,
            "description": "The challenge the submit acked"
          },
          "correlationId": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "description": "The transfer scheme code (TBA, SWIFT, ...)"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "failed"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "expired",
              "submit_refused",
              "voided"
            ],
            "description": "Expired past its deadline, or the approved submit was refused"
          }
        },
        "required": [
          "challengeId",
          "correlationId",
          "scheme",
          "occurredAt",
          "status",
          "reason"
        ]
      },
      "ApprovalChallengeDecisionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42,
            "description": "The approval challenge"
          },
          "status": {
            "type": "string",
            "enum": [
              "approved",
              "declined"
            ]
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time"
          },
          "transfer": {
            "nullable": true,
            "description": "The transfer the approved submission produced, as the submit route would have acked it. Null on a decline: no transfer is created.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApprovalChallengeTransferDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "decidedAt",
          "transfer"
        ]
      },
      "ApprovalChallengeVerifyBodyDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "481516",
            "description": "The 6-digit code sent to the customer, or one of the 16-character recovery codes issued when their phone was paired"
          }
        },
        "required": [
          "code"
        ]
      },
      "ApprovalChallengeAckDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42,
            "description": "The approval challenge"
          },
          "status": {
            "type": "string",
            "enum": [
              "challenge_pending"
            ]
          },
          "correlationId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The new deadline: the resent code is valid until here, and so is the challenge"
          },
          "method": {
            "type": "string",
            "enum": [
              "phone_approval",
              "email",
              "sms"
            ]
          },
          "recipient": {
            "type": "string",
            "nullable": true,
            "description": "Where the code went, masked; null when the phone decides"
          },
          "availableMethods": {
            "type": "array",
            "description": "Every method the customer can ask for now, this one included",
            "items": {
              "type": "string",
              "enum": [
                "phone_approval",
                "email",
                "sms"
              ]
            }
          },
          "recoveryCodeAvailable": {
            "type": "boolean",
            "description": "Whether to offer a recovery code: the tenant allows them and the customer still holds one"
          },
          "resendIntervalInSeconds": {
            "type": "number",
            "minimum": 1
          },
          "issueAt": {
            "type": "string",
            "format": "date-time"
          },
          "methodFallback": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "status",
          "correlationId",
          "expiresAt",
          "method",
          "recipient",
          "availableMethods",
          "recoveryCodeAvailable",
          "resendIntervalInSeconds",
          "issueAt",
          "methodFallback"
        ]
      },
      "ApprovalChallengeResendBodyDto": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "phone_approval",
              "email",
              "sms",
              "recovery_code"
            ],
            "description": "How to send it again; left out, it goes the way it already is. recovery_code sends nothing and gives a fresh window to answer with a recovery code"
          }
        }
      },
      "TransferRequestDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "scheme": {
            "type": "string",
            "description": "Transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA | DINT | CLINT | MFEE | MBFEE"
          },
          "status": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string, always positive"
          },
          "baseCurrency": {
            "type": "string",
            "description": "Currency code of the debit side"
          },
          "inputAmount": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "rate": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "destinationCurrency": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The requester's free-text note, captured at submit"
          },
          "beneficiary": {
            "nullable": true,
            "description": "The payee details as they were at submit; null on internal transfers",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferBeneficiarySnapshotDto"
              }
            ]
          },
          "debitAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Account number the transfer debits; null when that account no longer resolves"
          },
          "creditAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Internal credit account number; null when absent or unresolved"
          },
          "creditCardNumber": {
            "type": "string",
            "nullable": true,
            "description": "Number of the card a CFT credits; null on every other scheme"
          },
          "recipient": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "sender": {
            "nullable": true,
            "description": "Whose money moves: the debit account owner, else the on-behalf subject, else the initiator",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "hasSupportingDocuments": {
            "type": "boolean",
            "description": "Whether any file is attached to this transfer"
          },
          "resolvedFee": {
            "type": "string",
            "nullable": true,
            "description": "Fee locked at execute; null until resolved — distinct from a fee of 0"
          },
          "initiator": {
            "$ref": "#/components/schemas/TransferInitiatorDto"
          },
          "approver": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "releaser": {
            "nullable": true,
            "description": "Administrator who released (executed) the transfer; null if never released",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancelledBy": {
            "nullable": true,
            "description": "Actor who cancelled or rejected the transfer; null otherwise",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancellationReason": {
            "type": "string",
            "nullable": true
          },
          "externalReferenceId": {
            "type": "string",
            "nullable": true,
            "description": "Client-supplied external reference from submit; null when none was given"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "statusChangedAt": {
            "type": "string",
            "format": "date-time"
          },
          "executable": {
            "type": "boolean",
            "description": "True when the transfer can be released (executed) under its scheme"
          }
        },
        "required": [
          "id",
          "scheme",
          "status",
          "amount",
          "baseCurrency",
          "inputAmount",
          "rate",
          "destinationCurrency",
          "reference",
          "description",
          "beneficiary",
          "debitAccountNumber",
          "creditAccountNumber",
          "creditCardNumber",
          "recipient",
          "sender",
          "hasSupportingDocuments",
          "resolvedFee",
          "initiator",
          "approver",
          "releaser",
          "cancelledBy",
          "cancellationReason",
          "externalReferenceId",
          "createdAt",
          "statusChangedAt",
          "executable"
        ]
      },
      "CancelTransferRequestDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 128,
            "nullable": true
          }
        }
      },
      "SetTransferExternalReferenceDto": {
        "type": "object",
        "properties": {
          "externalReferenceId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
            "description": "The transfer's id in the tenant's own system; alphanumeric groups joined by single hyphens (e.g. INV-9), max 255 chars"
          }
        },
        "required": [
          "externalReferenceId"
        ]
      },
      "OverrideTransferRateDto": {
        "type": "object",
        "properties": {
          "rate": {
            "type": "string",
            "description": "Exchange rate as a positive decimal string"
          }
        },
        "required": [
          "rate"
        ]
      },
      "CustomerJobRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "report",
              "operation"
            ],
            "description": "Which queue the row came from. Decides which artifact routes serve it."
          },
          "description": {
            "type": "string",
            "description": "A short title for what the job does"
          },
          "type": {
            "type": "string",
            "enum": [
              "csv_import",
              "csv_export",
              "pdf_export"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "message": {
            "type": "string",
            "nullable": true,
            "description": "On a report export, why it failed; null unless it failed. On an operation, a summary of the result once it finishes, or the error when it fails."
          },
          "dateRangeFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateRangeTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "fileId": {
            "type": "integer",
            "nullable": true,
            "description": "Report export only"
          },
          "outputFileId": {
            "type": "integer",
            "nullable": true,
            "description": "Operation only"
          },
          "errorFileId": {
            "type": "integer",
            "nullable": true,
            "description": "Operation only"
          },
          "summary": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "nullable": true,
            "description": "Operation only: what the importer reported beyond the counts"
          },
          "action": {
            "type": "string",
            "nullable": true,
            "description": "Operation only: the action key"
          }
        },
        "required": [
          "id",
          "kind",
          "description",
          "type",
          "status",
          "progress",
          "message",
          "dateRangeFrom",
          "dateRangeTo",
          "createdAt",
          "finishedAt",
          "fileId",
          "outputFileId",
          "errorFileId",
          "summary",
          "action"
        ]
      },
      "AdminJobRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "report",
              "operation"
            ],
            "description": "Which queue the row came from. Decides which artifact routes serve it."
          },
          "description": {
            "type": "string",
            "description": "A short title for what the job does"
          },
          "type": {
            "type": "string",
            "enum": [
              "csv_import",
              "csv_export",
              "pdf_export"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "message": {
            "type": "string",
            "nullable": true,
            "description": "On a report export, why it failed; null unless it failed. On an operation, a summary of the result once it finishes, or the error when it fails."
          },
          "dateRangeFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateRangeTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "fileId": {
            "type": "integer",
            "nullable": true,
            "description": "Report export only"
          },
          "outputFileId": {
            "type": "integer",
            "nullable": true,
            "description": "Operation only"
          },
          "errorFileId": {
            "type": "integer",
            "nullable": true,
            "description": "Operation only"
          },
          "summary": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "nullable": true,
            "description": "Operation only: what the importer reported beyond the counts"
          },
          "action": {
            "type": "string",
            "nullable": true,
            "description": "Operation only: the action key"
          }
        },
        "required": [
          "id",
          "kind",
          "description",
          "type",
          "status",
          "progress",
          "message",
          "dateRangeFrom",
          "dateRangeTo",
          "createdAt",
          "finishedAt",
          "fileId",
          "outputFileId",
          "errorFileId",
          "summary",
          "action"
        ]
      },
      "CorporateRequestListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "statusChangedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "description": "Transfer scheme, e.g. SWIFT | TBA | TBU | CFT"
          },
          "baseCurrency": {
            "type": "string",
            "description": "Currency code of the debit side"
          },
          "amount": {
            "type": "string",
            "description": "Unsigned DECIMAL(36,18) string"
          },
          "beneficiaryName": {
            "type": "string",
            "nullable": true,
            "description": "Payee display name from the submit-time snapshot; null on internal rails (TBA/TBU), which store no payee"
          },
          "initiatedByName": {
            "type": "string",
            "nullable": true,
            "description": "Full name of the member who raised the request; may be null."
          },
          "ownerUsername": {
            "type": "string",
            "nullable": true,
            "description": "Username of the request owner: the customer an admin raised it for, else the initiator (always the initiator on a CFT). Null when the owner's profile is closed or gone."
          },
          "batchId": {
            "type": "string",
            "nullable": true,
            "description": "The batch import the request came from; null for a request raised by hand"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "companyName",
          "subject",
          "description",
          "statusChangedAt",
          "status",
          "scheme",
          "baseCurrency",
          "amount",
          "beneficiaryName",
          "initiatedByName",
          "ownerUsername",
          "batchId",
          "createdAt"
        ]
      },
      "CorporateRequestDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "scheme": {
            "type": "string",
            "description": "Transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA | DINT | CLINT | MFEE | MBFEE"
          },
          "status": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string, always positive"
          },
          "baseCurrency": {
            "type": "string",
            "description": "Currency code of the debit side"
          },
          "inputAmount": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "rate": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "destinationCurrency": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The requester's free-text note, captured at submit"
          },
          "beneficiary": {
            "nullable": true,
            "description": "The payee details as they were at submit; null on internal transfers",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferBeneficiarySnapshotDto"
              }
            ]
          },
          "debitAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Account number the transfer debits; null when that account no longer resolves"
          },
          "sender": {
            "nullable": true,
            "description": "Whose money moves: the debit account owner, else the on-behalf subject, else the initiator",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "hasSupportingDocuments": {
            "type": "boolean",
            "description": "Whether any file is attached to this transfer"
          },
          "resolvedFee": {
            "type": "string",
            "nullable": true,
            "description": "Fee locked at execute; null until resolved — distinct from a fee of 0"
          },
          "initiator": {
            "$ref": "#/components/schemas/TransferInitiatorDto"
          },
          "approver": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "releaser": {
            "nullable": true,
            "description": "Administrator who released (executed) the transfer; null if never released",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancelledBy": {
            "nullable": true,
            "description": "Actor who cancelled or rejected the transfer; null otherwise",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancellationReason": {
            "type": "string",
            "nullable": true
          },
          "externalReferenceId": {
            "type": "string",
            "nullable": true,
            "description": "Client-supplied external reference from submit; null when none was given"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "statusChangedAt": {
            "type": "string",
            "format": "date-time"
          },
          "executable": {
            "type": "boolean",
            "description": "True when the transfer can be released (executed) under its scheme"
          },
          "creditAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Account a TBA or TBU credits; null on a CFT, an external transfer or an unresolved account"
          },
          "creditCardNumber": {
            "type": "string",
            "nullable": true,
            "description": "Card a CFT credits, masked to its last four (****1234); null on other schemes"
          },
          "canDecide": {
            "type": "boolean",
            "description": "Whether this viewer sees the decision controls"
          },
          "owner": {
            "nullable": true,
            "description": "Request owner: the customer an admin raised it for, else the initiator (always the initiator on a CFT); null on a system row",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "scheme",
          "status",
          "amount",
          "baseCurrency",
          "inputAmount",
          "rate",
          "destinationCurrency",
          "reference",
          "description",
          "beneficiary",
          "debitAccountNumber",
          "sender",
          "hasSupportingDocuments",
          "resolvedFee",
          "initiator",
          "approver",
          "releaser",
          "cancelledBy",
          "cancellationReason",
          "externalReferenceId",
          "createdAt",
          "statusChangedAt",
          "executable",
          "creditAccountNumber",
          "creditCardNumber",
          "canDecide",
          "owner"
        ]
      },
      "CorporateRequestLineDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "number"
          },
          "purpose": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          }
        },
        "required": [
          "accountId",
          "purpose",
          "currency",
          "amount"
        ]
      },
      "CorporateRequestDocumentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "filename": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "description": "Upload time (ISO-8601)"
          }
        },
        "required": [
          "id",
          "filename",
          "category",
          "contentType",
          "sizeBytes",
          "createdAt"
        ]
      },
      "CorporateTransferRequestDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "scheme": {
            "type": "string",
            "description": "Transfer scheme: SWIFT | SEPA_CT | SEPA_INST | FPS | CHAPS | ACH | FEDWIRE | CFT | TBA | TBU | CA | DA | DRA | DINT | CLINT | MFEE | MBFEE"
          },
          "status": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string, always positive"
          },
          "baseCurrency": {
            "type": "string",
            "description": "Currency code of the debit side"
          },
          "inputAmount": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "rate": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "destinationCurrency": {
            "type": "string",
            "nullable": true,
            "description": "Set on cross-currency transfers"
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The requester's free-text note, captured at submit"
          },
          "beneficiary": {
            "nullable": true,
            "description": "The payee details as they were at submit; null on internal transfers",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferBeneficiarySnapshotDto"
              }
            ]
          },
          "debitAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Account number the transfer debits; null when that account no longer resolves"
          },
          "sender": {
            "nullable": true,
            "description": "Whose money moves: the debit account owner, else the on-behalf subject, else the initiator",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "hasSupportingDocuments": {
            "type": "boolean",
            "description": "Whether any file is attached to this transfer"
          },
          "resolvedFee": {
            "type": "string",
            "nullable": true,
            "description": "Fee locked at execute; null until resolved — distinct from a fee of 0"
          },
          "initiator": {
            "$ref": "#/components/schemas/TransferInitiatorDto"
          },
          "approver": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "releaser": {
            "nullable": true,
            "description": "Administrator who released (executed) the transfer; null if never released",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancelledBy": {
            "nullable": true,
            "description": "Actor who cancelled or rejected the transfer; null otherwise",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/TransferPartyDto"
              }
            ]
          },
          "cancellationReason": {
            "type": "string",
            "nullable": true
          },
          "externalReferenceId": {
            "type": "string",
            "nullable": true,
            "description": "Client-supplied external reference from submit; null when none was given"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "statusChangedAt": {
            "type": "string",
            "format": "date-time"
          },
          "executable": {
            "type": "boolean",
            "description": "True when the transfer can be released (executed) under its scheme"
          },
          "creditAccountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Account a TBA or TBU credits; null on a CFT, an external transfer or an unresolved account"
          },
          "creditCardNumber": {
            "type": "string",
            "nullable": true,
            "description": "Card a CFT credits, masked to its last four (****1234); null on other schemes"
          }
        },
        "required": [
          "id",
          "scheme",
          "status",
          "amount",
          "baseCurrency",
          "inputAmount",
          "rate",
          "destinationCurrency",
          "reference",
          "description",
          "beneficiary",
          "debitAccountNumber",
          "sender",
          "hasSupportingDocuments",
          "resolvedFee",
          "initiator",
          "approver",
          "releaser",
          "cancelledBy",
          "cancellationReason",
          "externalReferenceId",
          "createdAt",
          "statusChangedAt",
          "executable",
          "creditAccountNumber",
          "creditCardNumber"
        ]
      },
      "RejectCorporateRequestDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 128
          }
        }
      },
      "ApprovalChallengeListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "scheme": {
            "type": "string",
            "description": "Transfer scheme, e.g. TBA | TBU | SWIFT | CFT"
          },
          "action": {
            "type": "string",
            "description": "Transfer type the mobile app shows, as the approval push sends it, e.g. TRANSFER_BETWEEN_ACCOUNTS"
          },
          "method": {
            "type": "string",
            "enum": [
              "phone_approval",
              "email",
              "sms"
            ],
            "description": "How the challenge is answered now, the same values the submit answer uses"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "declined",
              "expired",
              "voided"
            ],
            "description": "A pending row past its deadline reads as expired"
          },
          "amount": {
            "type": "string",
            "description": "Decimal string, always positive"
          },
          "currency": {
            "type": "string",
            "description": "Currency code of the debit side"
          },
          "sourceAccountNumber": {
            "type": "string",
            "description": "Account number the transfer debits"
          },
          "destination": {
            "type": "string",
            "description": "Receiving account number on an internal rail (TBA/TBU), payee name on an external one"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Deadline for the decision; set only while the row is pending"
          }
        },
        "required": [
          "id",
          "scheme",
          "action",
          "method",
          "status",
          "amount",
          "currency",
          "sourceAccountNumber",
          "destination",
          "createdAt",
          "expiresAt"
        ]
      },
      "RecipientIdentityDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Alice Smith"
          },
          "maskedEmail": {
            "type": "string",
            "example": "a***@demo.test",
            "description": "Masked for confirmation only"
          }
        },
        "required": [
          "name",
          "maskedEmail"
        ]
      },
      "RecipientAccountDto": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "integer",
            "example": 42,
            "description": "Opaque reference the TBU preview and submit accept as the destination"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "example": "Checking"
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "maskedNumber": {
            "type": "string",
            "example": "•••• 1234"
          }
        },
        "required": [
          "reference",
          "type",
          "currency",
          "maskedNumber"
        ]
      },
      "RecipientResolveResponseDto": {
        "type": "object",
        "properties": {
          "recipient": {
            "nullable": true,
            "description": "The confirmed recipient, or null when nothing eligible matched",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RecipientIdentityDto"
              }
            ]
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecipientAccountDto"
            }
          }
        },
        "required": [
          "recipient",
          "accounts"
        ]
      },
      "RecipientResolveDto": {
        "type": "object",
        "properties": {
          "sourceAccountId": {
            "type": "integer",
            "example": 42,
            "description": "The account you are sending from: your own, or a company account you may send a TBU from."
          },
          "username": {
            "type": "string",
            "example": "alice",
            "description": "Recipient's username (a company account's Principal Contact)"
          },
          "accountNumber": {
            "type": "string",
            "description": "Exact number of the recipient's account"
          }
        },
        "required": [
          "sourceAccountId",
          "username",
          "accountNumber"
        ]
      },
      "StoredFileDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "category": {
            "type": "string",
            "enum": [
              "transfer_supporting_document",
              "company_document",
              "profile_document",
              "card_type_icon",
              "import_export_operation",
              "import_export_output",
              "report_export",
              "gdpr_consent",
              "terms"
            ]
          },
          "filename": {
            "type": "string",
            "description": "The name the file was uploaded under"
          },
          "contentType": {
            "type": "string",
            "description": "Sniffed from the bytes, not the declared header"
          },
          "sizeBytes": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "category",
          "filename",
          "contentType",
          "sizeBytes",
          "createdAt"
        ]
      },
      "FileMetadataDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "category": {
            "type": "string",
            "enum": [
              "transfer_supporting_document",
              "company_document",
              "profile_document",
              "card_type_icon",
              "import_export_operation",
              "import_export_output",
              "report_export",
              "gdpr_consent",
              "terms"
            ]
          },
          "filename": {
            "type": "string",
            "description": "The name the file was uploaded under"
          },
          "contentType": {
            "type": "string",
            "description": "Sniffed from the bytes, not the declared header"
          },
          "sizeBytes": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "uploadedByProfileId": {
            "type": "integer",
            "description": "The profile that uploaded the file"
          }
        },
        "required": [
          "id",
          "category",
          "filename",
          "contentType",
          "sizeBytes",
          "createdAt",
          "uploadedByProfileId"
        ]
      },
      "WebhookDeliveryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "moduleId": {
            "type": "integer",
            "description": "The partner module the delivery is sent to"
          },
          "moduleName": {
            "type": "string"
          },
          "requestUuid": {
            "type": "string",
            "format": "uuid",
            "description": "The id carried on the signed request, which a partner can dedupe on"
          },
          "eventKey": {
            "type": "string",
            "description": "The event that produced the delivery"
          },
          "userId": {
            "type": "string",
            "description": "The user the event concerns. Empty when none"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failed",
              "dropped"
            ]
          },
          "attemptCount": {
            "type": "integer",
            "description": "How many sends have been made"
          },
          "attemptedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the latest send ran. Null before the first send"
          },
          "responseStatus": {
            "type": "integer",
            "nullable": true,
            "description": "The partner's HTTP status code on the latest send. Null when the partner never answered or nothing has been sent"
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "The latest send's error. Null when it succeeded or nothing has been sent"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "moduleId",
          "moduleName",
          "requestUuid",
          "eventKey",
          "userId",
          "description",
          "status",
          "attemptCount",
          "attemptedAt",
          "responseStatus",
          "error",
          "createdAt",
          "updatedAt"
        ]
      },
      "WebhookDeliveryRequestBodyDto": {
        "type": "object",
        "properties": {
          "module": {
            "type": "string",
            "description": "The event that produced the delivery"
          },
          "userId": {
            "type": "string",
            "description": "The user the event concerns. Empty when none"
          },
          "requestUuid": {
            "type": "string",
            "format": "uuid",
            "description": "The id carried on the signed request, which a partner can dedupe on"
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "description": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened"
          }
        },
        "required": [
          "module",
          "userId",
          "requestUuid",
          "payload",
          "description",
          "timestamp"
        ]
      },
      "WebhookDeliveryAttemptDto": {
        "type": "object",
        "properties": {
          "attempt": {
            "type": "integer",
            "description": "Counts from 1 within the delivery"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ]
          },
          "responseStatus": {
            "type": "integer",
            "nullable": true,
            "description": "The partner HTTP status. Null when no answer came back"
          },
          "responseBody": {
            "type": "string",
            "nullable": true,
            "description": "What the partner answered, cut to a support-sized length"
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "timedOut": {
            "type": "boolean"
          },
          "attemptedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "attempt",
          "outcome",
          "responseStatus",
          "responseBody",
          "error",
          "timedOut",
          "attemptedAt"
        ]
      },
      "WebhookDeliveryDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "moduleId": {
            "type": "integer",
            "description": "The partner module the delivery is sent to"
          },
          "moduleName": {
            "type": "string"
          },
          "requestUuid": {
            "type": "string",
            "format": "uuid",
            "description": "The id carried on the signed request, which a partner can dedupe on"
          },
          "eventKey": {
            "type": "string",
            "description": "The event that produced the delivery"
          },
          "userId": {
            "type": "string",
            "description": "The user the event concerns. Empty when none"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failed",
              "dropped"
            ]
          },
          "attemptCount": {
            "type": "integer",
            "description": "How many sends have been made"
          },
          "attemptedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the latest send ran. Null before the first send"
          },
          "responseStatus": {
            "type": "integer",
            "nullable": true,
            "description": "The partner's HTTP status code on the latest send. Null when the partner never answered or nothing has been sent"
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "The latest send's error. Null when it succeeded or nothing has been sent"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "requestBody": {
            "description": "The body the partner was sent, or would be sent when nothing went out yet",
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookDeliveryRequestBodyDto"
              }
            ]
          },
          "responseBody": {
            "type": "string",
            "nullable": true,
            "description": "The latest send's partner answer. Null before the first send"
          },
          "history": {
            "description": "Every send, oldest first",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryAttemptDto"
            }
          }
        },
        "required": [
          "id",
          "moduleId",
          "moduleName",
          "requestUuid",
          "eventKey",
          "userId",
          "description",
          "status",
          "attemptCount",
          "attemptedAt",
          "responseStatus",
          "error",
          "createdAt",
          "updatedAt",
          "requestBody",
          "responseBody",
          "history"
        ]
      },
      "TenantLocaleDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "nl_NL",
            "description": "Platform locale code (not a BCP-47 tag)."
          },
          "name": {
            "type": "string",
            "example": "Nederlands",
            "description": "Bank-authored display name."
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "TenantMobileAppLinksDto": {
        "type": "object",
        "properties": {
          "ios": {
            "type": "string",
            "nullable": true,
            "example": "https://apps.apple.com/app/id1234567890",
            "description": "App Store page of the tenant's EBQ app. Null when unset."
          },
          "android": {
            "type": "string",
            "nullable": true,
            "example": "https://play.google.com/store/apps/details?id=com.example.ebq",
            "description": "Google Play page of the tenant's EBQ app. Null when unset."
          }
        },
        "required": [
          "ios",
          "android"
        ]
      },
      "LoginTextsDto": {
        "type": "object",
        "properties": {
          "tagline": {
            "type": "string",
            "description": "login.tip_1 — the small line above the headline."
          },
          "headline": {
            "type": "string",
            "description": "login.tip_2 — the headline."
          },
          "subtitle": {
            "type": "string",
            "description": "login.tip_3 — the subtitle."
          }
        },
        "required": [
          "tagline",
          "headline",
          "subtitle"
        ]
      },
      "SessionTextsDto": {
        "type": "object",
        "properties": {
          "autoLogoutNotice": {
            "type": "string",
            "nullable": true,
            "description": "session.auto_logout_notice — shown once an idle session has ended."
          },
          "autoLogoutWarning": {
            "type": "string",
            "nullable": true,
            "description": "session.auto_logout_warning — shown shortly before an idle session ends."
          }
        },
        "required": [
          "autoLogoutNotice",
          "autoLogoutWarning"
        ]
      },
      "TenantIdentityResponseDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Tenant subdomain slug."
          },
          "displayName": {
            "type": "string",
            "description": "App display name (branding override, else the slug)."
          },
          "timezone": {
            "type": "string"
          },
          "dateFormat": {
            "type": "string"
          },
          "timeFormat": {
            "type": "string"
          },
          "branding": {
            "type": "object",
            "description": "Branding overrides: logo_url, favicon_url, app_display_name."
          },
          "theme": {
            "type": "object",
            "description": "The active colour scheme as theme tokens keyed by token name, plus active_scheme_id. Empty when Default is active."
          },
          "modules": {
            "type": "object",
            "description": "Effective on/off for every tenant module."
          },
          "supportedLocales": {
            "description": "The locales a profile's preferredLanguage may take — the set the self-write validates against — each with its bank-authored display name. A picker binds to `name`; an unlabelled code falls back to the raw code.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantLocaleDto"
            }
          },
          "installedLocales": {
            "description": "Every locale installed for the tenant, published or not: what the back office can translate into and publish. A superset of `supportedLocales`.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantLocaleDto"
            }
          },
          "defaultLocale": {
            "type": "string",
            "description": "The locale to render for anyone who has not chosen one — a signed-out visitor, or a profile whose preferredLanguage is null. Always one of `supportedLocales`."
          },
          "endUserFileDeleteEnabled": {
            "type": "boolean",
            "description": "Whether an end user may remove their own profile files."
          },
          "fundingInstructionsEnabled": {
            "type": "boolean",
            "description": "Whether the customer funding-instructions action is available."
          },
          "sepaReportsEnabled": {
            "type": "boolean",
            "description": "Whether either SEPA rail is active for the outgoing SEPA report"
          },
          "smsOtpEnabled": {
            "type": "boolean",
            "description": "False only when the tenant switched SMS off; unset counts as on. The profile forms and summary show the SMS phone field only when true."
          },
          "uploadFileSizeLimitMb": {
            "type": "integer",
            "description": "The per-file upload limit the server enforces, in MB."
          },
          "maintenanceMode": {
            "type": "boolean",
            "description": "Whether the tenant is in maintenance mode. When true, the apps show the maintenance page."
          },
          "maintenanceMessage": {
            "type": "string",
            "nullable": true,
            "description": "The tenant's maintenance message, shown on the maintenance page. Null when unset."
          },
          "isPublicDemo": {
            "type": "boolean",
            "description": "Whether the tenant is a public demo. The admin app hides the administrator profiles export on a demo, which the server refuses there."
          },
          "nextDemoResetAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2026-10-19T07:00:00.000Z",
            "description": "When a public demo next has its data put back, from its reset schedule and timezone. Null for any tenant that is not a public demo, or whose schedule cannot be run."
          },
          "mobileAppLinks": {
            "description": "Where customers download the tenant's EBQ app, shown where they pair a phone.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TenantMobileAppLinksDto"
              }
            ]
          },
          "noReplyEmail": {
            "type": "string",
            "nullable": true,
            "example": "no-reply@bank.example",
            "description": "The address the bank's email comes from, named on the password recovery confirmation. Null when unset, or when the bank sends through the platform relay."
          },
          "assetBaseUrl": {
            "type": "string",
            "description": "The API base for a plain <img> or link, which sends no X-Tenant: on a host that resolves this tenant by itself.",
            "example": "https://acme.ebanq.com/v3"
          },
          "loginTexts": {
            "description": "The customer login panel's tagline, headline and subtitle, resolved for the requested locale. Empty strings where the tenant saved a blank.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LoginTextsDto"
              }
            ]
          },
          "sessionTexts": {
            "nullable": true,
            "description": "The bank's edited idle-logout texts in the requested locale, with no fallback to another locale or the shipped copy: a text the bank never edited is null. Null as a whole when the tenant's texts could not be read.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SessionTextsDto"
              }
            ]
          }
        },
        "required": [
          "slug",
          "displayName",
          "timezone",
          "dateFormat",
          "timeFormat",
          "branding",
          "theme",
          "modules",
          "supportedLocales",
          "installedLocales",
          "defaultLocale",
          "endUserFileDeleteEnabled",
          "fundingInstructionsEnabled",
          "sepaReportsEnabled",
          "smsOtpEnabled",
          "uploadFileSizeLimitMb",
          "maintenanceMode",
          "maintenanceMessage",
          "isPublicDemo",
          "nextDemoResetAt",
          "mobileAppLinks",
          "noReplyEmail",
          "assetBaseUrl",
          "loginTexts",
          "sessionTexts"
        ]
      },
      "SchemeColorsDto": {
        "type": "object",
        "properties": {
          "headerBackground": {
            "type": "string",
            "example": "#ffffff"
          },
          "headerBottomLine": {
            "type": "string",
            "example": "#0f172a14"
          },
          "headerElements": {
            "type": "string",
            "example": "#0a2540"
          },
          "menuBackground": {
            "type": "string",
            "example": "#f0f4f8"
          },
          "menuElements": {
            "type": "string",
            "example": "#425466"
          },
          "mainColor": {
            "type": "string",
            "example": "#94c817"
          },
          "loginPageMiddle": {
            "type": "string",
            "example": "#f6f9fc"
          }
        },
        "required": [
          "headerBackground",
          "headerBottomLine",
          "headerElements",
          "menuBackground",
          "menuElements",
          "mainColor",
          "loginPageMiddle"
        ]
      },
      "ColorSchemeResponseDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "typeface": {
            "type": "string",
            "enum": [
              "almarai",
              "jetbrains-mono",
              "plus-jakarta-sans",
              "public-sans",
              "manrope"
            ]
          },
          "roundness": {
            "type": "string",
            "enum": [
              "none",
              "small",
              "medium",
              "large",
              "extra-large"
            ]
          },
          "colors": {
            "$ref": "#/components/schemas/SchemeColorsDto"
          },
          "id": {
            "type": "integer",
            "nullable": true,
            "description": "Null for Default"
          },
          "locked": {
            "type": "boolean",
            "description": "Default is locked: it can be cloned and activated, not edited or deleted"
          }
        },
        "required": [
          "name",
          "typeface",
          "roundness",
          "colors",
          "id",
          "locked"
        ]
      },
      "ColorSchemeListResponseDto": {
        "type": "object",
        "properties": {
          "schemes": {
            "description": "Default first",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ColorSchemeResponseDto"
            }
          },
          "activeId": {
            "type": "integer",
            "nullable": true,
            "description": "Null when no saved scheme is active"
          },
          "isDefaultActive": {
            "type": "boolean",
            "description": "False when the theme holds tokens no scheme wrote, so Default can be set active"
          }
        },
        "required": [
          "schemes",
          "activeId",
          "isDefaultActive"
        ]
      },
      "ActivateColorSchemeDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true,
            "description": "Null activates Default"
          }
        },
        "required": [
          "id"
        ]
      },
      "ActiveColorSchemeResponseDto": {
        "type": "object",
        "properties": {
          "activeId": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "activeId"
        ]
      },
      "ColorSchemeBodyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "typeface": {
            "type": "string",
            "enum": [
              "almarai",
              "jetbrains-mono",
              "plus-jakarta-sans",
              "public-sans",
              "manrope"
            ]
          },
          "roundness": {
            "type": "string",
            "enum": [
              "none",
              "small",
              "medium",
              "large",
              "extra-large"
            ]
          },
          "colors": {
            "$ref": "#/components/schemas/SchemeColorsDto"
          }
        },
        "required": [
          "name",
          "typeface",
          "roundness",
          "colors"
        ]
      },
      "IntercomSettingsResponseDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether to boot the widget: the tenant's Intercom module and its own switch, both on."
          },
          "workspaceId": {
            "type": "string",
            "nullable": true,
            "description": "The Intercom workspace to boot against. Null when the tenant has set none."
          },
          "identityVerificationEnabled": {
            "type": "boolean",
            "description": "Whether the tenant's workspace requires Identity Verification, so the widget knows to request a user hash. The secret that computes one is never returned."
          }
        },
        "required": [
          "enabled",
          "workspaceId",
          "identityVerificationEnabled"
        ]
      },
      "IntercomIdentityHashDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "example": "17",
            "description": "The identifier that was signed. Boot the widget with exactly this as `user_id` — a hash over any other value is one Intercom rejects."
          },
          "hash": {
            "type": "string",
            "description": "HMAC-SHA256 of `userId` under the tenant's Intercom identity secret, hex-encoded. This is Intercom's `user_hash`."
          }
        },
        "required": [
          "userId",
          "hash"
        ]
      },
      "TransferFeeParameterResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "base": {
            "type": "string",
            "example": "5"
          },
          "percent": {
            "type": "string",
            "example": "0.5",
            "description": "Percent of the amount, e.g. \"0.5\" is 0.5%"
          },
          "min": {
            "type": "string",
            "nullable": true
          },
          "max": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "currency",
          "base",
          "percent",
          "min",
          "max"
        ]
      },
      "TransferFeeConfigResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "scheme": {
            "type": "string",
            "enum": [
              "SWIFT",
              "SEPA_CT",
              "SEPA_INST",
              "FPS",
              "CHAPS",
              "ACH",
              "FEDWIRE",
              "CFT",
              "TBA",
              "TBU",
              "INCOMING"
            ],
            "description": "The rail the fee applies to. INCOMING is the fee for incoming payments, not a rail you can send on."
          },
          "userGroupIds": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferFeeParameterResponseDto"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "scheme",
          "userGroupIds",
          "parameters",
          "createdAt",
          "updatedAt"
        ]
      },
      "FeeUserGroupNameResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "FeeParameterDto": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "base": {
            "type": "string",
            "example": "5"
          },
          "percent": {
            "type": "string",
            "example": "0.5",
            "description": "Percent of the amount, e.g. \"0.5\" is 0.5%"
          },
          "min": {
            "type": "string"
          },
          "max": {
            "type": "string"
          }
        },
        "required": [
          "currency",
          "base",
          "percent"
        ]
      },
      "CreateTransferFeeConfigDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "scheme": {
            "type": "string",
            "enum": [
              "SWIFT",
              "SEPA_CT",
              "SEPA_INST",
              "FPS",
              "CHAPS",
              "ACH",
              "FEDWIRE",
              "CFT",
              "TBA",
              "TBU",
              "INCOMING"
            ]
          },
          "userGroupIds": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeParameterDto"
            }
          }
        },
        "required": [
          "name",
          "scheme",
          "userGroupIds",
          "parameters"
        ]
      },
      "UpdateTransferFeeConfigDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "scheme": {
            "type": "string",
            "enum": [
              "SWIFT",
              "SEPA_CT",
              "SEPA_INST",
              "FPS",
              "CHAPS",
              "ACH",
              "FEDWIRE",
              "CFT",
              "TBA",
              "TBU",
              "INCOMING"
            ]
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeParameterDto"
            }
          },
          "userGroupIds": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "CreateCorporateRoleDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "actionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "actionKeys"
        ]
      },
      "CorporateRoleResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "purpose": {
            "type": "string",
            "nullable": true,
            "example": "principal_contact"
          },
          "protected": {
            "type": "boolean"
          },
          "immutableGrants": {
            "type": "boolean"
          },
          "actionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "protectedActionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "purpose",
          "protected",
          "immutableGrants",
          "actionKeys",
          "protectedActionKeys"
        ]
      },
      "CorporateRoleListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 42
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "purpose": {
            "type": "string",
            "nullable": true,
            "example": "principal_contact"
          },
          "protected": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "purpose",
          "protected"
        ]
      },
      "UpdateCorporateRoleDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "actionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "actionKeys"
        ]
      },
      "CorporateCategoryActionDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "accounts.view"
          },
          "label": {
            "type": "string",
            "example": "View Corporate Accounts"
          }
        },
        "required": [
          "key",
          "label"
        ]
      },
      "CorporateCategoryDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Accounts"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateCategoryActionDto"
            }
          }
        },
        "required": [
          "label",
          "actions"
        ]
      },
      "CorporateGridCellDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "tba"
          },
          "label": {
            "type": "string",
            "example": "TBA"
          },
          "actionKey": {
            "type": "string",
            "example": "transfers.authorize.tba"
          }
        },
        "required": [
          "type",
          "label",
          "actionKey"
        ]
      },
      "CorporateGridFamilyDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "authorize"
          },
          "label": {
            "type": "string",
            "example": "Authorize Transfer Requests"
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateGridCellDto"
            }
          }
        },
        "required": [
          "key",
          "label",
          "cells"
        ]
      },
      "CorporateCatalogEntryDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "description"
        ]
      },
      "CorporatePermissionActionsDto": {
        "type": "object",
        "properties": {
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateCategoryDto"
            }
          },
          "transferFamilies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateGridFamilyDto"
            }
          },
          "catalog": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorporateCatalogEntryDto"
            }
          }
        },
        "required": [
          "categories",
          "transferFamilies",
          "catalog"
        ]
      },
      "NotificationListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "eventKey": {
            "type": "string",
            "description": "The notification event this row was rendered from"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "nullable": true,
            "description": "Always null on a read-once row: its body comes only from the mark-read that opens it"
          },
          "payload": {
            "type": "object",
            "nullable": true,
            "description": "Event-specific context the client may deep-link on; null on a read-once row"
          },
          "readOnce": {
            "type": "boolean",
            "description": "Shown once: marking it read returns its body that one time, and mark-all-read skips it"
          },
          "readAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "null = unread"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "eventKey",
          "title",
          "body",
          "payload",
          "readOnce",
          "readAt",
          "createdAt"
        ]
      },
      "UnreadNotificationCountDto": {
        "type": "object",
        "properties": {
          "unread": {
            "type": "number",
            "description": "How many of the caller's notifications are unread"
          },
          "markable": {
            "type": "number",
            "description": "How many of the unread ones mark-all-read would mark: all but the read-once ones"
          }
        },
        "required": [
          "unread",
          "markable"
        ]
      },
      "NotificationReadResultDto": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "nullable": true,
            "description": "A read-once notification's body, returned only by the call that marked it read; null otherwise"
          }
        },
        "required": [
          "body"
        ]
      },
      "MessageThreadListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "subject": {
            "type": "string"
          },
          "lastMessagePreview": {
            "type": "string",
            "nullable": true,
            "description": "Opening of the newest message in the thread"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastMessageSenderProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "null = the platform"
          },
          "createdByProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "null = the platform"
          },
          "customerProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "The customer the thread belongs to (its customer participant). Null for a thread with no customer participant, e.g. a platform notice to admins."
          },
          "customerName": {
            "type": "string",
            "nullable": true,
            "description": "Display name of that customer. Null when there is none."
          },
          "kind": {
            "type": "string",
            "enum": [
              "single",
              "broadcast"
            ],
            "description": "broadcast = one thread for many customers; a customer reply to it forks a single thread"
          },
          "broadcastGroupName": {
            "type": "string",
            "nullable": true,
            "description": "A broadcast's user group name when sent. Null on a broadcast = all customers, unless isPickedAudience is set."
          },
          "isPickedAudience": {
            "type": "boolean",
            "description": "True on a broadcast an admin composed to two or more customers picked one by one. False on every other thread."
          },
          "unread": {
            "type": "boolean",
            "description": "Whether the thread is unread for the caller. A whole-thread flag, not a message count: any new message marks the thread unread again for everyone but its sender. False for a thread the caller does not participate in."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "subject",
          "lastMessagePreview",
          "lastMessageAt",
          "lastMessageSenderProfileId",
          "createdByProfileId",
          "customerProfileId",
          "customerName",
          "kind",
          "broadcastGroupName",
          "isPickedAudience",
          "unread",
          "createdAt"
        ]
      },
      "UnreadMessageThreadCountDto": {
        "type": "object",
        "properties": {
          "unread": {
            "type": "number",
            "description": "How many threads in the caller's scope are unread for them"
          }
        },
        "required": [
          "unread"
        ]
      },
      "MessageThreadCustomerDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "profileId",
          "name",
          "username",
          "email"
        ]
      },
      "ThreadMessageDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "threadId": {
            "type": "integer",
            "description": "The thread it landed in: a customer's reply to a broadcast lands in the fork"
          },
          "senderProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "null = the platform"
          },
          "senderName": {
            "type": "string",
            "nullable": true,
            "description": "The staff member's display name on a message an admin or root wrote, filled only for an admin reading the thread. Null for a customer reader, on a customer or platform message, and on a reply response."
          },
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "threadId",
          "senderProfileId",
          "senderName",
          "body",
          "createdAt"
        ]
      },
      "MessageThreadDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "subject": {
            "type": "string"
          },
          "createdByProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "null = the platform"
          },
          "customerProfileId": {
            "type": "integer",
            "nullable": true,
            "description": "Same customer identity as the list row."
          },
          "customerName": {
            "type": "string",
            "nullable": true,
            "description": "Display name of that customer. Null when there is none."
          },
          "kind": {
            "type": "string",
            "enum": [
              "single",
              "broadcast"
            ],
            "description": "broadcast = one thread for many customers; a customer reply to it forks a single thread"
          },
          "broadcastGroupName": {
            "type": "string",
            "nullable": true,
            "description": "A broadcast's user group name when sent. Null on a broadcast = all customers, unless isPickedAudience is set."
          },
          "isPickedAudience": {
            "type": "boolean",
            "description": "True on a broadcast an admin composed to two or more customers picked one by one. False on every other thread."
          },
          "customers": {
            "nullable": true,
            "description": "Every customer on the thread, for an admin reading a thread to one customer or to picked customers. Null for a customer caller and for a group or all-customers broadcast.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageThreadCustomerDto"
            }
          },
          "messages": {
            "description": "The whole conversation oldest-first, replies from both sides included",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThreadMessageDto"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "subject",
          "createdByProfileId",
          "customerProfileId",
          "customerName",
          "kind",
          "broadcastGroupName",
          "isPickedAudience",
          "customers",
          "messages",
          "createdAt"
        ]
      },
      "CreateMessageThreadDto": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 255
          },
          "body": {
            "type": "string",
            "maxLength": 65000
          }
        },
        "required": [
          "subject",
          "body"
        ]
      },
      "ReplyToMessageThreadDto": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 65000
          }
        },
        "required": [
          "body"
        ]
      },
      "ComposeMessageThreadsDto": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 255
          },
          "body": {
            "type": "string",
            "maxLength": 65000
          },
          "recipients": {
            "minItems": 1,
            "maxItems": 10000,
            "description": "Customer profile ids. One recipient gets a private thread; several share one thread without seeing each other.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "required": [
          "subject",
          "body",
          "recipients"
        ]
      },
      "BroadcastMessageThreadsDto": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 255
          },
          "body": {
            "type": "string",
            "maxLength": 65000
          },
          "userGroupId": {
            "type": "integer",
            "description": "Target one user group instead of the whole customer base. Membership is resolved when the broadcast is accepted; a group that does not exist rejects the send against this field and creates nothing."
          }
        },
        "required": [
          "subject",
          "body"
        ]
      },
      "MessageThreadBroadcastAcceptedDto": {
        "type": "object",
        "properties": {
          "recipientCount": {
            "type": "number",
            "description": "How many customers the broadcast was resolved to at accept time"
          }
        },
        "required": [
          "recipientCount"
        ]
      },
      "MessageRecipientDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "email",
          "username"
        ]
      },
      "TenantConfigResponseDto": {
        "type": "object",
        "properties": {
          "namespace": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "value": {
            "type": "object",
            "description": "The persisted effective value, with credential-shaped sub-fields redacted"
          }
        },
        "required": [
          "namespace",
          "key",
          "value"
        ]
      },
      "TenantConfigDto": {
        "type": "object",
        "properties": {
          "namespace": {
            "type": "string",
            "example": "general"
          },
          "key": {
            "type": "string",
            "example": "site_name"
          },
          "value": {
            "type": "object",
            "nullable": true,
            "description": "Value matching the key’s registered schema; null clears a key whose schema allows it"
          }
        },
        "required": [
          "namespace",
          "key",
          "value"
        ]
      },
      "WireMandatoryFieldDto": {
        "type": "object",
        "properties": {
          "requiresBic": {
            "type": "boolean",
            "example": true
          },
          "requiresRtn": {
            "type": "boolean",
            "example": false
          }
        },
        "required": [
          "requiresBic",
          "requiresRtn"
        ]
      },
      "WireMandatoryFieldResponseDto": {
        "type": "object",
        "properties": {
          "namespace": {
            "type": "string",
            "example": "transfers"
          },
          "values": {
            "type": "object",
            "description": "The persisted SWIFT mandatory-field flags"
          }
        },
        "required": [
          "namespace",
          "values"
        ]
      },
      "AdminTransferTypesDto": {
        "type": "object",
        "properties": {
          "SWIFT": {
            "type": "boolean",
            "example": true
          },
          "SEPA_CT": {
            "type": "boolean",
            "example": true
          },
          "SEPA_INST": {
            "type": "boolean",
            "example": true
          },
          "FPS": {
            "type": "boolean",
            "example": true
          },
          "CHAPS": {
            "type": "boolean",
            "example": true
          },
          "ACH": {
            "type": "boolean",
            "example": true
          },
          "FEDWIRE": {
            "type": "boolean",
            "example": true
          },
          "TBA": {
            "type": "boolean",
            "example": true
          },
          "TBU": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "ClientTransferTypesDto": {
        "type": "object",
        "properties": {
          "SWIFT": {
            "type": "boolean",
            "example": true
          },
          "SEPA_CT": {
            "type": "boolean",
            "example": true
          },
          "SEPA_INST": {
            "type": "boolean",
            "example": true
          },
          "FPS": {
            "type": "boolean",
            "example": true
          },
          "CHAPS": {
            "type": "boolean",
            "example": true
          },
          "ACH": {
            "type": "boolean",
            "example": true
          },
          "FEDWIRE": {
            "type": "boolean",
            "example": true
          },
          "TBA": {
            "type": "boolean",
            "example": true
          },
          "TBU": {
            "type": "boolean",
            "example": true
          },
          "IWT": {
            "type": "boolean",
            "example": true,
            "description": "Incoming wires"
          }
        }
      },
      "AvailableTransferTypesDto": {
        "type": "object",
        "properties": {
          "admin": {
            "description": "Bank admins’ switches",
            "allOf": [
              {
                "$ref": "#/components/schemas/AdminTransferTypesDto"
              }
            ]
          },
          "client": {
            "description": "End users’ switches",
            "allOf": [
              {
                "$ref": "#/components/schemas/ClientTransferTypesDto"
              }
            ]
          }
        },
        "required": [
          "admin",
          "client"
        ]
      },
      "AvailableTransferTypesResponseDto": {
        "type": "object",
        "properties": {
          "namespace": {
            "type": "string",
            "example": "transfers"
          },
          "values": {
            "type": "object",
            "description": "The persisted switches, by config key"
          }
        },
        "required": [
          "namespace",
          "values"
        ]
      },
      "SiteTextPhraseDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "gdpr.label"
          },
          "source": {
            "type": "string",
            "description": "Platform-default text for this key"
          },
          "override": {
            "type": "string",
            "nullable": true,
            "description": "The tenant's override for the requested locale, null when unset"
          },
          "maxLength": {
            "type": "number"
          },
          "label": {
            "type": "string",
            "description": "What to call this phrase when the key alone won't do"
          }
        },
        "required": [
          "key",
          "source",
          "override",
          "maxLength"
        ]
      },
      "SiteTextSectionDto": {
        "type": "object",
        "properties": {
          "section": {
            "type": "string",
            "example": "gdpr"
          },
          "phrases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteTextPhraseDto"
            }
          }
        },
        "required": [
          "section",
          "phrases"
        ]
      },
      "SiteTextOverrideInput": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "gdpr.label"
          },
          "value": {
            "type": "string"
          },
          "reset": {
            "type": "boolean",
            "description": "Clear the override so the platform default shows again. The value is ignored."
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "SiteTextSaveDto": {
        "type": "object",
        "properties": {
          "overrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteTextOverrideInput"
            }
          }
        },
        "required": [
          "overrides"
        ]
      },
      "ImportResultDto": {
        "type": "object",
        "properties": {
          "successCount": {
            "type": "number",
            "description": "Rows the import applied"
          },
          "failedCount": {
            "type": "number",
            "description": "Rows that were skipped or rejected"
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportFailureDto"
            }
          }
        },
        "required": [
          "successCount",
          "failedCount",
          "failures"
        ]
      },
      "NotificationTemplateDto": {
        "type": "object",
        "properties": {
          "eventKey": {
            "type": "string",
            "example": "funds.credited"
          },
          "title": {
            "type": "string",
            "example": "Incoming transaction"
          },
          "section": {
            "type": "string",
            "example": "Account alerts",
            "description": "The heading the template is grouped under"
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "isProtected": {
            "type": "boolean",
            "description": "A protected template cannot be disabled"
          },
          "isEditable": {
            "type": "boolean",
            "description": "False when only the status can change and the copy is the platform default"
          }
        },
        "required": [
          "eventKey",
          "title",
          "section",
          "subject",
          "body",
          "status",
          "isProtected",
          "isEditable"
        ]
      },
      "NotificationTemplateListDto": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string",
            "enum": [
              "en_US",
              "zh_CN",
              "de_DE",
              "es_ES",
              "fr_FR",
              "it_IT",
              "ko_KR",
              "nl_NL",
              "pt_BR",
              "ar_AR",
              "ja_JP",
              "ru_RU",
              "bn_BD"
            ],
            "example": "en_US",
            "description": "The locale the templates were read in"
          },
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationTemplateDto"
            }
          }
        },
        "required": [
          "locale",
          "templates"
        ]
      },
      "NotificationTemplateMarkerDto": {
        "type": "object",
        "properties": {
          "marker": {
            "type": "string",
            "example": "{{amount}}"
          },
          "eventKeys": {
            "example": [
              "funds.credited"
            ],
            "description": "The events whose notifications supply this marker. Empty when every template can use it.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "module": {
            "type": "string",
            "nullable": true,
            "example": "corporate",
            "description": "The tenant module every listed event belongs to. Null when the marker is common or its events span modules."
          }
        },
        "required": [
          "marker",
          "eventKeys",
          "module"
        ]
      },
      "NotificationTemplateInput": {
        "type": "object",
        "properties": {
          "eventKey": {
            "type": "string",
            "example": "funds.credited"
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          }
        },
        "required": [
          "eventKey",
          "subject",
          "body",
          "status"
        ]
      },
      "NotificationTemplateSaveDto": {
        "type": "object",
        "properties": {
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationTemplateInput"
            }
          }
        },
        "required": [
          "templates"
        ]
      },
      "SendAdminNotificationDto": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 128,
            "description": "Replaces the template subject. Omit to keep the template copy. No HTML."
          },
          "content": {
            "type": "string",
            "maxLength": 65535,
            "description": "Replaces the template body. Omit to keep the template copy. No HTML."
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "in_app"
              ]
            }
          },
          "recipientMode": {
            "type": "string",
            "enum": [
              "all",
              "profiles",
              "admin_class",
              "permission"
            ],
            "description": "Who receives it. `all` is every active administrator; the other modes name their selector in the matching field below."
          },
          "identifiers": {
            "description": "Required in `profiles` mode. Each is a profile id, an email, or a username, and each must name an active administrator.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "adminClassIds": {
            "description": "Required in `admin_class` mode. The active administrators of any of the classes.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "actionKeys": {
            "description": "Required in `permission` mode. The active administrators whose class grants any of the actions.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "channels",
          "recipientMode"
        ]
      },
      "AdminNotificationAcceptedDto": {
        "type": "object",
        "properties": {
          "recipientCount": {
            "type": "number",
            "description": "How many administrators the send resolved to"
          },
          "notificationsSent": {
            "type": "number",
            "description": "How many of those administrators the notification was accepted for. Lower than recipientCount when some could not be scheduled"
          }
        },
        "required": [
          "recipientCount",
          "notificationsSent"
        ]
      },
      "TenantModuleStateDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "cards"
          },
          "enabled": {
            "type": "boolean",
            "description": "The module state now in force for this tenant"
          },
          "source": {
            "type": "string",
            "enum": [
              "default",
              "override"
            ],
            "description": "Whether the tenant set this value itself or inherited the platform default. An override may match the default and still be an override."
          },
          "bankSwitchable": {
            "type": "boolean",
            "description": "Whether the bank switches this module itself through PUT /tenant-config. Every other module is switched by EBANQ."
          }
        },
        "required": [
          "key",
          "enabled",
          "source",
          "bankSwitchable"
        ]
      },
      "SmtpSettingsViewDto": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "port": {
            "type": "number"
          },
          "security": {
            "type": "string",
            "enum": [
              "none",
              "starttls",
              "tls"
            ]
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "passwordSet": {
            "type": "boolean",
            "description": "Whether a password is stored; its value is never returned"
          },
          "passwordSavedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the stored password was saved. null with no password, or when the store cannot tell"
          }
        },
        "required": [
          "host",
          "port",
          "security",
          "username",
          "passwordSet",
          "passwordSavedAt"
        ]
      },
      "Microsoft365ViewDto": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "description": "Whether an app registration is stored; its client secret is never returned"
          },
          "directoryId": {
            "type": "string",
            "nullable": true,
            "description": "The stored Directory (tenant) ID"
          },
          "clientId": {
            "type": "string",
            "nullable": true,
            "description": "The stored Application (client) ID"
          },
          "connected": {
            "type": "boolean",
            "description": "Whether an OAuth grant is stored; whether Microsoft still honours it comes from the status probe"
          },
          "mailbox": {
            "type": "string",
            "nullable": true,
            "description": "The authorized sending mailbox"
          }
        },
        "required": [
          "configured",
          "directoryId",
          "clientId",
          "connected",
          "mailbox"
        ]
      },
      "GmailViewDto": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "description": "Whether a service-account key is stored; the key itself is never returned"
          },
          "clientEmail": {
            "type": "string",
            "nullable": true,
            "description": "The service account the stored key belongs to"
          },
          "projectId": {
            "type": "string",
            "nullable": true,
            "description": "The Google project of the stored key file"
          },
          "keySavedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the stored key file was saved. null with no key, or when the store cannot tell"
          }
        },
        "required": [
          "configured",
          "clientEmail",
          "projectId",
          "keySavedAt"
        ]
      },
      "GmailOAuthViewDto": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "description": "Whether an OAuth client is stored; its secret is never returned"
          },
          "clientId": {
            "type": "string",
            "nullable": true,
            "description": "The stored OAuth client id"
          },
          "connected": {
            "type": "boolean",
            "description": "Whether an OAuth grant is stored; whether Google still honours it comes from the status probe"
          },
          "mailbox": {
            "type": "string",
            "nullable": true,
            "description": "The authorized sending mailbox"
          }
        },
        "required": [
          "configured",
          "clientId",
          "connected",
          "mailbox"
        ]
      },
      "EmailSettingsResponseDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether outgoing email is sent at all"
          },
          "provider": {
            "type": "string",
            "enum": [
              "smtp",
              "microsoft365",
              "gmail",
              "gmail_oauth"
            ]
          },
          "noReplyEmail": {
            "type": "string",
            "nullable": true
          },
          "fromName": {
            "type": "string",
            "nullable": true,
            "description": "The display name shown next to the from-address"
          },
          "mailSignature": {
            "type": "string",
            "nullable": true,
            "description": "Plain text appended under the body of outgoing email"
          },
          "signatureLogoUrl": {
            "type": "string",
            "nullable": true,
            "description": "The hosted image rendered above the signature text in the HTML part of outgoing email. Written by the signature-logo upload, never by the settings update."
          },
          "smtp": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SmtpSettingsViewDto"
              }
            ]
          },
          "microsoft365": {
            "$ref": "#/components/schemas/Microsoft365ViewDto"
          },
          "gmail": {
            "$ref": "#/components/schemas/GmailViewDto"
          },
          "gmailOAuth": {
            "$ref": "#/components/schemas/GmailOAuthViewDto"
          }
        },
        "required": [
          "enabled",
          "provider",
          "noReplyEmail",
          "fromName",
          "mailSignature",
          "signatureLogoUrl",
          "smtp",
          "microsoft365",
          "gmail",
          "gmailOAuth"
        ]
      },
      "SmtpSettingsDto": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "example": "smtp.example.com"
          },
          "port": {
            "type": "number",
            "example": 587,
            "minimum": 1,
            "maximum": 65535
          },
          "security": {
            "type": "string",
            "enum": [
              "none",
              "starttls",
              "tls"
            ],
            "example": "starttls"
          },
          "username": {
            "type": "string",
            "description": "Omit for an unauthenticated relay"
          },
          "password": {
            "type": "string",
            "description": "Write-only. Omit to keep the stored password for the same username."
          }
        },
        "required": [
          "host",
          "port",
          "security"
        ]
      },
      "GmailSettingsDto": {
        "type": "object",
        "properties": {
          "serviceAccount": {
            "$ref": "#/components/schemas/GoogleServiceAccountDto"
          }
        },
        "required": [
          "serviceAccount"
        ]
      },
      "GoogleOAuthClientEntryDto": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "example": "1234567890-abc.apps.googleusercontent.com"
          },
          "client_secret": {
            "type": "string",
            "description": "Write-only. The client secret from the OAuth client file; it is never returned."
          },
          "redirect_uris": {
            "example": [
              "https://admin.bank.example/oauth2/gmail/callback"
            ],
            "description": "The first entry is the redirect URI sent to Google.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "client_id",
          "client_secret"
        ]
      },
      "GoogleOAuthClientDto": {
        "type": "object",
        "properties": {
          "web": {
            "$ref": "#/components/schemas/GoogleOAuthClientEntryDto"
          },
          "installed": {
            "$ref": "#/components/schemas/GoogleOAuthClientEntryDto"
          }
        }
      },
      "GmailOAuthSettingsDto": {
        "type": "object",
        "properties": {
          "client": {
            "$ref": "#/components/schemas/GoogleOAuthClientDto"
          }
        },
        "required": [
          "client"
        ]
      },
      "Microsoft365RegistrationDto": {
        "type": "object",
        "properties": {
          "directoryId": {
            "type": "string",
            "format": "uuid",
            "description": "The Directory (tenant) ID from the Overview page of the app registration in the Microsoft Entra admin center"
          },
          "clientId": {
            "type": "string",
            "format": "uuid",
            "description": "The Application (client) ID from the Overview page of the app registration in the Microsoft Entra admin center"
          },
          "clientSecret": {
            "type": "string",
            "description": "Write-only. The Value of a client secret from Certificates & secrets on the app registration, not its Secret ID."
          }
        },
        "required": [
          "directoryId",
          "clientId",
          "clientSecret"
        ]
      },
      "UpdateEmailSettingsDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether outgoing email is sent at all. Omit to keep the stored value. Disabling discards the Gmail OAuth grant and the Microsoft 365 grant, and keeps the uploaded key, OAuth client, and Microsoft 365 app registration unless the same update carries their field. The provider stays as it is."
          },
          "provider": {
            "type": "string",
            "enum": [
              "smtp",
              "microsoft365",
              "gmail",
              "gmail_oauth"
            ],
            "example": "smtp"
          },
          "noReplyEmail": {
            "type": "string",
            "nullable": true,
            "example": "no-reply@bank.example",
            "description": "null falls back to the platform default from-address"
          },
          "fromName": {
            "type": "string",
            "nullable": true,
            "example": "Demo Bank",
            "description": "The display name shown next to the from-address. Omit to keep the stored value, null to clear it."
          },
          "mailSignature": {
            "type": "string",
            "nullable": true,
            "description": "Plain text appended under the body of outgoing email. Omit to keep the stored value, null to clear it."
          },
          "smtp": {
            "description": "Required when choosing smtp with no SMTP settings stored yet. Choosing smtp also requires a username.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SmtpSettingsDto"
              }
            ]
          },
          "gmail": {
            "description": "Uploads or replaces the Gmail service-account key. Omit to keep the stored one.",
            "allOf": [
              {
                "$ref": "#/components/schemas/GmailSettingsDto"
              }
            ]
          },
          "gmailOAuth": {
            "description": "Uploads or replaces the Google OAuth client for the OAuth mode. Omit to keep the stored one. Replacing the client discards any mailbox authorization made with the previous one.",
            "allOf": [
              {
                "$ref": "#/components/schemas/GmailOAuthSettingsDto"
              }
            ]
          },
          "microsoft365": {
            "description": "Saves or replaces the Microsoft app registration the Microsoft 365 connect flow uses. Omit to keep the stored one. Replacing it with another directory or client id discards the connected mailbox; the same ids with a new client secret keep it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Microsoft365RegistrationDto"
              }
            ]
          }
        },
        "required": [
          "provider",
          "noReplyEmail"
        ]
      },
      "GmailOAuthAuthorizationDto": {
        "type": "object",
        "properties": {
          "authorizationUrl": {
            "type": "string",
            "description": "Google's consent page for the stored client"
          }
        },
        "required": [
          "authorizationUrl"
        ]
      },
      "GmailOAuthCallbackDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The authorization code Google redirected with"
          },
          "state": {
            "type": "string",
            "description": "The state the authorize call issued"
          }
        },
        "required": [
          "code",
          "state"
        ]
      },
      "GmailOAuthRedirectUriDto": {
        "type": "object",
        "properties": {
          "redirectUri": {
            "type": "string",
            "nullable": true,
            "description": "The redirect URI to register on the OAuth client in Google Cloud; null while branding.admin_app_url is unset"
          }
        },
        "required": [
          "redirectUri"
        ]
      },
      "GmailOAuthStatusDto": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Whether Google still honours the stored grant. False without a connected mailbox, or once Google no longer honours the grant."
          }
        },
        "required": [
          "valid"
        ]
      },
      "Microsoft365OAuthAuthorizationDto": {
        "type": "object",
        "properties": {
          "authorizationUrl": {
            "type": "string",
            "description": "Microsoft's consent page for the stored app registration"
          }
        },
        "required": [
          "authorizationUrl"
        ]
      },
      "Microsoft365OAuthCallbackDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The authorization code Microsoft redirected with"
          },
          "state": {
            "type": "string",
            "description": "The state the authorize call issued"
          }
        },
        "required": [
          "code",
          "state"
        ]
      },
      "Microsoft365OAuthRedirectUriDto": {
        "type": "object",
        "properties": {
          "redirectUri": {
            "type": "string",
            "nullable": true,
            "description": "The redirect URI to register as a Web platform redirect on the app registration in Microsoft Entra; null while branding.admin_app_url is unset"
          }
        },
        "required": [
          "redirectUri"
        ]
      },
      "Microsoft365OAuthStatusDto": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Whether Microsoft still honours the stored grant. False without a connected mailbox, or once Microsoft no longer honours the grant."
          }
        },
        "required": [
          "valid"
        ]
      },
      "SendTestEmailDto": {
        "type": "object",
        "properties": {
          "recipientEmail": {
            "type": "string",
            "example": "admin@bank.example"
          }
        },
        "required": [
          "recipientEmail"
        ]
      },
      "TestEmailSendResponseDto": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "delivered",
              "failed",
              "skipped"
            ],
            "description": "skipped means email sending is disabled for the tenant"
          },
          "providerCode": {
            "type": "string",
            "description": "Provider outcome code for diagnosing a misconfiguration"
          }
        },
        "required": [
          "outcome",
          "providerCode"
        ]
      },
      "SmsSettingsActorDto": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Display name, `firstName lastName`"
          },
          "username": {
            "type": "string",
            "description": "Login identifier"
          }
        },
        "required": [
          "profileId"
        ]
      },
      "SmsSettingsResponseDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "provider": {
            "type": "string",
            "enum": [
              "plivo",
              "twilio"
            ],
            "nullable": true
          },
          "from": {
            "type": "string",
            "nullable": true
          },
          "minBalance": {
            "type": "string",
            "nullable": true,
            "description": "In the provider account currency"
          },
          "subAccountSet": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether a sub-account credential is stored. null when the stored credentials could not be read. Credential values are never returned."
          },
          "authTokenLastFour": {
            "type": "string",
            "nullable": true,
            "description": "The last 4 characters of the stored auth token. null while SMS is off, for a token under 12 characters, or when the credentials could not be read."
          },
          "credentialsSavedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the current credentials were saved. null while SMS is off or when the store cannot tell."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the settings were last saved. null while SMS is off."
          },
          "updatedBy": {
            "nullable": true,
            "description": "Who last saved the settings. null while SMS is off, or when that is no longer known.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SmsSettingsActorDto"
              }
            ]
          },
          "userRequestedOtpText": {
            "type": "string",
            "description": "The SMS sent with the code for a transfer the customer ordered. The default text until an admin saves one, also while SMS is off."
          },
          "adminIssuedOtpText": {
            "type": "string",
            "description": "The SMS sent with codes an admin issues. The default text until an admin saves one, also while SMS is off."
          }
        },
        "required": [
          "enabled",
          "provider",
          "from",
          "minBalance",
          "subAccountSet",
          "authTokenLastFour",
          "credentialsSavedAt",
          "updatedAt",
          "updatedBy",
          "userRequestedOtpText",
          "adminIssuedOtpText"
        ]
      },
      "UpdateSmsSettingsDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "false switches SMS off for the tenant and clears the stored settings"
          },
          "provider": {
            "type": "string",
            "enum": [
              "plivo",
              "twilio"
            ],
            "example": "plivo",
            "description": "Required when enabled"
          },
          "from": {
            "type": "string",
            "example": "+31612345678",
            "description": "An E.164 phone number, or a sender id of 3 to 11 letters, digits and spaces with at least one letter. Plivo refuses spaces. Required when enabled."
          },
          "minBalance": {
            "type": "string",
            "example": "10.00",
            "description": "At least 0.01, in the provider account currency. Sending is refused while the provider balance is below it. Required when enabled."
          },
          "authId": {
            "type": "string",
            "description": "Write-only. Omit to keep the stored value for the same provider."
          },
          "authToken": {
            "type": "string",
            "description": "Write-only. Omit to keep the stored value for the same provider."
          },
          "subAccount": {
            "type": "boolean",
            "description": "false removes the stored sub-account and ignores any sub-account fields sent. true requires a sub-account pair, sent or stored. Omit to keep what is stored."
          },
          "subAccountId": {
            "type": "string",
            "description": "Write-only. Set together with subAccountToken. Omit to keep the stored value for the same provider."
          },
          "subAccountToken": {
            "type": "string",
            "description": "Write-only. Set together with subAccountId. Omit to keep the stored value for the same provider."
          },
          "userRequestedOtpText": {
            "type": "string",
            "maxLength": 255,
            "description": "The SMS sent with the code for a transfer the customer ordered. Must contain [OTP], which is replaced with the code. [Amount], [OriginatingAccount] and [BeneficiaryName] are replaced when present. Required when enabled."
          },
          "adminIssuedOtpText": {
            "type": "string",
            "maxLength": 255,
            "description": "The SMS sent with codes an admin issues. Must contain [OTP], which is replaced with the codes. Required when enabled."
          }
        },
        "required": [
          "enabled"
        ]
      },
      "SmsProviderDetailsDto": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "plivo",
              "twilio"
            ],
            "example": "plivo"
          },
          "subAccount": {
            "type": "boolean",
            "description": "false checks the main account only and ignores any sub-account fields sent. true requires a sub-account pair, sent or stored. Omit to use what is stored."
          },
          "authId": {
            "type": "string",
            "description": "Omit to use the stored credentials for this provider."
          },
          "authToken": {
            "type": "string",
            "description": "Omit to use the stored credentials for this provider."
          },
          "subAccountId": {
            "type": "string",
            "description": "Omit to use the stored credentials for this provider. Set together with subAccountToken."
          },
          "subAccountToken": {
            "type": "string",
            "description": "Omit to use the stored credentials for this provider. Set together with subAccountId."
          }
        },
        "required": [
          "provider"
        ]
      },
      "SmsProviderDetailsResponseDto": {
        "type": "object",
        "properties": {
          "balance": {
            "type": "string",
            "example": "12.50",
            "description": "A decimal string in the provider account currency"
          },
          "currency": {
            "type": "string",
            "example": "USD",
            "description": "ISO 4217 code of the provider account"
          },
          "senders": {
            "example": [
              "+31612345678"
            ],
            "description": "Sender numbers registered at the provider for the sending account, E.164, at most 200. Empty when a sub-account has none, which a save refuses.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "balance",
          "currency",
          "senders"
        ]
      },
      "RootIpRestrictionResponseDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "allowedIps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled",
          "allowedIps"
        ]
      },
      "UpdateRootIpRestrictionDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether root sign-in is limited to the list"
          },
          "allowedIps": {
            "maxItems": 100,
            "description": "Plain IPv4/IPv6 addresses or CIDR ranges root may sign in from. While enabled, it must cover the address the request comes from, and no entry may cover every IPv4 or every IPv6 address.",
            "example": [
              "203.0.113.10",
              "2001:db8::/32"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled",
          "allowedIps"
        ]
      },
      "BlockedIpResponseDto": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "example": "203.0.113.7"
          },
          "blockedAt": {
            "type": "string",
            "format": "date-time"
          },
          "blockedUntil": {
            "type": "string",
            "format": "date-time",
            "description": "When the block lifts"
          },
          "reason": {
            "type": "string",
            "example": "login_lockout"
          },
          "failedAttempts": {
            "type": "number",
            "description": "Failed logins that tripped the block"
          },
          "firstFailedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastFailedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "ip",
          "blockedAt",
          "blockedUntil",
          "reason",
          "failedAttempts",
          "firstFailedAt",
          "lastFailedAt"
        ]
      },
      "UnblockIpsDto": {
        "type": "object",
        "properties": {
          "ips": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "ips"
        ]
      },
      "UnblockIpResultDto": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "unblocked",
              "not_blocked"
            ],
            "description": "'not_blocked' means the address had no active block, so nothing changed."
          }
        },
        "required": [
          "ip",
          "outcome"
        ]
      },
      "UserOptionFieldsViewDto": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "boolean"
          },
          "email": {
            "type": "boolean"
          },
          "phone": {
            "type": "boolean"
          },
          "firstName": {
            "type": "boolean"
          },
          "lastName": {
            "type": "boolean"
          },
          "dateOfBirth": {
            "type": "boolean"
          },
          "smsPhoneNumber": {
            "type": "boolean"
          },
          "homePhoneNumber": {
            "type": "boolean"
          },
          "officePhoneNumber": {
            "type": "boolean"
          },
          "faxNumber": {
            "type": "boolean"
          },
          "documentId": {
            "type": "boolean"
          },
          "countryOfResidenceIso2": {
            "type": "boolean"
          },
          "countryOfCitizenshipIso2": {
            "type": "boolean"
          }
        },
        "required": [
          "companyName",
          "email",
          "phone",
          "firstName",
          "lastName",
          "dateOfBirth",
          "smsPhoneNumber",
          "homePhoneNumber",
          "officePhoneNumber",
          "faxNumber",
          "documentId",
          "countryOfResidenceIso2",
          "countryOfCitizenshipIso2"
        ]
      },
      "AddressPartsViewDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "boolean"
          },
          "line2": {
            "type": "boolean"
          },
          "city": {
            "type": "boolean"
          },
          "state": {
            "type": "boolean"
          },
          "postalCode": {
            "type": "boolean"
          },
          "country": {
            "type": "boolean"
          }
        },
        "required": [
          "line1",
          "line2",
          "city",
          "state",
          "postalCode",
          "country"
        ]
      },
      "MailingAddressPartsViewDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "boolean"
          },
          "phone": {
            "type": "boolean"
          },
          "line1": {
            "type": "boolean"
          },
          "line2": {
            "type": "boolean"
          },
          "city": {
            "type": "boolean"
          },
          "state": {
            "type": "boolean"
          },
          "postalCode": {
            "type": "boolean"
          },
          "country": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "phone",
          "line1",
          "line2",
          "city",
          "state",
          "postalCode",
          "country"
        ]
      },
      "BeneficialOwnerPartsViewDto": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "boolean"
          },
          "dateOfBirth": {
            "type": "boolean"
          },
          "idType": {
            "type": "boolean"
          },
          "idNumber": {
            "type": "boolean"
          },
          "address": {
            "type": "boolean"
          },
          "relationship": {
            "type": "boolean"
          },
          "phone": {
            "type": "boolean"
          }
        },
        "required": [
          "fullName",
          "dateOfBirth",
          "idType",
          "idNumber",
          "address",
          "relationship",
          "phone"
        ]
      },
      "UserOptionPartsViewDto": {
        "type": "object",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/AddressPartsViewDto"
          },
          "mailingAddress": {
            "$ref": "#/components/schemas/MailingAddressPartsViewDto"
          },
          "beneficialOwner": {
            "$ref": "#/components/schemas/BeneficialOwnerPartsViewDto"
          }
        },
        "required": [
          "address",
          "mailingAddress",
          "beneficialOwner"
        ]
      },
      "UserOptionsResponseDto": {
        "type": "object",
        "properties": {
          "fields": {
            "$ref": "#/components/schemas/UserOptionFieldsViewDto"
          },
          "parts": {
            "$ref": "#/components/schemas/UserOptionPartsViewDto"
          },
          "beneficialOwnerFieldsEnabled": {
            "type": "boolean"
          },
          "dormantAfterMonths": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "fields",
          "parts",
          "beneficialOwnerFieldsEnabled",
          "dormantAfterMonths"
        ]
      },
      "UserOptionFieldsDto": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "boolean"
          },
          "email": {
            "type": "boolean"
          },
          "phone": {
            "type": "boolean"
          },
          "firstName": {
            "type": "boolean"
          },
          "lastName": {
            "type": "boolean"
          },
          "dateOfBirth": {
            "type": "boolean"
          },
          "smsPhoneNumber": {
            "type": "boolean"
          },
          "homePhoneNumber": {
            "type": "boolean"
          },
          "officePhoneNumber": {
            "type": "boolean"
          },
          "faxNumber": {
            "type": "boolean"
          },
          "documentId": {
            "type": "boolean",
            "description": "The document number. The document type stays admin-only, so this reaches a document an admin has already recorded."
          },
          "countryOfResidenceIso2": {
            "type": "boolean"
          },
          "countryOfCitizenshipIso2": {
            "type": "boolean"
          }
        }
      },
      "AddressPartsDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "boolean"
          },
          "line2": {
            "type": "boolean"
          },
          "city": {
            "type": "boolean"
          },
          "state": {
            "type": "boolean"
          },
          "postalCode": {
            "type": "boolean"
          },
          "country": {
            "type": "boolean"
          }
        }
      },
      "MailingAddressPartsDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "boolean"
          },
          "phone": {
            "type": "boolean"
          },
          "line1": {
            "type": "boolean"
          },
          "line2": {
            "type": "boolean"
          },
          "city": {
            "type": "boolean"
          },
          "state": {
            "type": "boolean"
          },
          "postalCode": {
            "type": "boolean"
          },
          "country": {
            "type": "boolean"
          }
        }
      },
      "BeneficialOwnerPartsDto": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "boolean"
          },
          "dateOfBirth": {
            "type": "boolean"
          },
          "idType": {
            "type": "boolean"
          },
          "idNumber": {
            "type": "boolean"
          },
          "address": {
            "type": "boolean"
          },
          "relationship": {
            "type": "boolean"
          },
          "phone": {
            "type": "boolean"
          }
        }
      },
      "UserOptionPartsDto": {
        "type": "object",
        "properties": {
          "address": {
            "description": "Physical address parts.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressPartsDto"
              }
            ]
          },
          "mailingAddress": {
            "$ref": "#/components/schemas/MailingAddressPartsDto"
          },
          "beneficialOwner": {
            "description": "Each part also needs beneficialOwnerFieldsEnabled.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BeneficialOwnerPartsDto"
              }
            ]
          }
        }
      },
      "UpdateUserOptionsDto": {
        "type": "object",
        "properties": {
          "fields": {
            "description": "Switches to change. Omitted switches keep their stored value.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserOptionFieldsDto"
              }
            ]
          },
          "parts": {
            "description": "Part switches to change. Omitted parts keep their stored value.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserOptionPartsDto"
              }
            ]
          },
          "beneficialOwnerFieldsEnabled": {
            "type": "boolean",
            "description": "Whether customers may edit the beneficial-owner details at all."
          },
          "dormantAfterMonths": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "maximum": 99,
            "description": "Months of inactivity before a profile goes dormant; null disables it. Send it only when it changed — an absent value leaves the stored threshold alone."
          }
        }
      },
      "ExternalLinkDto": {
        "type": "object",
        "properties": {
          "surface": {
            "type": "string",
            "enum": [
              "menu_item",
              "transfer_button"
            ]
          },
          "label": {
            "type": "string",
            "maxLength": 30,
            "example": "Support"
          },
          "url": {
            "type": "string",
            "example": "https://support.example.com"
          },
          "icon": {
            "type": "string",
            "example": "life-buoy"
          },
          "after": {
            "type": "string",
            "example": "accounts",
            "description": "The entry this link sits after"
          }
        },
        "required": [
          "surface",
          "label",
          "url",
          "icon",
          "after"
        ]
      },
      "ExternalLinkListResponseDto": {
        "type": "object",
        "properties": {
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkDto"
            }
          },
          "limits": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "example": {
              "menu_item": 10,
              "transfer_button": 10
            },
            "description": "Most links this tenant may keep on each surface"
          }
        },
        "required": [
          "links",
          "limits"
        ]
      },
      "SaveExternalLinksDto": {
        "type": "object",
        "properties": {
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkDto"
            }
          }
        },
        "required": [
          "links"
        ]
      },
      "ExternalLinkOptionsResponseDto": {
        "type": "object",
        "properties": {
          "surface": {
            "type": "string",
            "enum": [
              "menu_item",
              "transfer_button"
            ]
          },
          "icons": {
            "description": "Icons a link on this surface may use. A fixed list per surface.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "anchors": {
            "description": "Entries a link may sit after (the `after` field). Only the ones this tenant currently shows.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "surface",
          "icons",
          "anchors"
        ]
      },
      "ServerTimeResponseDto": {
        "type": "object",
        "properties": {
          "unix": {
            "type": "number",
            "description": "Current server instant as whole seconds since the epoch",
            "example": 1786278896
          },
          "date": {
            "type": "string",
            "description": "Server-local date",
            "example": "2026-08-09"
          },
          "time": {
            "type": "string",
            "description": "Server-local time of day",
            "example": "12:34:56"
          },
          "datetime": {
            "type": "string",
            "description": "Server-local date and time",
            "example": "2026-08-09 12:34:56"
          },
          "rfc822": {
            "type": "string",
            "description": "RFC 822 timestamp",
            "example": "09 Aug 26 12:34 UTC"
          },
          "rfc850": {
            "type": "string",
            "description": "RFC 850 timestamp",
            "example": "Sunday, 09-Aug-26 12:34:56 UTC"
          },
          "rfc1123": {
            "type": "string",
            "description": "RFC 1123 timestamp",
            "example": "Sun, 09 Aug 2026 12:34:56 UTC"
          },
          "rfc3339": {
            "type": "string",
            "description": "RFC 3339 timestamp",
            "example": "2026-08-09T12:34:56Z"
          }
        },
        "required": [
          "unix",
          "date",
          "time",
          "datetime",
          "rfc822",
          "rfc850",
          "rfc1123",
          "rfc3339"
        ]
      },
      "CountryDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "FR",
            "description": "ISO 3166-1 alpha-2 code."
          },
          "name": {
            "type": "string",
            "example": "France",
            "description": "English display name."
          }
        },
        "required": [
          "code",
          "name"
        ]
      }
    }
  },
  "security": [
    {
      "cookie": []
    },
    {
      "bearer": []
    }
  ]
}