{
  "components": {
    "schemas": {
      "AccountBalanceUpdatedEvent": {
        "description": "The `account.balance.updated` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "account_id": {
                    "examples": [
                      "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18"
                    ],
                    "type": "string"
                  },
                  "as_of": {
                    "examples": [
                      "2026-11-10T08:12:04Z"
                    ],
                    "type": "string"
                  },
                  "balance": {
                    "examples": [
                      "18240.55"
                    ],
                    "type": "string"
                  },
                  "currency": {
                    "examples": [
                      "UAH"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "examples": [
                      "balance"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "previous_attributes": {
                "description": "The old values of what changed, by field.",
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "account.balance.updated",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "AccountBrand": {
        "properties": {
          "color": {
            "description": "Our swatch for a curated domain (a palette.account hex, as the suggestions give it): a provider's folder on the accounts page falls back to it as its tint. Absent for other domains.",
            "examples": [
              "#A8321F"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "examples": [
              "monobank.ua"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "icon_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon_url_dark": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "examples": [
              "monobank"
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AccountConnection": {
        "properties": {
          "health": {
            "description": "Health of a Monobank-synced account: ok, stale (the bank has not answered for it for more than 24 hours while the connection is active) or reconnect_required (confirm a new request in the Monobank app). Omitted for other connections.",
            "enum": [
              "ok",
              "stale",
              "reconnect_required",
              null
            ],
            "examples": [
              "ok"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "enum": [
              "bank",
              "wallet",
              "exchange"
            ],
            "examples": [
              "bank"
            ],
            "type": "string"
          },
          "last_data_at": {
            "description": "When the bank last answered for the account (a statement, a balance refresh or a push), with or without new rows.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_synced_at": {
            "description": "When the balance was last read from the source.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "The connection's display name (\"Monobank\", a wallet label).",
            "examples": [
              "Monobank"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "description": "The source: monobank, saltedge, zerion, ccxt:binance, …",
            "examples": [
              "monobank"
            ],
            "type": "string"
          }
        },
        "required": [
          "kind",
          "provider"
        ],
        "type": "object"
      },
      "AccountListResponse": {
        "properties": {
          "account_credit_limit": {
            "description": "`account_credit_limit` and `account_overdraft_limit` are the limits in the account's own currency, next to account_current_balance: with ?currency= the credit_limit and overdraft_limit fields are converted into the display currency, so a tile that shows the balance in the account's currency compares it with these.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "account_currency_info": {
            "$ref": "#/components/schemas/AccountsCurrencyInfo"
          },
          "account_current_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "account_overdraft_limit": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "account_share_amount": {
            "description": "The share_amount in the account's own currency, next to account_current_balance.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "annual_rate": {
            "description": "The interest rate in percent a year (14.5 = 14.5% a year), at most 2 decimals, 0–100: a deposit's or savings account's, a credit card's after its grace period, a credit line's, loan's or mortgage's.",
            "examples": [
              "14.5"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "archived_at": {
            "description": "When the account was archived: set when it closes, cleared when it reopens; absent while it is open. A closed account's \"Closed\" stamp shows this day (an instalment plan's own closed_at wins).",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "available_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "balance_version": {
            "description": "The version of the account's balance.",
            "examples": [
              57
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "brand": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountBrand"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand_color": {
            "description": "The colour sampled from the brand's logo (#RRGGBB), for the mark's first paint; omitted until a client samples it.",
            "examples": [
              "#1E88E5"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "brand_domain": {
            "description": "The bank's or service's site; Brand is its logo for the account mark, omitted without a domain.",
            "examples": [
              "monobank.ua"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "changed_at": {
            "description": "Sent only with updated_since: the later of the account's and its balance's change times. A poller keeps the largest it has seen and asks with it next time.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "connection": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AccountConnection"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for an account fed by a bank, wallet or exchange: its balance is read-only. Absent for a manual account."
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credit_limit": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "currency_code": {
            "type": "string"
          },
          "currency_info": {
            "$ref": "#/components/schemas/AccountsCurrencyInfo"
          },
          "current_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "display_order": {
            "type": "integer"
          },
          "goal_amount": {
            "description": "A savings goal in the account's currency (above 0).",
            "examples": [
              "40000"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "goal_date": {
            "description": "The day the goal should be reached by.",
            "examples": [
              "2027-01-15"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "grace_period_days": {
            "description": "The longest interest-free period the bank states (1–200). Descriptive: the due day sets the date.",
            "examples": [
              62
            ],
            "maximum": 200,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "gradient_direction": {
            "type": [
              "integer",
              "null"
            ]
          },
          "gradient_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GradientType"
              },
              {
                "type": "null"
              }
            ]
          },
          "grain_intensity": {
            "type": "integer"
          },
          "grant": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GrantInfo"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set on an account another person shared with the requester."
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "include_in_net_worth": {
            "type": "boolean"
          },
          "instalment_plan_id": {
            "description": "The loan's instalment plan: its active plan, else its latest; null for an account that never had one. Clients tell an instalment plan's loan apart by it.",
            "examples": [
              "0190f0a0-0000-7000-8000-000000000010"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "interest_payout": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InterestPayout"
                  }
                ],
                "enum": [
                  "monthly",
                  "quarterly",
                  "at_maturity",
                  "capitalized"
                ],
                "examples": [
                  "monthly"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "When a deposit pays its interest: monthly, quarterly, at_maturity (with the deposit) or capitalized (added to it)."
          },
          "is_closed": {
            "type": "boolean"
          },
          "is_gradient": {
            "type": "boolean"
          },
          "is_liability": {
            "type": "boolean"
          },
          "is_shared": {
            "description": "Deprecated: always false.",
            "type": "boolean"
          },
          "keeps_share_history": {
            "description": "The account is the archived copy of the caller's part of a shared account whose access ended. It stays archived: it is never reopened (422), only deleted for good.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "minimum_payment_amount": {
            "description": "The least the minimum payment can be, in the account's currency. The minimum due is the larger of the percent of the debt and this, at most the debt.",
            "examples": [
              "100"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "minimum_payment_percent": {
            "description": "A credit card's or line's minimum payment in percent of the debt (0–100, at most 2 decimals): «5%».",
            "examples": [
              "5"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "overdraft_limit": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_due_day": {
            "description": "The day of the month by which the minimum payment is due and the grace period ends (1–31; in a shorter month, its last day).",
            "examples": [
              25
            ],
            "maximum": 31,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "share_amount": {
            "description": "Account sharing, “My part”: the part of current_balance that counts in this space's totals, in the same currency: the requester's capital on an account pooled with them, the balance less the grantees' capital on an account this space pools with others. Absent where the whole balance counts. Totals count include_in_net_worth ? (share_amount ?? current_balance) : 0, with the usual sign rules.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "shared_with": {
            "description": "`shared_with` lists the people an account of this space is shared with.",
            "items": {
              "$ref": "#/components/schemas/SharedWith"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "source": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AccountSource"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for an account a custom source pushes through the API; absent for others."
          },
          "space_id": {
            "type": "string"
          },
          "term_end_date": {
            "description": "The day the deposit, loan or credit line ends. Kept as entered: it isn't derived from term_months.",
            "examples": [
              "2027-05-12"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "term_months": {
            "description": "The term in months (1–600).",
            "examples": [
              12
            ],
            "maximum": 600,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/AccountType"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "version": {
            "description": "The account row version (also the ETag): send it as If-Match on PATCH / DELETE to detect concurrent edits (412).",
            "examples": [
              3
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "space_id",
          "name",
          "type",
          "currency_code",
          "currency_info",
          "is_shared",
          "include_in_net_worth",
          "is_closed",
          "is_gradient",
          "grain_intensity",
          "display_order",
          "is_liability",
          "current_balance",
          "created_at",
          "updated_at",
          "account_currency_info"
        ],
        "type": "object"
      },
      "AccountListResponseListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AccountListResponse"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/AccountListResponse"
          },
          "type": "array"
        }
      },
      "AccountResponse": {
        "properties": {
          "annual_rate": {
            "description": "The interest rate in percent a year (14.5 = 14.5% a year), at most 2 decimals, 0–100: a deposit's or savings account's, a credit card's after its grace period, a credit line's, loan's or mortgage's.",
            "examples": [
              "14.5"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "archived_at": {
            "description": "When the account was archived: set when it closes, cleared when it reopens; absent while it is open. A closed account's \"Closed\" stamp shows this day (an instalment plan's own closed_at wins).",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "available_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "balance_version": {
            "description": "The version of the account's balance.",
            "examples": [
              57
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "brand": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountBrand"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand_color": {
            "description": "The colour sampled from the brand's logo (#RRGGBB), for the mark's first paint; omitted until a client samples it.",
            "examples": [
              "#1E88E5"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "brand_domain": {
            "description": "The bank's or service's site; Brand is its logo for the account mark, omitted without a domain.",
            "examples": [
              "monobank.ua"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "connection": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AccountConnection"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for an account fed by a bank, wallet or exchange: its balance is read-only. Absent for a manual account."
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credit_limit": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "currency_code": {
            "type": "string"
          },
          "currency_info": {
            "$ref": "#/components/schemas/AccountsCurrencyInfo"
          },
          "current_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "display_order": {
            "type": "integer"
          },
          "goal_amount": {
            "description": "A savings goal in the account's currency (above 0).",
            "examples": [
              "40000"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "goal_date": {
            "description": "The day the goal should be reached by.",
            "examples": [
              "2027-01-15"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "grace_period_days": {
            "description": "The longest interest-free period the bank states (1–200). Descriptive: the due day sets the date.",
            "examples": [
              62
            ],
            "maximum": 200,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "gradient_direction": {
            "type": [
              "integer",
              "null"
            ]
          },
          "gradient_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GradientType"
              },
              {
                "type": "null"
              }
            ]
          },
          "grain_intensity": {
            "type": "integer"
          },
          "grant": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GrantInfo"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set on an account another person shared with the requester."
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "include_in_net_worth": {
            "type": "boolean"
          },
          "instalment_plan_id": {
            "description": "The loan's instalment plan: its active plan, else its latest; null for an account that never had one. Clients tell an instalment plan's loan apart by it.",
            "examples": [
              "0190f0a0-0000-7000-8000-000000000010"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "interest_payout": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InterestPayout"
                  }
                ],
                "enum": [
                  "monthly",
                  "quarterly",
                  "at_maturity",
                  "capitalized"
                ],
                "examples": [
                  "monthly"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "When a deposit pays its interest: monthly, quarterly, at_maturity (with the deposit) or capitalized (added to it)."
          },
          "is_closed": {
            "type": "boolean"
          },
          "is_gradient": {
            "type": "boolean"
          },
          "is_liability": {
            "type": "boolean"
          },
          "is_shared": {
            "description": "Deprecated: always false.",
            "type": "boolean"
          },
          "keeps_share_history": {
            "description": "The account is the archived copy of the caller's part of a shared account whose access ended. It stays archived: it is never reopened (422), only deleted for good.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "minimum_payment_amount": {
            "description": "The least the minimum payment can be, in the account's currency. The minimum due is the larger of the percent of the debt and this, at most the debt.",
            "examples": [
              "100"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "minimum_payment_percent": {
            "description": "A credit card's or line's minimum payment in percent of the debt (0–100, at most 2 decimals): «5%».",
            "examples": [
              "5"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "overdraft_limit": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_due_day": {
            "description": "The day of the month by which the minimum payment is due and the grace period ends (1–31; in a shorter month, its last day).",
            "examples": [
              25
            ],
            "maximum": 31,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "share_amount": {
            "description": "Account sharing, “My part”: the part of current_balance that counts in this space's totals, in the same currency: the requester's capital on an account pooled with them, the balance less the grantees' capital on an account this space pools with others. Absent where the whole balance counts. Totals count include_in_net_worth ? (share_amount ?? current_balance) : 0, with the usual sign rules.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "shared_with": {
            "description": "`shared_with` lists the people an account of this space is shared with.",
            "items": {
              "$ref": "#/components/schemas/SharedWith"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "source": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AccountSource"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for an account a custom source pushes through the API; absent for others."
          },
          "space_id": {
            "type": "string"
          },
          "term_end_date": {
            "description": "The day the deposit, loan or credit line ends. Kept as entered: it isn't derived from term_months.",
            "examples": [
              "2027-05-12"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "term_months": {
            "description": "The term in months (1–600).",
            "examples": [
              12
            ],
            "maximum": 600,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/AccountType"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "version": {
            "description": "The account row version (also the ETag): send it as If-Match on PATCH / DELETE to detect concurrent edits (412).",
            "examples": [
              3
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "space_id",
          "name",
          "type",
          "currency_code",
          "currency_info",
          "is_shared",
          "include_in_net_worth",
          "is_closed",
          "is_gradient",
          "grain_intensity",
          "display_order",
          "is_liability",
          "current_balance",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "AccountResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/AccountResponse"
        }
      },
      "AccountSource": {
        "properties": {
          "id": {
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3b"
            ],
            "type": "string"
          },
          "is_read_only": {
            "description": "True when the app changes only the category, merchant, note and tags of the account's rows and adds none of its own (422 SRC_008).",
            "examples": [
              true
            ],
            "type": "boolean"
          },
          "name": {
            "examples": [
              "My bank (my script)"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "is_read_only"
        ],
        "type": "object"
      },
      "AccountType": {
        "enum": [
          "account",
          "bonus",
          "card",
          "checking",
          "credit",
          "credit_card",
          "debit_card",
          "ewallet",
          "insurance",
          "investment",
          "loan",
          "mortgage",
          "savings"
        ],
        "type": "string",
        "x-enum-varnames": [
          "AccountTypeAccount",
          "AccountTypeBonus",
          "AccountTypeCard",
          "AccountTypeChecking",
          "AccountTypeCredit",
          "AccountTypeCreditCard",
          "AccountTypeDebitCard",
          "AccountTypeEWallet",
          "AccountTypeInsurance",
          "AccountTypeInvestment",
          "AccountTypeLoan",
          "AccountTypeMortgage",
          "AccountTypeSavings"
        ]
      },
      "AccountWithConvertedBalance": {
        "properties": {
          "annual_rate": {
            "description": "The interest rate in percent a year (14.5 = 14.5% a year), at most 2 decimals, 0–100: a deposit's or savings account's, a credit card's after its grace period, a credit line's, loan's or mortgage's.",
            "examples": [
              "14.5"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "archived_at": {
            "description": "When the account was archived: set when it closes, cleared when it reopens; absent while it is open. A closed account's \"Closed\" stamp shows this day (an instalment plan's own closed_at wins).",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "available_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "balance_version": {
            "description": "The version of the account's balance.",
            "examples": [
              57
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "brand": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountBrand"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand_color": {
            "description": "The colour sampled from the brand's logo (#RRGGBB), for the mark's first paint; omitted until a client samples it.",
            "examples": [
              "#1E88E5"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "brand_domain": {
            "description": "The bank's or service's site; Brand is its logo for the account mark, omitted without a domain.",
            "examples": [
              "monobank.ua"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "connection": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AccountConnection"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for an account fed by a bank, wallet or exchange: its balance is read-only. Absent for a manual account."
          },
          "conversion_unavailable": {
            "description": "True when no exchange rate exists for the account currency; converted_balance is then 0 and the account is not included in the totals.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "converted_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "converted_currency": {
            "type": "string"
          },
          "converted_share_amount": {
            "description": "The share_amount converted (the capital itself at the rate); the totals count it in place of converted_balance when it is set.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credit_limit": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "currency_code": {
            "type": "string"
          },
          "currency_info": {
            "$ref": "#/components/schemas/AccountsCurrencyInfo"
          },
          "current_balance": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "display_order": {
            "type": "integer"
          },
          "goal_amount": {
            "description": "A savings goal in the account's currency (above 0).",
            "examples": [
              "40000"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "goal_date": {
            "description": "The day the goal should be reached by.",
            "examples": [
              "2027-01-15"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "grace_period_days": {
            "description": "The longest interest-free period the bank states (1–200). Descriptive: the due day sets the date.",
            "examples": [
              62
            ],
            "maximum": 200,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "gradient_direction": {
            "type": [
              "integer",
              "null"
            ]
          },
          "gradient_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GradientType"
              },
              {
                "type": "null"
              }
            ]
          },
          "grain_intensity": {
            "type": "integer"
          },
          "grant": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GrantInfo"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set on an account another person shared with the requester."
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "include_in_net_worth": {
            "type": "boolean"
          },
          "instalment_plan_id": {
            "description": "The loan's instalment plan: its active plan, else its latest; null for an account that never had one. Clients tell an instalment plan's loan apart by it.",
            "examples": [
              "0190f0a0-0000-7000-8000-000000000010"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "interest_payout": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InterestPayout"
                  }
                ],
                "enum": [
                  "monthly",
                  "quarterly",
                  "at_maturity",
                  "capitalized"
                ],
                "examples": [
                  "monthly"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "When a deposit pays its interest: monthly, quarterly, at_maturity (with the deposit) or capitalized (added to it)."
          },
          "is_closed": {
            "type": "boolean"
          },
          "is_gradient": {
            "type": "boolean"
          },
          "is_liability": {
            "type": "boolean"
          },
          "is_shared": {
            "description": "Deprecated: always false.",
            "type": "boolean"
          },
          "keeps_share_history": {
            "description": "The account is the archived copy of the caller's part of a shared account whose access ended. It stays archived: it is never reopened (422), only deleted for good.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "minimum_payment_amount": {
            "description": "The least the minimum payment can be, in the account's currency. The minimum due is the larger of the percent of the debt and this, at most the debt.",
            "examples": [
              "100"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "minimum_payment_percent": {
            "description": "A credit card's or line's minimum payment in percent of the debt (0–100, at most 2 decimals): «5%».",
            "examples": [
              "5"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "overdraft_limit": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_due_day": {
            "description": "The day of the month by which the minimum payment is due and the grace period ends (1–31; in a shorter month, its last day).",
            "examples": [
              25
            ],
            "maximum": 31,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "share_amount": {
            "description": "Account sharing, “My part”: the part of current_balance that counts in this space's totals, in the same currency: the requester's capital on an account pooled with them, the balance less the grantees' capital on an account this space pools with others. Absent where the whole balance counts. Totals count include_in_net_worth ? (share_amount ?? current_balance) : 0, with the usual sign rules.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "shared_with": {
            "description": "`shared_with` lists the people an account of this space is shared with.",
            "items": {
              "$ref": "#/components/schemas/SharedWith"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "source": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AccountSource"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Set for an account a custom source pushes through the API; absent for others."
          },
          "space_id": {
            "type": "string"
          },
          "term_end_date": {
            "description": "The day the deposit, loan or credit line ends. Kept as entered: it isn't derived from term_months.",
            "examples": [
              "2027-05-12"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "term_months": {
            "description": "The term in months (1–600).",
            "examples": [
              12
            ],
            "maximum": 600,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/AccountType"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "version": {
            "description": "The account row version (also the ETag): send it as If-Match on PATCH / DELETE to detect concurrent edits (412).",
            "examples": [
              3
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "space_id",
          "name",
          "type",
          "currency_code",
          "currency_info",
          "is_shared",
          "include_in_net_worth",
          "is_closed",
          "is_gradient",
          "grain_intensity",
          "display_order",
          "is_liability",
          "current_balance",
          "created_at",
          "updated_at",
          "converted_balance",
          "converted_currency"
        ],
        "type": "object"
      },
      "AccountsCurrencyInfo": {
        "properties": {
          "currency_code": {
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "currency_symbol": {
            "examples": [
              "$"
            ],
            "type": "string"
          },
          "decimal_digits": {
            "examples": [
              2
            ],
            "type": "integer"
          },
          "decimal_places": {
            "examples": [
              2
            ],
            "type": "integer"
          }
        },
        "required": [
          "currency_symbol",
          "decimal_places",
          "decimal_digits",
          "currency_code"
        ],
        "type": "object"
      },
      "AllocationDisplay": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "currency": {
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "remaining": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "spent": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "amount",
          "spent",
          "remaining"
        ],
        "type": "object"
      },
      "AmountChangeResponse": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "349"
            ],
            "format": "decimal",
            "type": "string"
          },
          "effective_from": {
            "examples": [
              "2026-12-01"
            ],
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "effective_from",
          "amount"
        ],
        "type": "object"
      },
      "AnalyticsCurrencyInfo": {
        "properties": {
          "currencyCode": {
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "currencySymbol": {
            "examples": [
              "$"
            ],
            "type": "string"
          },
          "decimalDigits": {
            "examples": [
              2
            ],
            "type": "integer"
          },
          "decimalPlaces": {
            "examples": [
              2
            ],
            "type": "integer"
          }
        },
        "required": [
          "currencySymbol",
          "decimalPlaces",
          "decimalDigits",
          "currencyCode"
        ],
        "type": "object"
      },
      "AttemptResponse": {
        "properties": {
          "duration_ms": {
            "type": "integer"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "http_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "n": {
            "type": "integer"
          },
          "response_body": {
            "description": "The answer's first 4 KB.",
            "type": "string"
          },
          "response_headers": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "The answer's first 20 headers.",
            "type": [
              "object",
              "null"
            ]
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "n",
          "started_at",
          "duration_ms",
          "response_body"
        ],
        "type": "object"
      },
      "BalanceBatchRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BalanceItem"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "BalanceBatchResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/BalanceResult"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "BalanceBatchResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BalanceBatchResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/BalanceBatchResponse"
        }
      },
      "BalanceItem": {
        "properties": {
          "account": {
            "description": "The external id of one of the source's accounts.",
            "examples": [
              "pumb-4417"
            ],
            "type": "string"
          },
          "as_of": {
            "description": "When the source had this balance (RFC 3339 with offset); an older one than the last applied is skipped.",
            "examples": [
              "2026-11-07T06:00:00+02:00"
            ],
            "type": "string"
          },
          "balance": {
            "description": "A signed decimal string in the account's currency (negative is money owed).",
            "examples": [
              "18250.00"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "BalanceResult": {
        "properties": {
          "account": {
            "type": "string"
          },
          "adjustment": {
            "description": "The difference booked, signed; absent unless adjusted.",
            "examples": [
              "-12.40"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PushItemError"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "description": "Adjusted (the difference became one balance adjustment), unchanged, stale (an older as_of than the last applied) or failed.",
            "enum": [
              "adjusted",
              "unchanged",
              "stale",
              "failed"
            ],
            "examples": [
              "adjusted"
            ],
            "type": "string"
          }
        },
        "required": [
          "account",
          "status"
        ],
        "type": "object"
      },
      "BrandResponse": {
        "properties": {
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "logo_url_dark": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_url_light": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "BudgetAllocationResponse": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "budget_id": {
            "type": "string"
          },
          "category_id": {
            "type": "string"
          },
          "category_name": {
            "description": "The category's display name in the request language (built-in categories translated, custom ones as stored).",
            "examples": [
              "Groceries"
            ],
            "type": "string"
          },
          "display": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AllocationDisplay"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The allocation in the display currency the device sent (X-Display-Currency), converted at today's rate; null when that is the budget currency, none was sent or there is no rate."
          },
          "id": {
            "type": "string"
          },
          "missing_rates": {
            "description": "`missing_rates` lists spending currencies without an exchange rate into the budget currency; that spending is not included in spent.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "parent_allocation_id": {
            "description": "The group allocation this one is an inner limit of: the budget's allocation of the nearest ancestor category; null at the top level. An inner limit is part of its group's amount and the group's spent already includes it, so the budget's totals count only top-level allocations.",
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3b"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "progress": {
            "type": "number"
          },
          "remaining": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "spent": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "version": {
            "description": "The allocation row version (also the ETag): send it as If-Match on PATCH / DELETE to detect concurrent edits (412).",
            "examples": [
              2
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "budget_id",
          "category_id",
          "category_name",
          "amount",
          "spent",
          "remaining",
          "progress"
        ],
        "type": "object"
      },
      "BudgetDisplay": {
        "properties": {
          "currency": {
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "remaining": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "total_budget": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "total_spent": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "total_budget",
          "total_spent",
          "remaining"
        ],
        "type": "object"
      },
      "BudgetListItem": {
        "properties": {
          "alerts_muted": {
            "description": "Whether you muted this budget's alerts.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "end_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "period": {
            "$ref": "#/components/schemas/BudgetPeriod"
          },
          "period_end": {
            "examples": [
              "2026-04-04T00:00:00Z"
            ],
            "format": "date-time",
            "type": "string"
          },
          "period_start": {
            "description": "`period_start` / `period_end` are the inclusive calendar dates (space timezone) of the current period, or of the period containing as_of.",
            "examples": [
              "2026-03-05T00:00:00Z"
            ],
            "format": "date-time",
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "start_date": {
            "format": "date-time",
            "type": "string"
          },
          "total_limit": {
            "description": "The budget's one amount for all spending, null when it is the sum of its allocations.",
            "examples": [
              "20000"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "The budget row version (also the ETag of single-budget responses): send it as If-Match on PATCH / DELETE.",
            "examples": [
              1
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "space_id",
          "name",
          "period",
          "start_date",
          "period_start",
          "period_end",
          "currency",
          "is_active",
          "created_at"
        ],
        "type": "object"
      },
      "BudgetListItemListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BudgetListItem"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/BudgetListItem"
          },
          "type": "array"
        }
      },
      "BudgetPeriod": {
        "enum": [
          "monthly",
          "weekly",
          "yearly",
          "custom"
        ],
        "type": "string",
        "x-enum-varnames": [
          "BudgetPeriodMonthly",
          "BudgetPeriodWeekly",
          "BudgetPeriodYearly",
          "BudgetPeriodCustom"
        ]
      },
      "BudgetResponse": {
        "properties": {
          "alerts_muted": {
            "description": "Whether you muted this budget's alerts.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "allocations": {
            "items": {
              "$ref": "#/components/schemas/BudgetAllocationResponse"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "display": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BudgetDisplay"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The totals in the display currency the device sent (X-Display-Currency), converted at today's rate; null when that is the budget currency, none was sent or there is no rate. Clients show it first and the budget's own figures as the second line."
          },
          "end_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "missing_rates": {
            "description": "`missing_rates` lists spending currencies without an exchange rate into the budget currency; that spending is excluded from total_spent.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "period": {
            "$ref": "#/components/schemas/BudgetPeriod"
          },
          "period_end": {
            "examples": [
              "2026-04-04T00:00:00Z"
            ],
            "format": "date-time",
            "type": "string"
          },
          "period_start": {
            "description": "`period_start` / `period_end` are the inclusive calendar dates (space timezone) of the evaluated period: the current one, or the one containing the as_of query date.",
            "examples": [
              "2026-03-05T00:00:00Z"
            ],
            "format": "date-time",
            "type": "string"
          },
          "progress": {
            "type": "number"
          },
          "remaining": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "start_date": {
            "format": "date-time",
            "type": "string"
          },
          "total_budget": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "total_limit": {
            "description": "The budget's one amount for all spending (null: the budget is the sum of its allocations). When set, total_budget is this amount and total_spent every expense of the space in the period, net of refunds; the allocations are inner limits.",
            "examples": [
              "20000"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "total_spent": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "version": {
            "description": "The budget row version (also the ETag): send it as If-Match on PATCH / DELETE to detect concurrent edits (412).",
            "examples": [
              1
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "space_id",
          "name",
          "period",
          "start_date",
          "period_start",
          "period_end",
          "currency",
          "is_active",
          "allocations",
          "total_budget",
          "total_spent",
          "remaining",
          "progress",
          "created_at"
        ],
        "type": "object"
      },
      "BudgetResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BudgetResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/BudgetResponse"
        }
      },
      "BudgetThresholdReachedEvent": {
        "description": "The `budget.threshold_reached` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "budget_id": {
                    "examples": [
                      "0193a2d3-4e5f-7a6b-8c7d-9e0f1a2b3c4d"
                    ],
                    "type": "string"
                  },
                  "currency": {
                    "examples": [
                      "UAH"
                    ],
                    "type": "string"
                  },
                  "limit": {
                    "examples": [
                      "10000.00"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "examples": [
                      "budget_threshold"
                    ],
                    "type": "string"
                  },
                  "period_end": {
                    "examples": [
                      "2026-11-30"
                    ],
                    "type": "string"
                  },
                  "period_start": {
                    "examples": [
                      "2026-11-01"
                    ],
                    "type": "string"
                  },
                  "spent": {
                    "examples": [
                      "8120.00"
                    ],
                    "type": "string"
                  },
                  "threshold": {
                    "examples": [
                      80
                    ],
                    "type": "number"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "budget.threshold_reached",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "CashFlowPoint": {
        "properties": {
          "expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "1850.50"
            ],
            "format": "decimal",
            "type": "string"
          },
          "income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "2700.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "net": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "849.50"
            ],
            "format": "decimal",
            "type": "string"
          },
          "period": {
            "examples": [
              "2026-03"
            ],
            "type": "string"
          }
        },
        "required": [
          "period",
          "income",
          "expenses",
          "net"
        ],
        "type": "object"
      },
      "CashFlowResponse": {
        "properties": {
          "avg_monthly_expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "1850.50"
            ],
            "format": "decimal",
            "type": "string"
          },
          "avg_monthly_income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "2700.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "currencyInfo": {
            "$ref": "#/components/schemas/AnalyticsCurrencyInfo"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies whose amounts could not be converted into the response currency (no exchange rate available). Those amounts are excluded from the totals above; empty/omitted when everything converted.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "pending_valuation": {
            "description": "`pending_valuation` counts the business-space transactions of the period that have no UAH value yet (the NBU rate of their legal date is not published, or the valuation has not run): they are left out of the totals above until valued. Omitted when 0 and in personal spaces.",
            "examples": [
              0
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/CashFlowPoint"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "total_expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "3701.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "total_income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "5400.00"
            ],
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "total_income",
          "total_expenses",
          "avg_monthly_income",
          "avg_monthly_expenses",
          "currencyInfo"
        ],
        "type": "object"
      },
      "CashFlowResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CashFlowResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/CashFlowResponse"
        }
      },
      "CatalogEntry": {
        "properties": {
          "group": {
            "type": "string"
          },
          "sample": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "group"
        ],
        "type": "object"
      },
      "CatalogEntryListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CatalogEntry"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/CatalogEntry"
          },
          "type": "array"
        }
      },
      "Category": {
        "properties": {
          "business_space_id": {
            "description": "`business_space_id` marks the subcategory of a business under “Income” in its owner's personal space: the owner's money from that business lands here. Renaming or moving it keeps the link.",
            "type": [
              "string",
              "null"
            ]
          },
          "children": {
            "items": {
              "$ref": "#/components/schemas/Category"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "color": {
            "examples": [
              "#FF9800"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "depth": {
            "type": [
              "integer",
              "null"
            ]
          },
          "display_order": {
            "type": "integer"
          },
          "emoji": {
            "description": "A single emoji for the category (native clients' icon set). Default categories get one from the seed; custom ones may have none.",
            "examples": [
              "🛒"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "The category's icon: a free Hugeicons slug from the brand category icon set, e.g. \"shopping-cart-01\". Omitted when the category has none (clients draw \"tag-01\").",
            "examples": [
              "shopping-cart-01"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "description": "The display name in the request language (Accept-Language, else the user's saved language, else uk). A built-in category that still has its seed name is translated (\"Groceries\" in English); custom and renamed categories are returned as stored.",
            "examples": [
              "Groceries"
            ],
            "type": "string"
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "space_id": {
            "type": "string"
          },
          "spending_kind": {
            "description": "Subscription or mandatory; omitted for any other category. The calendar's filter chips and the yearly subscriptions sum read it.",
            "enum": [
              "subscription",
              "mandatory",
              null
            ],
            "examples": [
              "subscription"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "system_key": {
            "description": "`system_key` identifies a built-in (seeded) category, e.g. \"food.groceries\"; stable across languages and renames. Omitted for custom categories.",
            "examples": [
              "food.groceries"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/CategoryType"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "The row version (also the ETag): send it as If-Match on PATCH / DELETE to detect concurrent edits (412).",
            "examples": [
              2
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "space_id",
          "name",
          "type",
          "is_default",
          "display_order",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "CategoryAnalyticsItem": {
        "properties": {
          "category_id": {
            "type": "string"
          },
          "category_name": {
            "description": "The display name in the request language (built-in categories translated, custom ones as stored).",
            "examples": [
              "Groceries"
            ],
            "type": "string"
          },
          "children": {
            "items": {
              "$ref": "#/components/schemas/CategoryAnalyticsItem"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "count": {
            "type": "integer"
          },
          "emoji": {
            "examples": [
              "🛒"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "net": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "percentage_of_expenses": {
            "type": "number"
          },
          "percentage_of_income": {
            "type": "number"
          }
        },
        "required": [
          "category_id",
          "category_name",
          "income",
          "expenses",
          "net",
          "count",
          "percentage_of_income",
          "percentage_of_expenses"
        ],
        "type": "object"
      },
      "CategoryAnalyticsResponse": {
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/CategoryAnalyticsItem"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "categories_count": {
            "type": "integer"
          },
          "currencyInfo": {
            "$ref": "#/components/schemas/AnalyticsCurrencyInfo"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies whose amounts could not be converted into the response currency (no exchange rate available). Those amounts are excluded from the totals above; empty/omitted when everything converted.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "net": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "pending_valuation": {
            "description": "`pending_valuation` counts the business-space transactions of the period that have no UAH value yet (the NBU rate of their legal date is not published, or the valuation has not run): they are left out of the totals above until valued. Omitted when 0 and in personal spaces.",
            "examples": [
              0
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "period": {
            "$ref": "#/components/schemas/DateRange"
          },
          "total_expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "total_income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "transactions_analyzed": {
            "type": "integer"
          },
          "uncategorized": {
            "$ref": "#/components/schemas/UncategorizedActivity"
          }
        },
        "required": [
          "uncategorized",
          "total_income",
          "total_expenses",
          "net",
          "categories_count",
          "transactions_analyzed",
          "period",
          "currencyInfo"
        ],
        "type": "object"
      },
      "CategoryAnalyticsResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CategoryAnalyticsResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/CategoryAnalyticsResponse"
        }
      },
      "CategoryEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Category"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/Category"
        }
      },
      "CategoryListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Category"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/Category"
          },
          "type": "array"
        }
      },
      "CategoryReview": {
        "properties": {
          "confidence": {
            "description": "Confidence of the choice in [0, 1].",
            "examples": [
              0.6
            ],
            "type": "number"
          },
          "needs_review": {
            "description": "Deprecated and always false: nothing is marked for review since 2026-11-10, and the marks set before then are ignored.",
            "examples": [
              false
            ],
            "type": "boolean"
          },
          "source": {
            "description": "The step that chose it: rule, memory, brand, knn, profile, model or web.",
            "enum": [
              "rule",
              "memory",
              "brand",
              "knn",
              "profile",
              "model",
              "web"
            ],
            "examples": [
              "web"
            ],
            "type": "string"
          }
        },
        "required": [
          "source",
          "confidence",
          "needs_review"
        ],
        "type": "object"
      },
      "CategorySummary": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "850.25"
            ],
            "format": "decimal",
            "type": "string"
          },
          "category_id": {
            "examples": [
              "cat_01HXYZ"
            ],
            "type": "string"
          },
          "category_name": {
            "description": "The display name in the request language (built-in categories translated, custom ones as stored).",
            "examples": [
              "Food"
            ],
            "type": "string"
          },
          "color": {
            "examples": [
              "#F59E0B"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "count": {
            "examples": [
              12
            ],
            "type": "integer"
          },
          "percentage": {
            "examples": [
              26.48
            ],
            "type": "number"
          }
        },
        "required": [
          "category_id",
          "category_name",
          "amount",
          "percentage",
          "count"
        ],
        "type": "object"
      },
      "CategoryType": {
        "enum": [
          "expense",
          "income",
          "transfer"
        ],
        "type": "string",
        "x-enum-varnames": [
          "CategoryTypeExpense",
          "CategoryTypeIncome",
          "CategoryTypeTransfer"
        ]
      },
      "Change": {
        "properties": {
          "data": {
            "description": "The object as its list endpoint returns it now (GET /v1/transactions, /v1/accounts, /v1/categories without children, /v1/budgets, /v1/recurring-transactions); absent for a delete.",
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "ID is the object's id.",
            "examples": [
              "7c9e6679-7425-40de-944b-e07fc1f90ae7"
            ],
            "type": "string"
          },
          "op": {
            "description": "Op: upsert (the object is new or changed: data is it now) or delete (gone, or no longer visible to the caller).",
            "enum": [
              "upsert",
              "delete"
            ],
            "examples": [
              "upsert"
            ],
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ObjectType"
              }
            ],
            "enum": [
              "transaction",
              "account",
              "category",
              "budget",
              "recurring_transaction"
            ],
            "examples": [
              "transaction"
            ]
          }
        },
        "required": [
          "type",
          "id",
          "op"
        ],
        "type": "object"
      },
      "ChangesResponse": {
        "properties": {
          "has_more": {
            "description": "More changes are waiting now; read again with next_cursor right away.",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Change"
            },
            "type": "array"
          },
          "next_cursor": {
            "description": "`next_cursor` continues after this page: keep it and send it next time, even when items is empty.",
            "examples": [
              "eyJjIjoiZXlKMklqb3hMQ0p6SWpvaU..."
            ],
            "type": "string"
          }
        },
        "required": [
          "items",
          "next_cursor",
          "has_more"
        ],
        "type": "object"
      },
      "ChangesResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ChangesResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/ChangesResponse"
        }
      },
      "ConnectionStatusChangedEvent": {
        "description": "The `connection.status_changed` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "id": {
                    "examples": [
                      "0193a0f1-77c2-7d4e-a1b9-3c6d2e8f4a05"
                    ],
                    "type": "string"
                  },
                  "kind": {
                    "examples": [
                      "bank"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "examples": [
                      "connection"
                    ],
                    "type": "string"
                  },
                  "provider": {
                    "examples": [
                      "monobank"
                    ],
                    "type": "string"
                  },
                  "reason": {
                    "examples": [
                      "reauth_required"
                    ],
                    "type": "string"
                  },
                  "status": {
                    "examples": [
                      "error"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "previous_attributes": {
                "description": "The old values of what changed, by field.",
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "connection.status_changed",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "CreateEndpointRequest": {
        "properties": {
          "description": {
            "type": "string"
          },
          "events": {
            "description": "The types to send (GET /v1/webhooks/event-types).",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "space_ids": {
            "description": "The spaces whose events go to it; the person must be a member of each. With an API key it may be left out: the endpoint covers the request's space (X-Space-ID), the only one it may name.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "description": "URL is where events go: HTTPS on a public address.",
            "type": "string"
          }
        },
        "required": [
          "events",
          "url"
        ],
        "type": "object"
      },
      "CreatePlaceRequest": {
        "properties": {
          "city_ref": {
            "description": "`city_ref` keeps a live pick's city under the person's Name; `provider_ref` is an Apple Place ID (\"apple:…\").",
            "examples": [
              "city:703448"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PointName"
              }
            ],
            "description": "The device's fix, with Name."
          },
          "name": {
            "examples": [
              "Coffee near work"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "pin": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PointName"
              }
            ],
            "description": "A point dropped on the map, with Name (required)."
          },
          "provider_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "ref": {
            "description": "Ref stores a result of ours: \"gers:…\" or \"city:…\", names one of the space's places (\"space:…\"), or is \"online\": the space's one place for purchases online, found or made the first time (kind online, no name).",
            "examples": [
              "city:703448"
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CreateSourceRequest": {
        "properties": {
          "is_read_only": {
            "description": "True by default: the app then changes only its rows' category, merchant, note and tags (a row can still be deleted, and the source never brings it back), and adds no rows to its accounts. A writable source's accounts take manual rows too, and its rows can be edited; a later push of the same row overwrites the edit.",
            "type": "boolean"
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SourcesKind"
              }
            ],
            "description": "What the source brings: bank, card, broker, crypto, income or other (the default). It picks the type of the source's accounts that name none.",
            "enum": [
              "bank",
              "card",
              "broker",
              "crypto",
              "income",
              "other"
            ],
            "examples": [
              "bank"
            ]
          },
          "name": {
            "description": "How the source shows in Settings › Connections, 1 to 80 characters.",
            "examples": [
              "My bank (my script)"
            ],
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateTransactionRequest": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "category_id": {
            "type": "string"
          },
          "description": {
            "maxLength": 500,
            "type": "string"
          },
          "exchange_rate": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "external_source": {
            "type": "string"
          },
          "fx_basis": {
            "description": "how amount was found from the original: reference (our rate), card (fx-quote's basis) or bank (the account's charge; it teaches the account its rate)",
            "enum": [
              "reference",
              "card",
              "bank"
            ],
            "type": "string"
          },
          "id": {
            "description": "An optional id you make up (any UUID), so a retried request doesn't create the row twice: the same id answers 200 with the stored row and the header Idempotent-Replayed: true.",
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3b"
            ],
            "type": "string"
          },
          "merchant": {
            "type": "string"
          },
          "merchant_brand_id": {
            "description": "Used by the Degroshi apps; leave it out.",
            "maxLength": 64,
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "original_amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "original_currency": {
            "type": "string"
          },
          "place": {
            "$ref": "#/components/schemas/CreatePlaceRequest"
          },
          "place_id": {
            "description": "A place of the space, or Place a choice to store with the row in the same database transaction. `place_source` says how the row got it: device, picked, receipt, merchant (approximate) or ai. Ignored while places are off (feature_flags.places).",
            "type": "string"
          },
          "place_source": {
            "enum": [
              "device",
              "picked",
              "receipt",
              "merchant",
              "ai"
            ],
            "type": "string"
          },
          "portfolio_activity_id": {
            "description": "Used by the Degroshi apps; leave it out.",
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3c"
            ],
            "type": "string"
          },
          "post_date": {
            "format": "date-time",
            "type": "string"
          },
          "project_id": {
            "description": "A project of the business space; 422 TXN_PROJECT_INVALID otherwise.",
            "type": "string"
          },
          "provider_data": {
            "additionalProperties": {},
            "type": "object"
          },
          "provider_ref": {
            "type": "string"
          },
          "provider_type": {
            "type": "string"
          },
          "recurring_occurrence": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringOccurrenceRef"
              }
            ],
            "description": "`recurring_occurrence` confirms a regular payment with this row: the row is created and the rule's occurrence on that date settled together, or neither. 404 RCR_008 (no such rule in the space), 409 RCR_031 (the rule only tracks its payments), 409 RCR_035 (a loan payment, posted as a transfer: “Pay” settles it), 409 RCR_004 (paused), 409 RCR_029 (already paid or skipped), 400 RCR_028 (not a day of its schedule)."
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionStatus"
              }
            ],
            "enum": [
              "completed",
              "pending",
              "cancelled"
            ]
          },
          "tag_ids": {
            "description": "Tags of the space to put on the row.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "transaction_date": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionsTransactionType"
              }
            ],
            "description": "income or expense: the direction of the positive `amount`.",
            "enum": [
              "income",
              "expense",
              "transfer"
            ]
          }
        },
        "required": [
          "account_id",
          "amount",
          "transaction_date",
          "type"
        ],
        "type": "object"
      },
      "CreatedEndpointResponse": {
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/EndpointResponse"
          },
          "secret": {
            "description": "Secret signs every delivery (Degroshi-Signature). The app can show it again later; an API key can only rotate it.",
            "type": "string"
          }
        },
        "required": [
          "endpoint",
          "secret"
        ],
        "type": "object"
      },
      "CreatedEndpointResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreatedEndpointResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/CreatedEndpointResponse"
        }
      },
      "DateRange": {
        "properties": {
          "from": {
            "examples": [
              "2026-03-01T00:00:00+02:00"
            ],
            "format": "date-time",
            "type": "string"
          },
          "to": {
            "examples": [
              "2026-03-31T23:59:59.999999999+03:00"
            ],
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "DayChangeResponse": {
        "properties": {
          "day": {
            "examples": [
              25
            ],
            "type": "integer"
          },
          "from": {
            "examples": [
              "2026-12-25"
            ],
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "day",
          "from"
        ],
        "type": "object"
      },
      "DayTotal": {
        "properties": {
          "count": {
            "description": "How many rows the list shows that day for the same filters (transfers and cancelled rows included, as the table shows them).",
            "examples": [
              7
            ],
            "type": "integer"
          },
          "day": {
            "examples": [
              "2026-10-30"
            ],
            "format": "date",
            "type": "string"
          },
          "earned": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "25000.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "rate_pending": {
            "description": "`rate_pending` marks a day with a business row still waiting for its NBU rate: that row counts at the display rate, so the day's sum may change.",
            "examples": [
              false
            ],
            "type": [
              "boolean",
              "null"
            ]
          },
          "spent": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "907.40"
            ],
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "day",
          "spent",
          "earned",
          "count"
        ],
        "type": "object"
      },
      "DayTotalsResponse": {
        "properties": {
          "count": {
            "description": "How many rows the list shows for the same filters: the sum of the days' counts.",
            "examples": [
              214
            ],
            "type": "integer"
          },
          "currency": {
            "description": "The display currency the amounts are in.",
            "examples": [
              "UAH"
            ],
            "type": "string"
          },
          "days": {
            "description": "The days with any money or any row, newest first: a day of transfers alone has 0 and 0 and its count.",
            "items": {
              "$ref": "#/components/schemas/DayTotal"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "earned": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "74099.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "spent": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "5953.16"
            ],
            "format": "decimal",
            "type": "string"
          },
          "unconverted": {
            "description": "Unconverted names the account currencies left out of the sums for want of a rate to the display currency (empty when everything counted).",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "currency",
          "spent",
          "earned",
          "count"
        ],
        "type": "object"
      },
      "DayTotalsResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DayTotalsResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/DayTotalsResponse"
        }
      },
      "DeleteData": {
        "properties": {
          "deleted": {
            "type": "boolean"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "deleted"
        ],
        "type": "object"
      },
      "DeleteDataEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeleteData"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/DeleteData"
        }
      },
      "DeliveryCursorMeta": {
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "description": "`next_cursor` reads the next (older) page; absent on the last.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "has_more"
        ],
        "type": "object"
      },
      "DeliveryDetail": {
        "properties": {
          "attempt_log": {
            "items": {
              "$ref": "#/components/schemas/AttemptResponse"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "delivery": {
            "$ref": "#/components/schemas/DeliverySummary"
          },
          "request": {
            "$ref": "#/components/schemas/DeliveryRequest"
          }
        },
        "required": [
          "delivery",
          "request"
        ],
        "type": "object"
      },
      "DeliveryDetailEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeliveryDetail"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/DeliveryDetail"
        }
      },
      "DeliveryPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DeliverySummary"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "meta": {
            "$ref": "#/components/schemas/DeliveryCursorMeta"
          }
        },
        "required": [
          "meta"
        ],
        "type": "object"
      },
      "DeliveryPageEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DeliverySummary"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/DeliveryCursorMeta"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data",
          "meta"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/DeliveryPage"
        }
      },
      "DeliveryRequest": {
        "properties": {
          "body": {
            "type": [
              "object",
              "null"
            ]
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": [
              "object",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "DeliverySummary": {
        "properties": {
          "attempts": {
            "description": "Attempts counts the calls so far.",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "description": "When a 2xx came back.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_id": {
            "type": "string"
          },
          "http_status": {
            "description": "HTTPStatus is the last answer's status; absent when the call got none (a timeout, DNS, TLS).",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "latency_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "next_attempt_at": {
            "description": "When a pending delivery is tried again.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "skipped"
            ],
            "type": "string"
          },
          "test": {
            "description": "Test marks a test event (POST /v1/webhooks/{id}/test).",
            "type": "boolean"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_id",
          "type",
          "test",
          "status",
          "attempts",
          "created_at"
        ],
        "type": "object"
      },
      "DeliverySummaryEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeliverySummary"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/DeliverySummary"
        }
      },
      "EndpointHealth": {
        "properties": {
          "days": {
            "description": "The last 7 days in the person's zone, oldest first, for the list's sparklines.",
            "items": {
              "$ref": "#/components/schemas/HealthDay"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "p95_latency_ms_24h": {
            "description": "The 95th percentile of the attempts' durations in the last 24 hours; absent without any.",
            "type": [
              "integer",
              "null"
            ]
          },
          "sent_24h": {
            "description": "Sent24h counts deliveries finished or still retrying in the last 24 hours; Succeeded24h those that got a 2xx.",
            "type": "integer"
          },
          "sent_7d": {
            "type": "integer"
          },
          "succeeded_24h": {
            "type": "integer"
          },
          "succeeded_7d": {
            "type": "integer"
          }
        },
        "required": [
          "sent_24h",
          "succeeded_24h",
          "sent_7d",
          "succeeded_7d"
        ],
        "type": "object"
      },
      "EndpointResponse": {
        "properties": {
          "api_version": {
            "description": "APIVersion is the payload version the endpoint is pinned to.",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "disabled_reason": {
            "description": "`disabled_reason` says why a disabled endpoint stopped: failing (no 2xx for 3 days) or owner_left (no space left).",
            "enum": [
              "failing",
              "owner_left",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "failing_since": {
            "description": "When the run of failures began; absent while healthy.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "health": {
            "$ref": "#/components/schemas/EndpointHealth"
          },
          "id": {
            "type": "string"
          },
          "last_delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeliverySummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_success_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "old_secret_until": {
            "description": "When the replaced secret stops signing; absent without an overlap.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "secret_leak": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SecretLeak"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`secret_leak` says the signing secret was found in public code and replaced; absent otherwise. The secret shown since is the new one: the receiver needs it."
          },
          "space_ids": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "state": {
            "enum": [
              "active",
              "paused",
              "disabled"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "api_version",
          "state",
          "health",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "EndpointResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EndpointResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/EndpointResponse"
        }
      },
      "EndpointResponseListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/EndpointResponse"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/EndpointResponse"
          },
          "type": "array"
        }
      },
      "ErrorBody": {
        "properties": {
          "code": {
            "description": "Machine-readable error code (see x-error-codes)",
            "examples": [
              "AUTH_001"
            ],
            "type": "string"
          },
          "correlation_id": {
            "description": "Request correlation id; include it in bug reports",
            "type": [
              "string",
              "null"
            ]
          },
          "details": {
            "additionalProperties": true,
            "description": "Additional error context",
            "type": [
              "object",
              "null"
            ]
          },
          "message": {
            "description": "Human-readable error message describing the specific error",
            "examples": [
              "Error description varies by error code"
            ],
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "ErrorResponse": {
        "description": "Error envelope written for every 4xx/5xx response.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          },
          "success": {
            "description": "Always false",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "error"
        ],
        "type": "object"
      },
      "Event": {
        "properties": {
          "api_version": {
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "object": {
            "examples": [
              "event"
            ],
            "type": "string"
          },
          "source": {
            "examples": [
              "bank_sync"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "space_id": {
            "type": "string"
          },
          "test": {
            "type": "boolean"
          },
          "type": {
            "examples": [
              "transaction.created"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test"
        ],
        "type": "object"
      },
      "EventCursorMeta": {
        "properties": {
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "has_more"
        ],
        "type": "object"
      },
      "EventEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Event"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/Event"
        }
      },
      "EventListPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "meta": {
            "$ref": "#/components/schemas/EventCursorMeta"
          }
        },
        "required": [
          "meta"
        ],
        "type": "object"
      },
      "EventListPageEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/EventCursorMeta"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data",
          "meta"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/EventListPage"
        }
      },
      "Frequency": {
        "enum": [
          "daily",
          "weekly",
          "biweekly",
          "monthly",
          "yearly"
        ],
        "type": "string",
        "x-enum-varnames": [
          "FrequencyDaily",
          "FrequencyWeekly",
          "FrequencyBiweekly",
          "FrequencyMonthly",
          "FrequencyYearly"
        ]
      },
      "GradientType": {
        "enum": [
          "linear",
          "radial",
          "conic"
        ],
        "type": "string",
        "x-enum-varnames": [
          "GradientLinear",
          "GradientRadial",
          "GradientConic"
        ]
      },
      "GrantInfo": {
        "properties": {
          "edit_scope": {
            "description": "Which operations a write grant lets the person change: own, the ones they added; all, any. The owner can change it. Sent for every role; it only matters for write.",
            "enum": [
              "own",
              "all",
              null
            ],
            "examples": [
              "own"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "grant_id": {
            "type": "string"
          },
          "owner_first_name": {
            "examples": [
              "Olena"
            ],
            "type": "string"
          },
          "owner_first_name_genitive": {
            "examples": [
              "Olena"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "owner_name": {
            "examples": [
              "Olena Shevchenko"
            ],
            "type": "string"
          },
          "people": {
            "description": "Everyone with access to the account, for its avatar group: the owner first, then every person with an active grant, the requester included, in the order they accepted. Never e-mails; invitations aren't people yet.",
            "items": {
              "$ref": "#/components/schemas/GrantPerson"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "purpose": {
            "enum": [
              "show",
              "pooled"
            ],
            "type": "string"
          },
          "role": {
            "enum": [
              "balance",
              "view",
              "write"
            ],
            "type": "string"
          }
        },
        "required": [
          "grant_id",
          "role",
          "purpose",
          "owner_name",
          "owner_first_name"
        ],
        "type": "object"
      },
      "GrantPerson": {
        "properties": {
          "avatar_url": {
            "description": "An uploaded photo's API path (load it through the API) or a sign-in provider's photo; absent: the initials.",
            "examples": [
              "https://images.example.com/taras.jpg"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "examples": [
              "Olena"
            ],
            "type": "string"
          },
          "is_owner": {
            "type": "boolean"
          },
          "name": {
            "examples": [
              "Olena Shevchenko"
            ],
            "type": "string"
          },
          "role": {
            "description": "Owner for the account's owner, else the grant's role.",
            "enum": [
              "owner",
              "balance",
              "view",
              "write"
            ],
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "name",
          "first_name",
          "role",
          "is_owner"
        ],
        "type": "object"
      },
      "HealthDay": {
        "properties": {
          "day": {
            "examples": [
              "2026-11-14"
            ],
            "format": "date",
            "type": "string"
          },
          "failed": {
            "examples": [
              1
            ],
            "type": "integer"
          },
          "p95_latency_ms": {
            "examples": [
              219
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "sent": {
            "examples": [
              46
            ],
            "type": "integer"
          }
        },
        "required": [
          "day",
          "sent",
          "failed"
        ],
        "type": "object"
      },
      "ImportCompletedEvent": {
        "description": "The `import.completed` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "account_ids": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "created": {
                    "examples": [
                      412
                    ],
                    "type": "number"
                  },
                  "date_from": {
                    "examples": [
                      "2026-01-01"
                    ],
                    "type": "string"
                  },
                  "date_to": {
                    "examples": [
                      "2026-10-31"
                    ],
                    "type": "string"
                  },
                  "deleted": {
                    "examples": [
                      0
                    ],
                    "type": "number"
                  },
                  "import_id": {
                    "examples": [
                      "0193b6e0-1a2b-7c3d-8e4f-5a6b7c8d9e0f"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "examples": [
                      "import"
                    ],
                    "type": "string"
                  },
                  "source": {
                    "examples": [
                      "file"
                    ],
                    "type": "string"
                  },
                  "updated": {
                    "examples": [
                      0
                    ],
                    "type": "number"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "import.completed",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "InterestPayout": {
        "enum": [
          "monthly",
          "quarterly",
          "at_maturity",
          "capitalized"
        ],
        "type": "string",
        "x-enum-varnames": [
          "PayoutMonthly",
          "PayoutQuarterly",
          "PayoutAtMaturity",
          "PayoutCapitalized"
        ]
      },
      "LastPaidResponse": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "349"
            ],
            "format": "decimal",
            "type": "string"
          },
          "date": {
            "examples": [
              "2026-11-15"
            ],
            "format": "date",
            "type": "string"
          },
          "transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "transaction_id",
          "date",
          "amount"
        ],
        "type": "object"
      },
      "LinkedActivityLeg": {
        "properties": {
          "chain": {
            "examples": [
              "ethereum"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "examples": [
              "USD"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "direction": {
            "description": "Direction: in, out, or self (a position of a derivative trade).",
            "enum": [
              "in",
              "out",
              "self"
            ],
            "examples": [
              "out"
            ],
            "type": "string"
          },
          "icon_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "examples": [
              "Tether USD"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "The amount of the asset that moved, always positive.",
            "examples": [
              "120.5"
            ],
            "format": "decimal",
            "type": "string"
          },
          "symbol": {
            "examples": [
              "USDT"
            ],
            "type": "string"
          },
          "value": {
            "description": "Its fiat value at the time, in Currency.",
            "examples": [
              "120.50"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "direction",
          "symbol",
          "quantity"
        ],
        "type": "object"
      },
      "LinkedActivityResponse": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "chain": {
            "description": "The network it happened on: a wallet activity's chain, or the network an exchange's deposit or withdrawal names. Absent when unknown (an exchange trade).",
            "examples": [
              "ethereum"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "chain_name": {
            "description": "Chain's display name («binance-smart-chain» → «BNB Chain»).",
            "examples": [
              "Ethereum"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "explorer_url": {
            "description": "The page of `tx_hash` in its chain's explorer; absent when the chain isn't known, then the hash is shown as copyable text.",
            "examples": [
              "https://etherscan.io/tx/0x5c50…"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "fee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkedActivityLeg"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "description": "Kind: send, receive, trade, convert, transfer, deposit, withdraw, fee, bonus, stake, unstake, borrow, repay, approve, mint, burn, other.",
            "examples": [
              "send"
            ],
            "type": "string"
          },
          "legs": {
            "items": {
              "$ref": "#/components/schemas/LinkedActivityLeg"
            },
            "type": "array"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "provider": {
            "description": "The connection's provider: \"zerion\" for a wallet, \"ccxt:\u003cvenue\u003e\" for an exchange.",
            "examples": [
              "zerion"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "confirmed",
              "pending",
              "failed"
            ],
            "examples": [
              "confirmed"
            ],
            "type": "string"
          },
          "tx_hash": {
            "description": "The on-chain transaction hash; absent when the activity has none.",
            "examples": [
              4.1754673891915774e+76
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "account_id",
          "provider",
          "kind",
          "status",
          "occurred_at",
          "legs"
        ],
        "type": "object"
      },
      "MerchantActivity": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "4360.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "brand": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BrandResponse"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The recognized brand with its logo URLs, when there is one."
          },
          "category": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MerchantCategory"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Where most of the merchant's amount went in the period."
          },
          "change_percent": {
            "description": "The change of amount against previous_amount, null when there was nothing in the previous period.",
            "examples": [
              9.5
            ],
            "type": [
              "number",
              "null"
            ]
          },
          "count": {
            "examples": [
              12
            ],
            "type": "integer"
          },
          "key": {
            "description": "Key identifies the merchant across periods and endpoints: \"p:\u003cid\u003e\" for a recognized brand, \"n:\u003cnormalized name\u003e\" otherwise.",
            "examples": [
              "n:green basket"
            ],
            "type": "string"
          },
          "name": {
            "description": "The brand's name, else the merchant's spelling used by the most operations.",
            "examples": [
              "Green Basket"
            ],
            "type": "string"
          },
          "previous_amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "3980.50"
            ],
            "format": "decimal",
            "type": "string"
          },
          "previous_count": {
            "examples": [
              10
            ],
            "type": "integer"
          }
        },
        "required": [
          "key",
          "name",
          "amount",
          "count",
          "previous_amount",
          "previous_count"
        ],
        "type": "object"
      },
      "MerchantAnalyticsResponse": {
        "properties": {
          "currencyInfo": {
            "$ref": "#/components/schemas/AnalyticsCurrencyInfo"
          },
          "from": {
            "examples": [
              "2026-10-01"
            ],
            "format": "date",
            "type": "string"
          },
          "merchants": {
            "description": "The merchants with operations in the period, the largest amount first, at most `limit`. With group_by=category, one row per merchant and category (the operation's own), at most `limit_per_category` per category, the categories largest first.",
            "items": {
              "$ref": "#/components/schemas/MerchantActivity"
            },
            "type": "array"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies without an exchange rate; their amounts are left out. Omitted when everything converted.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "others": {
            "description": "Others, with group_by=category, are per category what its listed rows leave (a category whose rows hold everything has none); empty without.",
            "items": {
              "$ref": "#/components/schemas/MerchantOthers"
            },
            "type": "array"
          },
          "pending_valuation": {
            "description": "`pending_valuation` counts the business-space operations of the period that have no UAH value yet (left out). Omitted when 0.",
            "examples": [
              0
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "previous_from": {
            "examples": [
              "2026-09-01"
            ],
            "format": "date",
            "type": "string"
          },
          "previous_to": {
            "examples": [
              "2026-09-30"
            ],
            "format": "date",
            "type": "string"
          },
          "side": {
            "description": "The side the amounts are of: expense or income.",
            "enum": [
              "expense",
              "income"
            ],
            "examples": [
              "expense"
            ],
            "type": "string"
          },
          "to": {
            "examples": [
              "2026-10-31"
            ],
            "format": "date",
            "type": "string"
          },
          "total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MerchantFigures"
              }
            ],
            "description": "Every merchant (also those past `limit`) plus unattributed."
          },
          "unattributed": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MerchantFigures"
              }
            ],
            "description": "Unattributed sums the operations that name no merchant."
          }
        },
        "required": [
          "merchants",
          "others",
          "unattributed",
          "total",
          "side",
          "from",
          "to",
          "previous_from",
          "previous_to",
          "currencyInfo"
        ],
        "type": "object"
      },
      "MerchantAnalyticsResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MerchantAnalyticsResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/MerchantAnalyticsResponse"
        }
      },
      "MerchantCategory": {
        "properties": {
          "category_id": {
            "type": "string"
          },
          "category_name": {
            "description": "The display name in the request language.",
            "examples": [
              "Groceries"
            ],
            "type": "string"
          },
          "color": {
            "examples": [
              "#1FA88C"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "emoji": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "examples": [
              "shopping-basket-01"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "category_id",
          "category_name"
        ],
        "type": "object"
      },
      "MerchantFigures": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "4360.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "count": {
            "examples": [
              12
            ],
            "type": "integer"
          },
          "previous_amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "3980.50"
            ],
            "format": "decimal",
            "type": "string"
          },
          "previous_count": {
            "examples": [
              10
            ],
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "count",
          "previous_amount",
          "previous_count"
        ],
        "type": "object"
      },
      "MerchantOthers": {
        "properties": {
          "amount": {
            "description": "The category's figure (as /v1/analytics/categories has it) minus its listed merchants: it can be negative when refunds of merchants without a purchase in the period outweigh the rest.",
            "examples": [
              "640.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "category_id": {
            "description": "The category, null for the operations without one.",
            "type": [
              "string",
              "null"
            ]
          },
          "count": {
            "description": "The category's operations of the side that its listed merchants leave.",
            "examples": [
              5
            ],
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "count"
        ],
        "type": "object"
      },
      "Meta": {
        "properties": {
          "has_next": {
            "type": "boolean"
          },
          "has_prev": {
            "type": "boolean"
          },
          "next_cursor": {
            "description": "The place after the page's last row on a list that pages by cursor (GET /v1/transactions): send it back as after for the next page. Absent on the last page and on lists that page by number only.",
            "examples": [
              "eyJ2IjoxLCJzIjoiZGF0ZV9kZXNjIn0"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "required": [
          "total",
          "page",
          "per_page",
          "total_pages",
          "has_next",
          "has_prev"
        ],
        "type": "object"
      },
      "Mode": {
        "enum": [
          "post",
          "track_only",
          "confirm"
        ],
        "type": "string",
        "x-enum-varnames": [
          "ModePost",
          "ModeTrackOnly",
          "ModeConfirm"
        ]
      },
      "MySpaceResponse": {
        "properties": {
          "id": {
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3b"
            ],
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_sandbox": {
            "description": "`is_sandbox` marks the developer sandbox, the space a dg_test_ key reaches.",
            "type": "boolean"
          },
          "kind": {
            "enum": [
              "personal",
              "business"
            ],
            "examples": [
              "personal"
            ],
            "type": "string"
          },
          "name": {
            "examples": [
              "Family"
            ],
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "admin",
              "member",
              "viewer",
              "accountant"
            ],
            "examples": [
              "owner"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "role",
          "is_default",
          "is_sandbox"
        ],
        "type": "object"
      },
      "MySpaceResponseListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/MySpaceResponse"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/MySpaceResponse"
          },
          "type": "array"
        }
      },
      "NetWorthChange": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "1450.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "percent": {
            "description": "Percent of the previous capital's size, two places; absent when the previous capital was zero.",
            "examples": [
              "1.84"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "previous_net_worth": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "79000.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "since": {
            "examples": [
              "2026-11-16T18:00:00Z"
            ],
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "since",
          "previous_net_worth",
          "amount"
        ],
        "type": "object"
      },
      "NetWorthPoint": {
        "properties": {
          "assets": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "52100.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "date": {
            "examples": [
              "2026-03-01T00:00:00Z"
            ],
            "format": "date-time",
            "type": "string"
          },
          "liabilities": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "6870.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "net_worth": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "45230.00"
            ],
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "date",
          "net_worth",
          "assets",
          "liabilities"
        ],
        "type": "object"
      },
      "NetWorthResponse": {
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "by_account": {
            "items": {
              "$ref": "#/components/schemas/AccountWithConvertedBalance"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "calculated_at": {
            "format": "date-time",
            "type": "string"
          },
          "change_24h": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/NetWorthChange"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Net_worth against 24 hours ago; absent when it can't be told (a rate of then or now is missing, or the history couldn't be read)."
          },
          "currency_info": {
            "$ref": "#/components/schemas/AccountsCurrencyInfo"
          },
          "missing_rates": {
            "description": "`missing_rates` lists account currencies without an exchange rate into base_currency; those accounts are excluded from the totals.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "net_worth": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "total_assets": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "total_liabilities": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "total_assets",
          "total_liabilities",
          "net_worth",
          "base_currency",
          "calculated_at",
          "currency_info"
        ],
        "type": "object"
      },
      "NetWorthResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NetWorthResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/NetWorthResponse"
        }
      },
      "NetWorthTimeSeriesResponse": {
        "properties": {
          "currencyInfo": {
            "$ref": "#/components/schemas/AnalyticsCurrencyInfo"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies whose amounts could not be converted into the response currency (no exchange rate available). Those amounts are excluded from the totals above; empty/omitted when everything converted.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/NetWorthPoint"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "currencyInfo"
        ],
        "type": "object"
      },
      "NetWorthTimeSeriesResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NetWorthTimeSeriesResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/NetWorthTimeSeriesResponse"
        }
      },
      "ObjectType": {
        "enum": [
          "transaction",
          "account",
          "category",
          "budget",
          "recurring_transaction"
        ],
        "type": "string",
        "x-enum-comments": {
          "TypeAccount": "GET /v1/accounts",
          "TypeBudget": "GET /v1/budgets",
          "TypeCategory": "GET /v1/categories, without children",
          "TypeRecurringTransaction": "GET /v1/recurring-transactions",
          "TypeTransaction": "GET /v1/transactions"
        },
        "x-enum-varnames": [
          "TypeTransaction",
          "TypeAccount",
          "TypeCategory",
          "TypeBudget",
          "TypeRecurringTransaction"
        ]
      },
      "OccurrenceDayTotal": {
        "properties": {
          "date": {
            "examples": [
              "2026-11-01"
            ],
            "format": "date",
            "type": "string"
          },
          "expense": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "15.99"
            ],
            "format": "decimal",
            "type": "string"
          },
          "income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "0"
            ],
            "format": "decimal",
            "type": "string"
          },
          "net": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "-15.99"
            ],
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "date",
          "income",
          "expense",
          "net"
        ],
        "type": "object"
      },
      "OccurrenceDisplay": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "15.99"
            ],
            "format": "decimal",
            "type": "string"
          },
          "currency": {
            "examples": [
              "USD"
            ],
            "type": "string"
          }
        },
        "required": [
          "currency",
          "amount"
        ],
        "type": "object"
      },
      "OccurrenceResponse": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "examples": [
              "Monobank Black"
            ],
            "type": "string"
          },
          "amount": {
            "description": "Always positive, in the account currency; Direction gives its sign (income adds to the balance, expense subtracts).",
            "examples": [
              "15.99"
            ],
            "format": "decimal",
            "type": "string"
          },
          "category_color": {
            "examples": [
              "#00BCD4"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "category_emoji": {
            "examples": [
              "🔁"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "category_icon": {
            "description": "The category's icon, a slug from the category icon set.",
            "examples": [
              "reload"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "category_name": {
            "description": "The category's display name in the request language (built-in categories translated, custom ones as stored).",
            "examples": [
              "Subscriptions"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "currency_code": {
            "examples": [
              "UAH"
            ],
            "type": "string"
          },
          "date": {
            "description": "The scheduled calendar day in the user's zone. When posted, the transaction is dated at local noon of that day.",
            "examples": [
              "2026-11-01"
            ],
            "format": "date",
            "type": "string"
          },
          "description": {
            "examples": [
              "Netflix"
            ],
            "type": "string"
          },
          "direction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionsTransactionDirection"
              }
            ],
            "examples": [
              "expense"
            ]
          },
          "display": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/OccurrenceDisplay"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The amount in the display currency the device sent (X-Display-Currency), converted at today's rate and rounded to cents; null when that is the account currency, none was sent or there is no rate. Clients show it first and amount as the second line."
          },
          "frequency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Frequency"
              }
            ],
            "examples": [
              "monthly"
            ]
          },
          "is_due": {
            "description": "True when the date is today or earlier in the user's zone: the hourly processor posts the occurrence on its next run.",
            "examples": [
              false
            ],
            "type": "boolean"
          },
          "kind": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RecurringTransactionsKind"
                  }
                ],
                "enum": [
                  "standard",
                  "loan_payment",
                  "transfer"
                ],
                "examples": [
                  "transfer"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Standard, loan_payment or transfer. A transfer's occurrence has type transfer and direction transfer_out, and stays out of the income and expense totals: it moves the person's own money."
          },
          "merchant": {
            "examples": [
              "Netflix"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_brand": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BrandResponse"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The enriched merchant identity of the rule, when known."
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Mode"
              }
            ],
            "description": "The rule's: confirm, post (the server writes the operation) or track_only (it waits for the account's own row).",
            "examples": [
              "confirm"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "description": "The business project the rule's operations get.",
            "type": [
              "string",
              "null"
            ]
          },
          "rule_id": {
            "examples": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OccurrenceStatus"
              }
            ],
            "description": "Planned (still ahead, or waiting within its window), awaiting_confirmation (a confirm rule's payment day came and nobody confirmed or skipped it yet: never paid, never spent), paid, skipped, missing (a track_only payment whose window closed with no row) or paused (the rule was paused on that day). Past items come only with with_past.",
            "examples": [
              "planned"
            ]
          },
          "to_account_id": {
            "description": "`to_account_id` and `to_account_name` are the loan a loan_payment pays, or the account a transfer goes to.",
            "type": [
              "string",
              "null"
            ]
          },
          "to_account_name": {
            "examples": [
              "Savings"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_id": {
            "description": "The row that settled the occurrence (paid), when known.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionsTransactionType"
              }
            ],
            "examples": [
              "expense"
            ]
          },
          "wait_until": {
            "description": "The last day a track_only rule waits for the row (null for post).",
            "examples": [
              "2026-11-22"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "rule_id",
          "date",
          "is_due",
          "amount",
          "currency_code",
          "type",
          "direction",
          "frequency",
          "description",
          "account_id",
          "account_name",
          "mode",
          "status"
        ],
        "type": "object"
      },
      "OccurrenceStatus": {
        "enum": [
          "planned",
          "paid",
          "skipped",
          "missing",
          "paused",
          "awaiting_confirmation"
        ],
        "type": "string",
        "x-enum-varnames": [
          "StatusPlanned",
          "StatusPaid",
          "StatusSkipped",
          "StatusMissing",
          "StatusPaused",
          "StatusAwaitingConfirmation"
        ]
      },
      "OccurrenceTotals": {
        "properties": {
          "currency": {
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "days": {
            "description": "The same totals per day with occurrences, in date order.",
            "items": {
              "$ref": "#/components/schemas/OccurrenceDayTotal"
            },
            "type": "array"
          },
          "expense": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "84.97"
            ],
            "format": "decimal",
            "type": "string"
          },
          "income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "1200"
            ],
            "format": "decimal",
            "type": "string"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies without a rate into the display currency; their occurrences are left out of the totals.",
            "examples": [
              [
                "MDL"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "net": {
            "description": "Income minus expense.",
            "examples": [
              "1115.03"
            ],
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "income",
          "expense",
          "net",
          "days"
        ],
        "type": "object"
      },
      "OccurrencesResponse": {
        "properties": {
          "from": {
            "description": "From and To are the evaluated window (calendar days, both included).",
            "examples": [
              "2026-10-19"
            ],
            "format": "date",
            "type": "string"
          },
          "occurrences": {
            "items": {
              "$ref": "#/components/schemas/OccurrenceResponse"
            },
            "type": "array"
          },
          "timezone": {
            "description": "The zone the days are evaluated in: the request's user zone (the chosen one, else the device's X-Timezone).",
            "examples": [
              "Europe/Kyiv"
            ],
            "type": "string"
          },
          "to": {
            "examples": [
              "2026-11-18"
            ],
            "format": "date",
            "type": "string"
          },
          "totals": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/OccurrenceTotals"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "In the display currency the device sent (X-Display-Currency); null when it sent none."
          }
        },
        "required": [
          "from",
          "to",
          "timezone",
          "occurrences"
        ],
        "type": "object"
      },
      "OccurrencesResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OccurrencesResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/OccurrencesResponse"
        }
      },
      "PlacesKind": {
        "enum": [
          "poi",
          "city",
          "country",
          "pin",
          "online"
        ],
        "type": "string",
        "x-enum-comments": {
          "KindCity": "a city (GeoNames)",
          "KindCountry": "a country only",
          "KindOnline": "a purchase online",
          "KindPOI": "a public place from the reference data",
          "KindPin": "the person's own point: the device's rounded fix or a pin they dropped"
        },
        "x-enum-varnames": [
          "KindPOI",
          "KindCity",
          "KindCountry",
          "KindPin",
          "KindOnline"
        ]
      },
      "PointName": {
        "properties": {
          "lat": {
            "examples": [
              50.447
            ],
            "type": [
              "number",
              "null"
            ]
          },
          "lng": {
            "examples": [
              30.522
            ],
            "type": [
              "number",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PossibleDuplicate": {
        "properties": {
          "external_id": {
            "type": "string"
          },
          "matches": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "external_id"
        ],
        "type": "object"
      },
      "Precision": {
        "enum": [
          "exact",
          "city",
          "country"
        ],
        "type": "string",
        "x-enum-varnames": [
          "PrecisionExact",
          "PrecisionCity",
          "PrecisionCountry"
        ]
      },
      "PushBatchRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PushItem"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "PushBatchResponse": {
        "properties": {
          "possible_duplicates": {
            "items": {
              "$ref": "#/components/schemas/PossibleDuplicate"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PushItemResult"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PushBatchResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PushBatchResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/PushBatchResponse"
        }
      },
      "PushItem": {
        "properties": {
          "account": {
            "description": "The external id of one of the source's accounts.",
            "examples": [
              "pumb-4417"
            ],
            "type": "string"
          },
          "amount": {
            "description": "A signed decimal string in the account's currency: negative is money out. At most 4 decimals; not 0.",
            "examples": [
              "-642.30"
            ],
            "type": "string"
          },
          "category_hint": {
            "description": "A free word that helps categorize the row (groceries, taxi…).",
            "examples": [
              "groceries"
            ],
            "type": "string"
          },
          "date": {
            "description": "A calendar day (YYYY-MM-DD) when the time is unknown; send it or `occurred_at`.",
            "examples": [
              "2026-11-06"
            ],
            "format": "date",
            "type": "string"
          },
          "deleted": {
            "description": "True to remove the row (a cancelled operation).",
            "type": "boolean"
          },
          "description": {
            "examples": [
              "GREEN BASKET KYIV"
            ],
            "type": "string"
          },
          "external_id": {
            "description": "The row's id in your system, 1 to 200 characters, unique within its account.",
            "examples": [
              "pumb-2026-11-06-000123"
            ],
            "type": "string"
          },
          "merchant": {
            "description": "Where the money went. A later push changes it only while the row has none: the person's choice is kept.",
            "examples": [
              "Green Basket"
            ],
            "type": "string"
          },
          "note": {
            "description": "The row's note. A later push changes it only while the row has none: a note the person wrote is kept.",
            "type": "string"
          },
          "occurred_at": {
            "description": "A moment with its offset (RFC 3339); send it or `date`.",
            "examples": [
              "2026-11-06T17:05:00+02:00"
            ],
            "type": "string"
          },
          "original": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PushOriginal"
              }
            ],
            "description": "What a purchase in another currency cost there."
          },
          "replaces": {
            "description": "The external id of the pending row this booked row replaces, when your bank gives a booked row a new id.",
            "type": "string"
          },
          "status": {
            "description": "Booked (default) or pending; a pending row is replaced when the same external id comes booked.",
            "enum": [
              "booked",
              "pending"
            ],
            "examples": [
              "booked"
            ],
            "type": "string"
          },
          "transfer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PushTransfer"
              }
            ],
            "description": "Transfer marks the row as one leg of a transfer between two of the person's accounts."
          }
        },
        "type": "object"
      },
      "PushItemError": {
        "properties": {
          "code": {
            "examples": [
              "SRC_006"
            ],
            "type": "string"
          },
          "field": {
            "examples": [
              "amount"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "PushItemResult": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PushItemError"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_id": {
            "type": "string"
          },
          "id": {
            "description": "The transaction's id in Degroshi (absent when failed).",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "Created, updated, unchanged, deleted or failed.",
            "enum": [
              "created",
              "updated",
              "unchanged",
              "deleted",
              "failed"
            ],
            "examples": [
              "created"
            ],
            "type": "string"
          }
        },
        "required": [
          "external_id",
          "status"
        ],
        "type": "object"
      },
      "PushItemResultEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PushItemResult"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/PushItemResult"
        }
      },
      "PushOriginal": {
        "properties": {
          "amount": {
            "examples": [
              "-15.40"
            ],
            "type": "string"
          },
          "currency": {
            "examples": [
              "USD"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PushTransfer": {
        "properties": {
          "account": {
            "examples": [
              "pumb-4417-savings"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PushedPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PushedRow"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next_cursor": {
            "description": "`next_cursor` fetches the next (older) page; absent on the last one.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PushedPageEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PushedPage"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/PushedPage"
        }
      },
      "PushedRow": {
        "properties": {
          "amount": {
            "description": "Signed, in the account's currency (negative is money out).",
            "examples": [
              "-642.30"
            ],
            "type": "string"
          },
          "external_id": {
            "examples": [
              "pumb-2026-11-06-000123"
            ],
            "type": "string"
          },
          "id": {
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3b"
            ],
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "removed": {
            "description": "True for a deleted row: deleted by a push, or by the person in the app (a push never brings it back).",
            "examples": [
              false
            ],
            "type": "boolean"
          },
          "status": {
            "description": "Booked, pending, or cancelled (a pending row never booked within 14 days).",
            "enum": [
              "booked",
              "pending",
              "cancelled"
            ],
            "examples": [
              "booked"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "external_id",
          "id",
          "amount",
          "occurred_at",
          "status",
          "removed",
          "updated_at"
        ],
        "type": "object"
      },
      "ReactionsSummary": {
        "properties": {
          "comments": {
            "description": "How many comments it has.",
            "examples": [
              2
            ],
            "type": "integer"
          },
          "glyph": {
            "description": "The latest reaction by anyone; omitted without one.",
            "enum": [
              "thanks",
              "ok",
              "question",
              "later",
              null
            ],
            "examples": [
              "thanks"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "open_question": {
            "description": "The latest question glyph has no comment from another member after it.",
            "type": "boolean"
          }
        },
        "required": [
          "comments",
          "open_question"
        ],
        "type": "object"
      },
      "RecurringDueEvent": {
        "description": "The `recurring.due` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "account_id": {
                    "examples": [
                      "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18"
                    ],
                    "type": "string"
                  },
                  "amount": {
                    "examples": [
                      "399.00"
                    ],
                    "type": "string"
                  },
                  "date": {
                    "examples": [
                      "2026-11-10"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "examples": [
                      "recurring_occurrence"
                    ],
                    "type": "string"
                  },
                  "rule_id": {
                    "examples": [
                      "0193a3e4-5f6a-7b8c-9d0e-1f2a3b4c5d6e"
                    ],
                    "type": "string"
                  },
                  "transaction_id": {
                    "examples": [
                      "0193b7f4-1d2e-7f3a-8b4c-5d6e7f8a9b0c"
                    ],
                    "type": "string"
                  },
                  "type": {
                    "examples": [
                      "expense"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "recurring.due",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "RecurringOccurrenceRef": {
        "properties": {
          "date": {
            "examples": [
              "2026-11-20"
            ],
            "format": "date",
            "type": "string"
          },
          "rule_id": {
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e40"
            ],
            "type": "string"
          }
        },
        "required": [
          "date",
          "rule_id"
        ],
        "type": "object"
      },
      "RecurringResponse": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "amount_changes": {
            "description": "The rule's amount from each day on, newest first (the last 12, the original included).",
            "items": {
              "$ref": "#/components/schemas/AmountChangeResponse"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "description": "The user id of the member who made the rule; omitted for older rules and when their account was deleted.",
            "examples": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "created_by_name": {
            "description": "The creator's first name (else the local part of their email), also for members who have left the space; omitted with created_by.",
            "examples": [
              "Marko"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "day_changes": {
            "description": "The days a monthly rule's occurrences moved to, oldest first. From each change's `from` on, occurrences fall on its `day`, a short month taking its last day; before it, on the day they had. Omitted while the rule keeps its start date's day.",
            "items": {
              "$ref": "#/components/schemas/DayChangeResponse"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "end_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "frequency": {
            "$ref": "#/components/schemas/Frequency"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_variable": {
            "description": "The rule's amounts differ by more than 2% (show the average as approximate).",
            "examples": [
              false
            ],
            "type": "boolean"
          },
          "kind": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RecurringTransactionsKind"
                  }
                ],
                "enum": [
                  "standard",
                  "loan_payment",
                  "transfer"
                ],
                "examples": [
                  "transfer"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "standard, or loan_payment for a loan's repayment."
          },
          "last_paid": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LastPaidResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_brand": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BrandResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Mode"
              }
            ],
            "description": "Confirm, post (the server writes the operation) or track_only (it waits for the account's own row). A loan payment is never confirm.",
            "examples": [
              "confirm"
            ]
          },
          "next_run_at": {
            "format": "date-time",
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid_average_3m": {
            "description": "The mean of the linked rows' amounts dated in the last 3 months; null without any.",
            "examples": [
              "349"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_count_3m": {
            "examples": [
              3
            ],
            "type": "integer"
          },
          "paused_at": {
            "description": "When the rule was paused: set whenever is_active turns false (by a person, the processor or the account's archiving), omitted while active and for rules paused before 2026-11 (the day wasn't recorded).",
            "examples": [
              "2026-10-10T08:15:00Z"
            ],
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "description": "The business project the rule's operations get.",
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_days_before": {
            "examples": [
              1
            ],
            "type": "integer"
          },
          "reminder_enabled": {
            "description": "`reminder_enabled` and `reminder_days_before` are the rule's reminder (0 = on the day, at 9:00).",
            "examples": [
              true
            ],
            "type": "boolean"
          },
          "space_id": {
            "type": "string"
          },
          "start_date": {
            "format": "date-time",
            "type": "string"
          },
          "to_account_id": {
            "description": "The loan a loan_payment pays, or the account a transfer goes to.",
            "type": [
              "string",
              "null"
            ]
          },
          "to_amount": {
            "description": "What arrives on a transfer's account in another currency; omitted in one currency.",
            "examples": [
              "100"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/TransactionsTransactionType"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "The row version (also the ETag): send it as If-Match on PATCH / DELETE / resume / post / skip to detect concurrent edits (412).",
            "examples": [
              5
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "space_id",
          "account_id",
          "amount",
          "type",
          "description",
          "frequency",
          "start_date",
          "next_run_at",
          "is_active",
          "created_at",
          "updated_at",
          "mode",
          "reminder_enabled",
          "reminder_days_before",
          "paid_count_3m",
          "is_variable"
        ],
        "type": "object"
      },
      "RecurringResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RecurringResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/RecurringResponse"
        }
      },
      "RecurringResponseListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/RecurringResponse"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/RecurringResponse"
          },
          "type": "array"
        }
      },
      "RecurringTransactionsKind": {
        "enum": [
          "standard",
          "loan_payment",
          "transfer"
        ],
        "type": "string",
        "x-enum-varnames": [
          "KindStandard",
          "KindLoanPayment",
          "KindTransfer"
        ]
      },
      "ResendRangeRequest": {
        "properties": {
          "from": {
            "format": "date-time",
            "type": "string"
          },
          "to": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "ResendRangeResponse": {
        "properties": {
          "queued": {
            "type": "integer"
          }
        },
        "required": [
          "queued"
        ],
        "type": "object"
      },
      "ResendRangeResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ResendRangeResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/ResendRangeResponse"
        }
      },
      "RotateSecretRequest": {
        "properties": {
          "overlap_hours": {
            "enum": [
              0,
              1,
              24,
              72
            ],
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SandboxResetEvent": {
        "description": "The `sandbox.reset` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "object": {
                    "examples": [
                      "sandbox_reset"
                    ],
                    "type": "string"
                  },
                  "origin": {
                    "examples": [
                      "api"
                    ],
                    "type": "string"
                  },
                  "seed_version": {
                    "examples": [
                      1
                    ],
                    "type": "number"
                  },
                  "seeded_at": {
                    "examples": [
                      "2026-11-16T09:00:00Z"
                    ],
                    "type": "string"
                  },
                  "space_id": {
                    "examples": [
                      "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "sandbox.reset",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "SandboxResponse": {
        "properties": {
          "name": {
            "type": "string"
          },
          "resets_left_today": {
            "description": "`resets_left_today` counts the resets left in the last 24 hours (at most 20).",
            "examples": [
              20
            ],
            "type": "integer"
          },
          "seed_version": {
            "description": "`seed_version` names the demo data's contents; it changes when the seed does.",
            "examples": [
              1
            ],
            "type": "integer"
          },
          "seeded_at": {
            "description": "The last seed: the sandbox's creation or its last reset.",
            "format": "date-time",
            "type": "string"
          },
          "space_id": {
            "type": "string"
          }
        },
        "required": [
          "space_id",
          "name",
          "seeded_at",
          "seed_version",
          "resets_left_today"
        ],
        "type": "object"
      },
      "SandboxResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SandboxResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/SandboxResponse"
        }
      },
      "SecretLeak": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "URL is the public page where it was found; null when the report named none.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "at"
        ],
        "type": "object"
      },
      "SecretResponse": {
        "properties": {
          "old_secret_until": {
            "description": "When the replaced secret stops signing; absent without an overlap.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "secret"
        ],
        "type": "object"
      },
      "SecretResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SecretResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/SecretResponse"
        }
      },
      "SharedWith": {
        "properties": {
          "avatar_url": {
            "examples": [
              "https://images.example.com/taras.jpg"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "examples": [
              "taras@example.com"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "examples": [
              "Taras"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "grant_id": {
            "type": "string"
          },
          "name": {
            "examples": [
              "Taras Kovalenko"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "purpose": {
            "enum": [
              "show",
              "pooled"
            ],
            "type": "string"
          },
          "role": {
            "enum": [
              "balance",
              "view",
              "write"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "invited",
              "active"
            ],
            "type": "string"
          },
          "user_id": {
            "description": "`user_id` and `avatar_url` are the person's once they accepted.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "grant_id",
          "role",
          "purpose",
          "status"
        ],
        "type": "object"
      },
      "SourceResponse": {
        "properties": {
          "account_count": {
            "examples": [
              2
            ],
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "id": {
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3b"
            ],
            "type": "string"
          },
          "is_read_only": {
            "type": "boolean"
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SourcesKind"
              }
            ],
            "enum": [
              "bank",
              "card",
              "broker",
              "crypto",
              "income",
              "other"
            ],
            "examples": [
              "bank"
            ]
          },
          "last_push_at": {
            "description": "When the source last pushed transactions or balances; absent before the first push.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "examples": [
              "My bank (my script)"
            ],
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Status"
              }
            ],
            "enum": [
              "active",
              "paused"
            ],
            "examples": [
              "active"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "is_read_only",
          "status",
          "account_count",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "SourceResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SourceResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/SourceResponse"
        }
      },
      "SourceResponseListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SourceResponse"
            },
            "type": "array"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "items": {
            "$ref": "#/components/schemas/SourceResponse"
          },
          "type": "array"
        }
      },
      "SourcesKind": {
        "enum": [
          "bank",
          "card",
          "broker",
          "crypto",
          "income",
          "other"
        ],
        "type": "string",
        "x-enum-varnames": [
          "KindBank",
          "KindCard",
          "KindBroker",
          "KindCrypto",
          "KindIncome",
          "KindOther"
        ]
      },
      "SpendingResponse": {
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/CategorySummary"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "currencyInfo": {
            "$ref": "#/components/schemas/AnalyticsCurrencyInfo"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies whose amounts could not be converted into the response currency (no exchange rate available). Those amounts are excluded from the totals above; empty/omitted when everything converted.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "pending_valuation": {
            "description": "`pending_valuation` counts the business-space transactions of the period that have no UAH value yet (the NBU rate of their legal date is not published, or the valuation has not run): they are left out of the totals above until valued. Omitted when 0 and in personal spaces.",
            "examples": [
              0
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "period": {
            "$ref": "#/components/schemas/DateRange"
          },
          "total_expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "3210.75"
            ],
            "format": "decimal",
            "type": "string"
          },
          "uncategorized": {
            "$ref": "#/components/schemas/UncategorizedSpending"
          }
        },
        "required": [
          "total_expenses",
          "uncategorized",
          "period",
          "currencyInfo"
        ],
        "type": "object"
      },
      "SpendingResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SpendingResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/SpendingResponse"
        }
      },
      "StatsDay": {
        "properties": {
          "after_retry": {
            "examples": [
              1
            ],
            "type": "integer"
          },
          "average_ms": {
            "examples": [
              201
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "day": {
            "examples": [
              "2026-11-14"
            ],
            "format": "date",
            "type": "string"
          },
          "delivered": {
            "examples": [
              44
            ],
            "type": "integer"
          },
          "failed": {
            "examples": [
              1
            ],
            "type": "integer"
          },
          "max_ms": {
            "examples": [
              30000
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "min_ms": {
            "description": "`min_ms`, `average_ms`, `p95_ms` and `max_ms` are the day's calls' durations; absent on a day without calls.",
            "examples": [
              92
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "p95_ms": {
            "examples": [
              244
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "retrying": {
            "examples": [
              0
            ],
            "type": "integer"
          },
          "sent": {
            "description": "Sent counts the deliveries made that day (at least one call): Delivered on the first call, `after_retry` later, Failed given up, Retrying still being retried.",
            "examples": [
              46
            ],
            "type": "integer"
          }
        },
        "required": [
          "day",
          "sent",
          "delivered",
          "after_retry",
          "failed",
          "retrying"
        ],
        "type": "object"
      },
      "StatsFigures": {
        "properties": {
          "after_retry": {
            "examples": [
              1
            ],
            "type": "integer"
          },
          "average_ms": {
            "examples": [
              201
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "delivered": {
            "examples": [
              44
            ],
            "type": "integer"
          },
          "failed": {
            "examples": [
              1
            ],
            "type": "integer"
          },
          "max_ms": {
            "examples": [
              30000
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "min_ms": {
            "description": "`min_ms`, `average_ms`, `p95_ms` and `max_ms` are the day's calls' durations; absent on a day without calls.",
            "examples": [
              92
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "p95_ms": {
            "examples": [
              244
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "retrying": {
            "examples": [
              0
            ],
            "type": "integer"
          },
          "sent": {
            "description": "Sent counts the deliveries made that day (at least one call): Delivered on the first call, `after_retry` later, Failed given up, Retrying still being retried.",
            "examples": [
              46
            ],
            "type": "integer"
          }
        },
        "required": [
          "sent",
          "delivered",
          "after_retry",
          "failed",
          "retrying"
        ],
        "type": "object"
      },
      "StatsResponse": {
        "properties": {
          "days": {
            "items": {
              "$ref": "#/components/schemas/StatsDay"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "from": {
            "examples": [
              "2026-11-08"
            ],
            "format": "date",
            "type": "string"
          },
          "to": {
            "examples": [
              "2026-11-14"
            ],
            "format": "date",
            "type": "string"
          },
          "total": {
            "$ref": "#/components/schemas/StatsFigures"
          }
        },
        "required": [
          "from",
          "to",
          "total"
        ],
        "type": "object"
      },
      "StatsResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StatsResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/StatsResponse"
        }
      },
      "Status": {
        "enum": [
          "active",
          "paused"
        ],
        "type": "string",
        "x-enum-varnames": [
          "StatusActive",
          "StatusPaused"
        ]
      },
      "SummaryResponse": {
        "properties": {
          "currencyInfo": {
            "$ref": "#/components/schemas/AnalyticsCurrencyInfo"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies whose amounts could not be converted into the response currency (no exchange rate available). Those amounts are excluded from the totals above; empty/omitted when everything converted.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "net_savings": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "2209.75"
            ],
            "format": "decimal",
            "type": "string"
          },
          "pending_valuation": {
            "description": "`pending_valuation` counts the business-space transactions of the period that have no UAH value yet (the NBU rate of their legal date is not published, or the valuation has not run): they are left out of the totals above until valued. Omitted when 0 and in personal spaces.",
            "examples": [
              0
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "period": {
            "$ref": "#/components/schemas/DateRange"
          },
          "savings_rate": {
            "examples": [
              0.407
            ],
            "type": "number"
          },
          "top_expense_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CategorySummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "3210.75"
            ],
            "format": "decimal",
            "type": "string"
          },
          "total_income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "5420.50"
            ],
            "format": "decimal",
            "type": "string"
          },
          "transaction_count": {
            "examples": [
              47
            ],
            "type": "integer"
          }
        },
        "required": [
          "total_income",
          "total_expenses",
          "net_savings",
          "savings_rate",
          "transaction_count",
          "period",
          "currencyInfo"
        ],
        "type": "object"
      },
      "SummaryResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SummaryResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/SummaryResponse"
        }
      },
      "TestEventRequest": {
        "properties": {
          "payload": {
            "description": "The event's data to send instead of its sample, where test payloads are on: a JSON object of at most 64 KB with the event's shape (its sample's fields and types). Absent: the event's sample.",
            "type": "object"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "TransactionAmountInfo": {
        "properties": {
          "currencyCode": {
            "type": "string"
          },
          "decimalDigits": {
            "type": "integer"
          },
          "decimalPlaces": {
            "type": "integer"
          },
          "symbol": {
            "type": "string"
          },
          "value": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "value",
          "symbol",
          "decimalPlaces",
          "decimalDigits",
          "currencyCode"
        ],
        "type": "object"
      },
      "TransactionAmountsResponse": {
        "properties": {
          "inAccountCurrency": {
            "$ref": "#/components/schemas/TransactionAmountInfo"
          },
          "inBaseCurrency": {
            "$ref": "#/components/schemas/TransactionAmountInfo"
          },
          "inTransactionCurrency": {
            "$ref": "#/components/schemas/TransactionAmountInfo"
          }
        },
        "required": [
          "inTransactionCurrency",
          "inAccountCurrency",
          "inBaseCurrency"
        ],
        "type": "object"
      },
      "TransactionCreatedEvent": {
        "description": "The `transaction.created` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransactionResponse"
                  },
                  {
                    "properties": {
                      "object": {
                        "const": "transaction"
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "transaction.created",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "TransactionDeletedEvent": {
        "description": "The `transaction.deleted` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "account_id": {
                    "examples": [
                      "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18"
                    ],
                    "type": "string"
                  },
                  "deleted": {
                    "type": "boolean"
                  },
                  "id": {
                    "examples": [
                      "0193b7f2-5c1e-7a4b-9f3d-2b8e6c1a0d47"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "examples": [
                      "transaction"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "transaction.deleted",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "TransactionExternalDataResponse": {
        "properties": {
          "bankingTransactionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "providerType": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TransactionFinancialsResponse": {
        "properties": {
          "amounts": {
            "$ref": "#/components/schemas/TransactionAmountsResponse"
          },
          "creditBreakdown": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "creditMoneyUsed": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "currencyConversionDate": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "currencyConversionRate": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "ownMoneyUsed": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "postDate": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "transactionDate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "transactionDate",
          "amounts"
        ],
        "type": "object"
      },
      "TransactionListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TransactionResponse"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "meta"
        ],
        "type": "object"
      },
      "TransactionListResponseEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TransactionResponse"
            },
            "type": "array"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data",
          "meta"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/TransactionListResponse"
        }
      },
      "TransactionMetadataResponse": {
        "properties": {
          "childSplitsTotal": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "hasChildSplits": {
            "type": "boolean"
          },
          "isIncome": {
            "type": "boolean"
          },
          "isPending": {
            "type": "boolean"
          },
          "isReconciled": {
            "type": "boolean"
          },
          "isSplit": {
            "type": "boolean"
          },
          "isTransfer": {
            "type": "boolean"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "providerData": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "taxDeductible": {
            "type": "boolean"
          },
          "taxYear": {
            "type": [
              "integer",
              "null"
            ]
          },
          "transactionType": {
            "$ref": "#/components/schemas/TransactionsTransactionType"
          },
          "unallocatedAmount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "transactionType",
          "taxDeductible",
          "isPending",
          "isReconciled",
          "isSplit",
          "isTransfer",
          "isIncome",
          "hasChildSplits",
          "childSplitsTotal",
          "unallocatedAmount"
        ],
        "type": "object"
      },
      "TransactionPlace": {
        "properties": {
          "city": {
            "examples": [
              "Kyiv"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "country_code": {
            "examples": [
              "UA"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_approximate": {
            "type": "boolean"
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlacesKind"
              }
            ],
            "enum": [
              "poi",
              "city",
              "country",
              "pin",
              "online"
            ]
          },
          "precision": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Precision"
              }
            ],
            "enum": [
              "exact",
              "city",
              "country"
            ]
          },
          "title": {
            "examples": [
              "Aroma Kava"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "precision",
          "is_approximate"
        ],
        "type": "object"
      },
      "TransactionRelationshipsResponse": {
        "properties": {
          "accountId": {
            "type": "string"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "parentTransactionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "accountId"
        ],
        "type": "object"
      },
      "TransactionResponse": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": "string"
          },
          "category_color": {
            "examples": [
              "#FF9800"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "category_emoji": {
            "description": "The category's emoji (native clients' icon set).",
            "examples": [
              "🛒"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "category_icon": {
            "description": "The category's icon, a slug from the category icon set.",
            "examples": [
              "shopping-cart-01"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "category_is_transfer": {
            "description": "The category is a transfer category (“Transfers” and its children, or a custom one of type transfer), so the row counts as neither income nor spending, linked or not. Absent when false.",
            "examples": [
              false
            ],
            "type": [
              "boolean",
              "null"
            ]
          },
          "category_name": {
            "description": "The category's display name in the request language: built-in categories that keep their seed name are translated (\"Groceries\" in English), custom and renamed ones are as stored.",
            "examples": [
              "Groceries"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "category_review": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CategoryReview"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How the background categorizer chose the row's category, when it did. Its needs_review is deprecated and always false."
          },
          "counterpart_account_id": {
            "description": "`counterpart_account_id` and `counterpart_account_name` are the account of the other leg of a transfer (\"Wise → PrivatBank\"); omitted otherwise.",
            "type": [
              "string",
              "null"
            ]
          },
          "counterpart_account_name": {
            "examples": [
              "PrivatBank"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "counterpart_hidden": {
            "description": "`counterpart_hidden` marks a transfer leg whose other side is on an account the caller can't see: clients show \"Other account\", and linked_transfer_id, counterpart_account_* and fee_transaction_id (when the fee is on that account) are omitted. direction stays transfer_in/transfer_out. Also true on a leg of a cross-space transfer: its other leg lives in another space (counterpart_space).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "counterpart_space": {
            "description": "`counterpart_space` names the other leg's space of a cross-space transfer: its name, or \"Other space\" (in the request language) when the caller is not a member of it or can't see its account (counterpart_space_hidden). counterpart_space_id, counterpart_account_* and counterpart_transaction_id are set only when the caller can see it.",
            "examples": [
              "My business"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "counterpart_space_hidden": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "counterpart_space_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "counterpart_transaction_id": {
            "description": "The other leg of a cross-space transfer, in counterpart_space_id: switch to that space (X-Space-ID) to open it. Set only when the caller is a member there and can see its account.",
            "type": [
              "string",
              "null"
            ]
          },
          "counterparty_id": {
            "description": "The business counterparty the row is linked to; omitted when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "counts_as_income": {
            "description": "`counts_as_income` marks the personal leg of a cross-space transfer between a business and its owner's personal space: still a transfer, with the business's subcategory under “Income”, and counted in this space's income: an incoming leg adds its amount, an outgoing one (a top-up of the business) subtracts it; never in spending.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "description": "The user id of the space member who added the row: a manual entry, transfer, split part, statement import, Suricate action or recurring posting. Omitted for bank, wallet and exchange imports and for rows whose author was never recorded.",
            "examples": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "created_by_name": {
            "description": "The author's first name (else the local part of their email), also for members who have left the space; omitted with created_by.",
            "examples": [
              "Olena"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "cross_space_transfer_id": {
            "description": "`cross_space_transfer_id` marks a leg of a cross-space transfer (money moved between two linked spaces of the same owner, e.g. a personal card and a sole proprietor's account): both legs carry it.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "direction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionsTransactionDirection"
              }
            ],
            "description": "The sign of the always-positive amount on this account: income/transfer_in add to the balance, expense/transfer_out subtract.",
            "examples": [
              "expense"
            ]
          },
          "editable": {
            "description": "False for an operation on an account shared with the caller that their grant doesn't let them change: a balance or view grant, the account_sharing_write flag off for them, or, under edit_scope own, a row someone else added; and a read_only row. True for every other row; the space role and the row's own locks (a bank row, a split part) still apply.",
            "examples": [
              true
            ],
            "type": [
              "boolean",
              "null"
            ]
          },
          "exchange_rate": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "externalData": {
            "$ref": "#/components/schemas/TransactionExternalDataResponse"
          },
          "fee_for_transfer_id": {
            "description": "`fee_for_transfer_id` marks a transfer fee: the id of the transfer's outgoing leg (the transfer's id). Omitted for other transactions.",
            "type": [
              "string",
              "null"
            ]
          },
          "fee_transaction_id": {
            "description": "The fee expense booked with this transfer (on the source account), on both legs; omitted when the transfer has no fee.",
            "type": [
              "string",
              "null"
            ]
          },
          "financials": {
            "$ref": "#/components/schemas/TransactionFinancialsResponse"
          },
          "fx_basis": {
            "description": "How amount was found from the original: reference (our rate), card (with the account's own rate, learned from the bank's figures) or bank (the bank's figure); absent without an original or before it was recorded.",
            "enum": [
              "reference",
              "card",
              "bank",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "fx_correction_bps": {
            "description": "`fx_correction_bps` is, for a row booked at the card's rate (fx_basis card), the account's correction it was booked with, in basis points from our rate (460 = +4.6%): the transaction's card-rate hint. Absent otherwise, and once a typed charge or our rate replaced it.",
            "examples": [
              460
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "is_split": {
            "type": "boolean"
          },
          "kind": {
            "description": "\"portfolio_transfer\" for a transfer between two of the space's portfolio accounts (include_portfolio_transfers): its other fields are a list row's, `portfolio_transfer` carries the transfer, and it is read-only. Absent on a transaction.",
            "enum": [
              "portfolio_transfer",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "linked_activity": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/LinkedActivityResponse"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The wallet or exchange activity it was recorded from: network, hash with its explorer link, what moved and the fee. Omitted when it wasn't recorded from one the caller can see."
          },
          "linked_transfer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_brand": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BrandResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/TransactionMetadataResponse"
          },
          "not_income": {
            "description": "`not_income` marks money coming in that is the person's own: left out of income, budgets and recaps, still in the account's balance. Omitted when false.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "original_amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "original_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "place": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionPlace"
              },
              {
                "type": "null"
              }
            ]
          },
          "place_id": {
            "description": "`place_id`, `place_source` and Place are where the row happened: the place in the requester's language, as they may see it (another member's pin is its city); is_approximate for a place derived from a bank or CSV row. Omitted when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "place_source": {
            "enum": [
              "device",
              "picked",
              "receipt",
              "merchant",
              "ai",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "portfolio_transfer": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransferResponse"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The transfer of a row of kind \"portfolio_transfer\"."
          },
          "project_id": {
            "description": "The business project of the row or split part; omitted when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "reactions": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ReactionsSummary"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The badge of its reactions and comments in a shared space; omitted when it has neither."
          },
          "read_only": {
            "description": "`read_only` marks a row nothing may edit, delete or record (a portfolio transfer).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "recurring_rule_id": {
            "description": "The recurring rule whose occurrence this row settles; omitted when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "refund_of_id": {
            "description": "The purchase this refund gives back: linked by itself on an account pooled with someone, or by hand; “My part” splits the refund as it split the purchase. Omitted when there's no link.",
            "examples": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "relationships": {
            "$ref": "#/components/schemas/TransactionRelationshipsResponse"
          },
          "service_period_from": {
            "description": "`service_period_from` and `service_period_to` are the period a business operation pays for: the accrual P\u0026L spreads it over these days.",
            "examples": [
              "2026-10-01"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "service_period_to": {
            "examples": [
              "2027-09-30"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "space_id": {
            "type": "string"
          },
          "spent_by": {
            "description": "The user id of the participant whose own spending this row of a pooled shared account is: the share takes it whole from their part. Omitted while the share splits it.",
            "examples": [
              "550e8400-e29b-41d4-a716-446655440000"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "spent_by_name": {
            "description": "That participant's first name (as created_by_name); omitted with spent_by.",
            "examples": [
              "Taras"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "splits": {
            "items": {
              "$ref": "#/components/schemas/TransactionResponse"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "tags": {
            "description": "The transaction's tags, by name; omitted when it has none.",
            "items": {
              "$ref": "#/components/schemas/TransactionTag"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "timestamps": {
            "$ref": "#/components/schemas/TransactionTimestampsResponse"
          },
          "transaction_date": {
            "format": "date-time",
            "type": "string"
          },
          "treatment": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransactionTreatment"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax treatment of a business-space row (its class, who decided it, how sure and whether a person reviewed it); omitted in personal spaces and for rows without one (a split parent, a cancelled row, a row the worker has not reached yet)."
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionsTransactionType"
              }
            ],
            "description": "The stored type: transfer legs keep income/expense here (see direction, or metadata.transactionType, for the transfer view)."
          },
          "uah_amount": {
            "description": "UAHAmount is the legal hryvnia value of a business-space row: the amount at the official NBU rate of the account currency on the legal date (uah_rate_date, the Kyiv calendar day of transaction_date), rounded to kopecks and frozen; the amount itself on a UAH account. Omitted in personal spaces and while uah_status is pending_rate.",
            "examples": [
              "4125.00"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "uah_rate": {
            "description": "UAHRate is hryvnias per one unit of the account currency used for uah_amount (1 on a UAH account).",
            "examples": [
              "41.25"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "uah_rate_date": {
            "description": "UAHRateDate is the legal date of the valuation.",
            "examples": [
              "2026-10-23"
            ],
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "uah_status": {
            "description": "UAHStatus is the valuation state of a business-space row: ok, pending_rate (no value yet: just written, or the NBU has not published the rate of that day; reports leave the row out and count it in pending_valuation) or locked (a declared or locked period, never recomputed). Omitted in personal spaces.",
            "enum": [
              "ok",
              "pending_rate",
              "locked",
              null
            ],
            "examples": [
              "ok"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "The row version (also the ETag): send it back as If-Match on PATCH and DELETE to detect concurrent edits (412).",
            "examples": [
              4
            ],
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "space_id",
          "account_id",
          "account_name",
          "amount",
          "type",
          "direction",
          "status",
          "transaction_date",
          "description",
          "is_split",
          "created_at",
          "updated_at",
          "isDeleted",
          "metadata",
          "relationships",
          "financials",
          "externalData",
          "timestamps"
        ],
        "type": "object"
      },
      "TransactionResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TransactionResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/TransactionResponse"
        }
      },
      "TransactionStatus": {
        "enum": [
          "completed",
          "pending",
          "cancelled"
        ],
        "type": "string",
        "x-enum-varnames": [
          "StatusCompleted",
          "StatusPending",
          "StatusCancelled"
        ]
      },
      "TransactionTag": {
        "properties": {
          "color": {
            "description": "The tag's optional #RRGGBB accent.",
            "examples": [
              "#4CAF50"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "examples": [
              "019a4a3e-7c2f-7d1e-9b1a-2f0c6a5d4e3b"
            ],
            "type": "string"
          },
          "name": {
            "examples": [
              "Business trip"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "TransactionTimestampsResponse": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "TransactionTreatment": {
        "properties": {
          "affects_closed_period": {
            "description": "The row changes a period whose declaration was already due.",
            "type": "boolean"
          },
          "class": {
            "description": "The treatment; only revenue (net of refund_to_customer) feeds the single-tax base.",
            "examples": [
              "revenue"
            ],
            "type": "string"
          },
          "confidence": {
            "description": "0–1 (three decimals).",
            "examples": [
              "0.930"
            ],
            "format": "decimal",
            "type": "string"
          },
          "fiscal_receipt_missing": {
            "type": "boolean"
          },
          "fiscal_required": {
            "description": "Revenue that needs a fiscal receipt (none linked when `fiscal_receipt_missing`).",
            "type": "boolean"
          },
          "needs_review": {
            "description": "The review queue lists it.",
            "type": "boolean"
          },
          "reviewed": {
            "description": "Reviewed: a person confirmed or set it.",
            "type": "boolean"
          },
          "source": {
            "description": "Who decided it: default_rule, user_rule, linker, ai or user.",
            "enum": [
              "default_rule",
              "user_rule",
              "linker",
              "ai",
              "user"
            ],
            "examples": [
              "default_rule"
            ],
            "type": "string"
          },
          "version": {
            "description": "The treatment's version (its If-Match).",
            "examples": [
              2
            ],
            "type": "integer"
          }
        },
        "required": [
          "class",
          "source",
          "confidence",
          "reviewed",
          "needs_review",
          "fiscal_required",
          "fiscal_receipt_missing",
          "affects_closed_period",
          "version"
        ],
        "type": "object"
      },
      "TransactionUpdatedEvent": {
        "description": "The `transaction.updated` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransactionResponse"
                  },
                  {
                    "properties": {
                      "object": {
                        "const": "transaction"
                      }
                    },
                    "type": "object"
                  }
                ]
              },
              "previous_attributes": {
                "description": "The old values of what changed, by field.",
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "transaction.updated",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "TransactionsBulkUpdatedEvent": {
        "description": "The `transactions.bulk_updated` event, as an endpoint receives it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "object": {
                "properties": {
                  "batch_id": {
                    "examples": [
                      "0193b6f1-2c3d-7e4f-9a5b-6c7d8e9f0a1b"
                    ],
                    "type": "string"
                  },
                  "category_id": {
                    "examples": [
                      "0193a1c4-9e2f-7c31-b0d4-7a1e5c8f2d60"
                    ],
                    "type": "string"
                  },
                  "count": {
                    "examples": [
                      37
                    ],
                    "type": "number"
                  },
                  "object": {
                    "examples": [
                      "bulk_update"
                    ],
                    "type": "string"
                  },
                  "reason": {
                    "examples": [
                      "rule_applied"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "const": "transactions.bulk_updated",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      },
      "TransactionsTransactionDirection": {
        "enum": [
          "income",
          "expense",
          "transfer_in",
          "transfer_out"
        ],
        "type": "string",
        "x-enum-varnames": [
          "DirectionIncome",
          "DirectionExpense",
          "DirectionTransferIn",
          "DirectionTransferOut"
        ]
      },
      "TransactionsTransactionType": {
        "enum": [
          "income",
          "expense",
          "transfer"
        ],
        "type": "string",
        "x-enum-varnames": [
          "TypeIncome",
          "TypeExpense",
          "TypeTransfer"
        ]
      },
      "TransferDisplay": {
        "properties": {
          "currency": {
            "examples": [
              "UAH"
            ],
            "type": "string"
          },
          "value": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "2080.00"
            ],
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "value"
        ],
        "type": "object"
      },
      "TransferResponse": {
        "properties": {
          "asset": {
            "description": "Asset and Quantity are what moved (the quantity as the key side reports it).",
            "examples": [
              "USDT"
            ],
            "type": "string"
          },
          "chain": {
            "examples": [
              "ethereum"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "description": "The local day in the requesting user's zone.",
            "examples": [
              "2026-10-28"
            ],
            "format": "date",
            "type": "string"
          },
          "display": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransferDisplay"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Value in the display currency the device sent (X-Display-Currency), converted at today's rate and rounded to cents; absent when that is `value_currency`, none was sent or there is no value or rate. Clients show it in place of Value."
          },
          "explorer_url": {
            "description": "The page of `tx_hash` in its chain's explorer (Etherscan, Solscan, OKLink for X Layer…); absent when the chain isn't known, then the hash is shown as copyable text.",
            "examples": [
              "https://etherscan.io/tx/0x5c50…"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "from_account_id": {
            "description": "`from_account_id` and `from_account_name` are the sending account; `from_hidden` marks one the caller can't see (shown as \"another account\"), and then both are absent. To* likewise.",
            "type": [
              "string",
              "null"
            ]
          },
          "from_account_name": {
            "examples": [
              "Tangem"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "from_hidden": {
            "type": "boolean"
          },
          "id": {
            "description": "ID is the pair's key: its outgoing activity, else (that one hidden from the caller) the incoming one.",
            "type": "string"
          },
          "in_activity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "out_activity_id": {
            "description": "`out_activity_id` and `in_activity_id` are the two activities (each in its account's activity feed); absent for a side the caller can't see.",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "50"
            ],
            "format": "decimal",
            "type": "string"
          },
          "to_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_account_name": {
            "examples": [
              "OKX · Funding"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "to_hidden": {
            "type": "boolean"
          },
          "tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "description": "The fiat value at the time, in `value_currency`.",
            "examples": [
              "50.00"
            ],
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "value_currency": {
            "examples": [
              "USD"
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "occurred_at",
          "date",
          "from_hidden",
          "to_hidden",
          "asset",
          "quantity"
        ],
        "type": "object"
      },
      "TrendComparison": {
        "properties": {
          "category_id": {
            "examples": [
              "cat_01HXYZ"
            ],
            "type": "string"
          },
          "category_name": {
            "description": "The display name in the request language (built-in categories translated, custom ones as stored).",
            "examples": [
              "Transport"
            ],
            "type": "string"
          },
          "change": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "40.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "change_percent": {
            "examples": [
              10.53
            ],
            "type": "number"
          },
          "current_period": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "420.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "previous_period": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "380.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "trend": {
            "examples": [
              "up"
            ],
            "type": "string"
          }
        },
        "required": [
          "category_id",
          "category_name",
          "current_period",
          "previous_period",
          "change",
          "change_percent",
          "trend"
        ],
        "type": "object"
      },
      "TrendsResponse": {
        "properties": {
          "currencyInfo": {
            "$ref": "#/components/schemas/AnalyticsCurrencyInfo"
          },
          "missing_rates": {
            "description": "`missing_rates` lists currencies whose amounts could not be converted into the response currency (no exchange rate available). Those amounts are excluded from the totals above; empty/omitted when everything converted.",
            "examples": [
              [
                "UAH"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "pending_valuation": {
            "description": "`pending_valuation` counts the business-space transactions of the period that have no UAH value yet (the NBU rate of their legal date is not published, or the valuation has not run): they are left out of the totals above until valued. Omitted when 0 and in personal spaces.",
            "examples": [
              0
            ],
            "type": [
              "integer",
              "null"
            ]
          },
          "trends": {
            "items": {
              "$ref": "#/components/schemas/TrendComparison"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "currencyInfo"
        ],
        "type": "object"
      },
      "TrendsResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TrendsResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/TrendsResponse"
        }
      },
      "UncategorizedActivity": {
        "properties": {
          "count": {
            "examples": [
              3
            ],
            "type": "integer"
          },
          "expenses": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "120.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "income": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "0"
            ],
            "format": "decimal",
            "type": "string"
          },
          "net": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "-120.00"
            ],
            "format": "decimal",
            "type": "string"
          }
        },
        "required": [
          "income",
          "expenses",
          "net",
          "count"
        ],
        "type": "object"
      },
      "UncategorizedSpending": {
        "properties": {
          "amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "examples": [
              "120.00"
            ],
            "format": "decimal",
            "type": "string"
          },
          "count": {
            "examples": [
              3
            ],
            "type": "integer"
          },
          "percentage": {
            "examples": [
              3.74
            ],
            "type": "number"
          }
        },
        "required": [
          "amount",
          "percentage",
          "count"
        ],
        "type": "object"
      },
      "UpdateEndpointRequest": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "space_ids": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateSourceRequest": {
        "properties": {
          "name": {
            "examples": [
              "My bank"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Status"
              }
            ],
            "enum": [
              "active",
              "paused"
            ],
            "examples": [
              "paused"
            ]
          }
        },
        "type": "object"
      },
      "UpdateTransactionRequest": {
        "properties": {
          "account_id": {
            "description": "`account_id` moves a plain income or expense to another open, manual account of the space, in any currency; its balance effect moves with it. In another currency the row keeps what it was paid and is charged in the new account's currency (amount when sent, else converted at the rate of the row's day; see planCurrencyMove). TXN_ACCOUNT_CHANGE_NOT_ALLOWED for transfer legs, transfer fees and splits, TXN_ACCOUNT_NOT_MANUAL for bank-synced accounts.",
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "The edited row's amount; on a transfer with to_amount or fee_amount it is the total that leaves the source account, fee included (see `to_amount`).",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "category_id": {
            "description": "`category_id` sets the category (a category of the space); null clears it.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Description and Merchant: a change (ignoring surrounding whitespace) unlinks the merchant brand, which is looked up again; an unchanged echo keeps it.",
            "maxLength": 500,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "description": "Replaces the stored exchange rate; balances don't change. Positive (400 TXN_061); refused on transfer legs, whose rate follows their two amounts (422 TXN_011).",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "fee_amount": {
            "description": "Decimal number encoded as a string (for example \"1234.5600\"); never a JSON number.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "fee_category_id": {
            "description": "The category of a fee this edit creates (default: the space's Bank Fees category); an existing fee keeps its category.",
            "type": [
              "string",
              "null"
            ]
          },
          "fee_id": {
            "description": "The client id of the fee expense when this edit creates one (ignored when the transfer already has a fee).",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant": {
            "description": "Merchant: null clears it, as \"\" empties it.",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_brand_id": {
            "description": "Used by the Degroshi apps; leave it out.",
            "maxLength": 64,
            "type": [
              "string",
              "null"
            ]
          },
          "not_income": {
            "description": "`not_income` marks an income row as the person's own money coming in (true, “Not income”: out of income, budgets and recaps, still in the balance) or counts it as income again (false). Only an income row that isn't a transfer leg takes true (422 VAL_001 otherwise).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "note": {
            "description": "Note: null clears it, as \"\" empties it.",
            "type": [
              "string",
              "null"
            ]
          },
          "original_amount": {
            "description": "`original_amount` and `original_currency` record what a plain income or expense was paid in another currency (a card purchase abroad): original_currency sets or changes the currency (the account's own currency or \"\" clears both), original_amount the paid amount (default: the current paid amount, else the current amount). Without amount the charged amount is recomputed from the paid amount at the current exchange rate (422 TXN_063 when there is none); with amount it is kept as the bank's own figure. exchange_rate follows the two amounts. Values equal to the stored ones (amounts by value, the currency ignoring case) are echoes and change nothing: no re-conversion. null on either clears the paid amount, its currency and the rate like original_currency \"\", unless the other one sends a new value, which wins. Transfer legs and fees, splits and connected accounts' rows are refused (422 TXN_011 / TXN_ACCOUNT_CONNECTED).",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "original_currency": {
            "description": "\"\" passes binding (the clear sentinel); any other value must be an ISO 4217 code (400 VAL_001, checked by the service).",
            "examples": [
              "PLN"
            ],
            "maxLength": 3,
            "type": [
              "string",
              "null"
            ]
          },
          "place": {
            "$ref": "#/components/schemas/CreatePlaceRequest"
          },
          "place_id": {
            "description": "`place_id` moves the row to another place of the space, Place stores a new choice first, `place_source` says how (default picked); a null place_id clears the place (with the X-Update-Contract: 2 header). Ignored while places are off.",
            "type": [
              "string",
              "null"
            ]
          },
          "place_source": {
            "enum": [
              "device",
              "picked",
              "receipt",
              "merchant",
              "ai",
              null,
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "spent_by": {
            "description": "`spent_by` marks a spending row of an account shared in pooled mode as one participant's own: the share then takes it whole from their part instead of splitting it. A user id of someone in the account's share (its owner or an active pooled grantee); null clears it (back to the split). 422 TXN_SPENT_BY_NOT_ALLOWED with details.reason not_pooled | not_participant | not_spending.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionStatus"
              }
            ],
            "enum": [
              "completed",
              "pending",
              "cancelled"
            ]
          },
          "tag_ids": {
            "description": "Replaces the transaction's tags (tags of the space, at most 20); [] removes them all, absent keeps them. On a transfer it applies to the edited leg.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "to_amount": {
            "description": "`to_amount` and `fee_amount` edit the amounts of a transfer (either leg's id): with either of them the request reads like a transfer create — amount is the total that leaves the source account (fee included, default: the current one), to_amount what arrives, fee_amount the fee in the source currency (0 removes it). Absent fields keep their current value; a same-currency to_amount below amount books the difference as the fee. The fee expense is created, changed or removed to match. Rejected on transactions that are not transfer legs. Without either of them amount is the edited leg's own amount.",
            "format": "decimal",
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpsertAccountRequest": {
        "properties": {
          "currency": {
            "description": "An ISO 4217 code; it can't change after the account is created (409 SRC_004).",
            "examples": [
              "UAH"
            ],
            "type": "string"
          },
          "is_liability": {
            "description": "`is_liability` marks money owed (a loan, a credit line); default false.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "description": "The account's name in the app, 1 to 100 characters.",
            "examples": [
              "Debit card •4417"
            ],
            "type": "string"
          },
          "type": {
            "description": "The account's type; without it the source's kind picks one (bank: checking, card: debit_card, broker: investment, crypto: ewallet, else account).",
            "enum": [
              "account",
              "bonus",
              "card",
              "checking",
              "credit",
              "credit_card",
              "debit_card",
              "ewallet",
              "insurance",
              "investment",
              "loan",
              "mortgage",
              "savings",
              null,
              null
            ],
            "examples": [
              "debit_card"
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "currency",
          "name"
        ],
        "type": "object"
      },
      "UpsertAccountResponse": {
        "properties": {
          "created": {
            "description": "True when this call created the account.",
            "type": "boolean"
          },
          "external_id": {
            "examples": [
              "pumb-4417"
            ],
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "external_id",
          "created"
        ],
        "type": "object"
      },
      "UpsertAccountResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UpsertAccountResponse"
          },
          "success": {
            "description": "Always true",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "x-unwrapped": {
          "$ref": "#/components/schemas/UpsertAccountResponse"
        }
      },
      "WebhookEvent": {
        "description": "Every webhook request's body: one event. Its `id` stays the same on every retry, so drop duplicates by it.",
        "properties": {
          "api_version": {
            "description": "The endpoint's version of the event shapes.",
            "examples": [
              "2026-11-10"
            ],
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "required": [
              "object"
            ],
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "object": {
            "const": "event"
          },
          "source": {
            "description": "Who made the change: app, api, bank_sync, import, recurring, categorize, rule, budget or test. Every write of a request authenticated by an API key is api.",
            "examples": [
              "bank_sync"
            ],
            "type": "string"
          },
          "space_id": {
            "description": "Null for a test event.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "description": "True for a test event sent from the endpoint's page.",
            "type": "boolean"
          },
          "type": {
            "enum": [
              "transaction.created",
              "transaction.updated",
              "transaction.deleted",
              "transactions.bulk_updated",
              "account.balance.updated",
              "connection.status_changed",
              "import.completed",
              "budget.threshold_reached",
              "recurring.due",
              "sandbox.reset"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "api_version",
          "created",
          "space_id",
          "test",
          "source",
          "data"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "description": "A personal access token. In the reference console at docs.degroshi.com, paste a sandbox key (`dg_test_…`): the console takes sandbox keys only and answers 403 AUTH_081 to any other.",
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "contact": {
      "email": "support@degroshi.com",
      "name": "Degroshi Support"
    },
    "description": "The routes a personal access token may call, each with the scope it needs (x-required-scope; `any:read` takes any read scope, `any:token` any token). Send the token as X-API-Key and the space as X-Space-ID (optional for a token bound to one space). Send X-Display-Currency (ISO 4217) to get converted amounts and totals in that currency. Each token has its own rate limit: past it a request answers 429 (BIZ_080) with Retry-After, and every answer carries X-RateLimit-Limit, -Remaining and -Reset. v1 changes only by addition. `x-error-codes` lists the error codes these routes' families can answer, each with its HTTP statuses. `webhooks` lists the events a webhook endpoint receives, each signed in Degroshi-Signature.",
    "title": "Degroshi public API",
    "version": "1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/accounts": {
      "get": {
        "description": "The space's open accounts with their balances, or with `status=closed` the closed ones, most recently closed first, or with `status=all` both. A connected account carries `connection` (the bank, wallet or exchange that keeps it). With `updated_since` (RFC 3339) only the accounts whose details or balance changed at or after that instant, each with `changed_at`: ask with `status=all` to see closures too, and next time with the largest `changed_at` you saw.",
        "operationId": "listAccounts",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Currency code",
            "example": "USD",
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which accounts to list",
            "in": "query",
            "name": "status",
            "schema": {
              "default": "open",
              "enum": [
                "open",
                "closed",
                "all"
              ],
              "type": "string"
            }
          },
          {
            "description": "Only accounts changed (details or balance) at or after this instant, RFC 3339",
            "example": "\"2026-11-10T08:00:00Z\"",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountListResponseListEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List accounts",
        "tags": [
          "accounts"
        ],
        "x-required-scope": "accounts:read"
      }
    },
    "/v1/accounts/net-worth": {
      "get": {
        "description": "Total assets, liabilities and net worth across the space's accounts counted in net worth. Amounts are converted into `base`, which defaults to the person's preferred currency.",
        "operationId": "getAccountsNetWorth",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Base currency (default: the user's base currency)",
            "example": "UAH",
            "in": "query",
            "name": "base",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetWorthResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get net worth",
        "tags": [
          "accounts"
        ],
        "x-required-scope": "accounts:read"
      }
    },
    "/v1/accounts/{id}": {
      "get": {
        "description": "One account of the space with its balance.",
        "operationId": "getAccount",
        "parameters": [
          {
            "description": "Account ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponseEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Account row version, e.g. \\\"3\\\"; send it back as If-Match",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get account",
        "tags": [
          "accounts"
        ],
        "x-required-scope": "accounts:read"
      }
    },
    "/v1/analytics/cashflow": {
      "get": {
        "description": "Income against expenses over time, in buckets of the chosen granularity. `avg_monthly_income` and `avg_monthly_expenses` divide the totals by the calendar months in the range. Foreign-currency amounts are converted at the current exchange rate.",
        "operationId": "getAnalyticsCashFlow",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Start day (YYYY-MM-DD), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-01",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "End day (YYYY-MM-DD, inclusive), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-31",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Granularity: day, week, month, quarter, year",
            "example": "month",
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Currency code; ignored in a business space, which always answers in UAH",
            "example": "USD",
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Accounts shared with the person: mine (their part, the default) or whole (the whole account, as information)",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashFlowResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Cash flow",
        "tags": [
          "analytics"
        ],
        "x-required-scope": "analytics:read"
      }
    },
    "/v1/analytics/categories": {
      "get": {
        "description": "Income and expenses per category, with the hierarchy. Rows without a category are reported in `uncategorized`. With `aggregatedWithChildren` a parent's amounts include its subcategories. Foreign-currency amounts are converted at the current exchange rate.",
        "operationId": "getAnalyticsCategories",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Start day (YYYY-MM-DD), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-01",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "End day (YYYY-MM-DD, inclusive), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-31",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Granularity: day, week, month, quarter, year",
            "example": "month",
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Currency code; ignored in a business space, which always answers in UAH",
            "example": "USD",
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by account IDs",
            "explode": false,
            "in": "query",
            "name": "account_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "description": "Accounts shared with the person: mine (their part, the default) or whole (the whole account, as information)",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "Aggregation mode: standalone, aggregatedWithChildren, childrenOnly",
            "example": "aggregatedWithChildren",
            "in": "query",
            "name": "aggregationMode",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryAnalyticsResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Category breakdown",
        "tags": [
          "analytics"
        ],
        "x-required-scope": "analytics:read"
      }
    },
    "/v1/analytics/merchants": {
      "get": {
        "description": "The period's merchants with their amount and number of operations, against the previous period (as many calendar months before, or as many days right before). `side=expense` (default) sums expenses, with refunds reducing their merchant; `side=income` sums income.",
        "operationId": "getAnalyticsMerchants",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Start day (YYYY-MM-DD), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-10-01",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "End day (YYYY-MM-DD, inclusive)",
            "example": "2026-10-31",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "expense (default) or income",
            "in": "query",
            "name": "side",
            "schema": {
              "enum": [
                "expense",
                "income"
              ],
              "type": "string"
            }
          },
          {
            "description": "Category (subcategories included)",
            "in": "query",
            "name": "category_id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Max merchants (default 20, max 100); ignored with group_by",
            "example": 20,
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "category: one row per merchant and category, the rest of each category in others",
            "in": "query",
            "name": "group_by",
            "schema": {
              "enum": [
                "category"
              ],
              "type": "string"
            }
          },
          {
            "description": "With group_by=category, the merchants listed per category (default 3, 1 to 20)",
            "example": 3,
            "in": "query",
            "name": "limit_per_category",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Leave out the operations a recurring rule created or matched, a split part with its parent's (default false)",
            "in": "query",
            "name": "exclude_recurring",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Accounts to cover (any of them): repeat the parameter or send comma separated UUIDs",
            "explode": true,
            "in": "query",
            "name": "account_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Accounts shared with the person: mine (their part, the default) or whole (the whole account, as information)",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "Target currency (default: the device's display currency, else the user's preferred); ignored in a business space, which always answers in UAH",
            "example": "UAH",
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantAnalyticsResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Merchants of a period",
        "tags": [
          "analytics"
        ],
        "x-required-scope": "analytics:read"
      }
    },
    "/v1/analytics/net-worth": {
      "get": {
        "description": "Net worth at the end of each bucket of a date range (assets, liabilities, net worth), for the accounts counted in net worth today. Balances are converted at the current exchange rate.",
        "operationId": "getAnalyticsNetWorth",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Start day (YYYY-MM-DD), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-01",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "End day (YYYY-MM-DD, inclusive), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-31",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Accounts to cover (any of them): repeat the parameter or send comma separated UUIDs; accounts the caller can't see are left out",
            "explode": true,
            "in": "query",
            "name": "account_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Granularity: day, week, month, quarter, year",
            "example": "month",
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Currency code; ignored in a business space, which always answers in UAH",
            "example": "USD",
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Net worth counts the person's part of an account shared with them; it never takes whole. With account_ids (an account's own chart), whole shows those accounts as they are: the whole balance and every operation, an account shared with the person included",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetWorthTimeSeriesResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Net worth over time",
        "tags": [
          "analytics"
        ],
        "x-required-scope": "analytics:read"
      }
    },
    "/v1/analytics/spending": {
      "get": {
        "description": "Expenses per category for a date range, each with its share of `total_expenses`; expenses without a category are reported in `uncategorized`.",
        "operationId": "getAnalyticsSpending",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Start day (YYYY-MM-DD), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-01",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "End day (YYYY-MM-DD, inclusive), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-31",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Granularity: day, week, month, quarter, year",
            "example": "month",
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Currency code; ignored in a business space, which always answers in UAH",
            "example": "USD",
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Accounts shared with the person: mine (their part, the default) or whole (the whole account, as information)",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendingResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Spending breakdown",
        "tags": [
          "analytics"
        ],
        "x-required-scope": "analytics:read"
      }
    },
    "/v1/analytics/summary": {
      "get": {
        "description": "Income, expenses and net for a date range, converted at the current exchange rate.",
        "operationId": "getAnalyticsSummary",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Start day (YYYY-MM-DD), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-01",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "End day (YYYY-MM-DD, inclusive), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-31",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Granularity: day, week, month, quarter, year",
            "example": "month",
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Currency code; ignored in a business space, which always answers in UAH",
            "example": "USD",
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by account IDs",
            "explode": false,
            "in": "query",
            "name": "account_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "description": "Accounts shared with the person: mine (their part, the default) or whole (the whole account, as information)",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Income and expense summary",
        "tags": [
          "analytics"
        ],
        "x-required-scope": "analytics:read"
      }
    },
    "/v1/analytics/trends": {
      "get": {
        "description": "Spending per category in the requested period against the equally long period right before it. A category that fell to zero is reported with `change_percent` -100 and trend \"down\".",
        "operationId": "getAnalyticsTrends",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Start day (YYYY-MM-DD), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-01",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "End day (YYYY-MM-DD, inclusive), a local day in the user's zone (a Kyiv day in a business space)",
            "example": "2026-03-31",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Granularity: day, week, month, quarter, year",
            "example": "month",
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Accounts shared with the person: mine (their part, the default) or whole (the whole account, as information)",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrendsResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Spending trends",
        "tags": [
          "analytics"
        ],
        "x-required-scope": "analytics:read"
      }
    },
    "/v1/budgets": {
      "get": {
        "description": "The space's budgets. Each carries `period_start`/`period_end`: the budget period containing `as_of` (default: today in the person's time zone). Weekly, monthly and yearly budgets repeat from `start_date` until `end_date`; a custom budget has one period.",
        "operationId": "listBudgets",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Calendar date (YYYY-MM-DD, user's zone) selecting the period to report; defaults to today",
            "in": "query",
            "name": "as_of",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetListItemListEnvelope"
                }
              }
            },
            "description": "Budgets with their current (or as_of) period"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List budgets",
        "tags": [
          "budgets"
        ],
        "x-required-scope": "budgets:read"
      }
    },
    "/v1/budgets/{id}": {
      "get": {
        "description": "One budget with its progress for one period: the period containing `as_of`, else the current one. An allocation's `spent` is the period's expenses minus refunds in its categories, never below zero; transfers and cancelled rows never count. Foreign-currency spending is converted at the current rate.",
        "operationId": "getBudget",
        "parameters": [
          {
            "description": "Budget ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Calendar date (YYYY-MM-DD, user's zone) selecting the period to evaluate, e.g. a past period's period_start; defaults to today",
            "in": "query",
            "name": "as_of",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetResponseEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Budget row version, e.g. \\\"1\\\"; send it back as If-Match",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get budget",
        "tags": [
          "budgets"
        ],
        "x-required-scope": "budgets:read"
      }
    },
    "/v1/categories": {
      "get": {
        "description": "The space's categories as a tree: top-level categories with their children in `children`.",
        "operationId": "listCategories",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryListEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List categories",
        "tags": [
          "categories"
        ],
        "x-required-scope": "categories:read"
      }
    },
    "/v1/categories/{id}": {
      "get": {
        "description": "One category of the space.",
        "operationId": "getCategory",
        "parameters": [
          {
            "description": "Category ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Row version, e.g. \\\"2\\\"; send it back as If-Match",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get category",
        "tags": [
          "categories"
        ],
        "x-required-scope": "categories:read"
      }
    },
    "/v1/changes": {
      "get": {
        "description": "What changed in the space since a cursor, oldest first: keep a faithful copy by polling, deletions included. Without `cursor` the feed starts from the beginning (every object, then the changes); keep `next_cursor` from every page and send it next time, and while `has_more` is true read again right away. Each item is an object (`transaction`, `account`, `category`, `budget`, `recurring_transaction`) with `op` `upsert` and `data`, the object as its list endpoint returns it, or `delete`. Changes come in commit order, so a slow write never lands behind a cursor already read. Any read scope opens this route, and each type needs the scope that reads it. 410 `CHANGES_RESYNC_REQUIRED` means the cursor can't continue (access changed, 180 days passed, other `types`): read again without a cursor and replace the copy.",
        "operationId": "listChanges",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "next_cursor of the previous page; omit to start from the beginning",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Object types (any of them): transaction, account, category, budget, recurring_transaction; all the caller may read by default. Repeat the parameter or send comma separated names",
            "explode": true,
            "in": "query",
            "name": "types",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Changes per page, 1 to 500 (default 100)",
            "example": 100,
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangesResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Gone"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List what changed",
        "tags": [
          "changes"
        ],
        "x-required-scope": "any:read"
      }
    },
    "/v1/events": {
      "get": {
        "description": "The space's events of the last 30 days, newest first, as webhook endpoints receive them. A space records events from its first personal access token or webhook endpoint: every type while an active token is bound to it, otherwise the types its endpoints take. Any read scope opens this route, and each event type needs the scope that reads its object: `transactions:read` for `transaction.*`, `transactions.bulk_updated` and `import.completed`, `accounts:read` for `account.balance.updated` and `connection.status_changed`, `budgets:read` and `recurring:read` for their events. Filter with `type` and `created_gte`; `meta.has_more` says older events follow, so pass the last `id` as `starting_after`.",
        "operationId": "listEvents",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Event types (any of them): repeat the parameter or send comma separated names",
            "explode": true,
            "in": "query",
            "name": "type",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Only events created at or after this instant (RFC 3339)",
            "example": "\"2026-11-10T08:00:00Z\"",
            "in": "query",
            "name": "created_gte",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "The last event id of the previous page",
            "in": "query",
            "name": "starting_after",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Events per page, 1 to 100 (default 25)",
            "example": 25,
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventListPageEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List events",
        "tags": [
          "events"
        ],
        "x-required-scope": "any:read"
      }
    },
    "/v1/events/{id}": {
      "get": {
        "description": "One of the space's events of the last 30 days, under the same scope rules as the list.",
        "operationId": "getEvent",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Event ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get event",
        "tags": [
          "events"
        ],
        "x-required-scope": "any:read"
      }
    },
    "/v1/me/spaces": {
      "get": {
        "description": "The spaces this token is bound to, with the id to send as `X-Space-ID`, the space's kind and your role there. Any token can call it, whatever its scopes, and without `X-Space-ID`.",
        "operationId": "listMySpaces",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MySpaceResponseListEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List my spaces",
        "tags": [
          "me"
        ],
        "x-required-scope": "any:token"
      }
    },
    "/v1/recurring-transactions": {
      "get": {
        "description": "The space's recurring transactions (rules that repeat a payment or income).",
        "operationId": "listRecurringTransactions",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringResponseListEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List recurring transactions",
        "tags": [
          "recurring-transactions"
        ],
        "x-required-scope": "recurring:read"
      }
    },
    "/v1/recurring-transactions/occurrences": {
      "get": {
        "description": "Every active recurring rule's occurrences dated from `from` to `to` (days in the person's time zone, both included) that haven't been posted yet. Paused rules and dates after a rule's `end_date` are left out. `is_due` marks occurrences dated today or earlier.",
        "operationId": "listRecurringOccurrences",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "First day (YYYY-MM-DD) in the user's zone; default today",
            "example": "2026-10-19",
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Last day (YYYY-MM-DD, inclusive); default from + 30 days",
            "example": "2026-11-18",
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Also list the settled occurrences in the window",
            "in": "query",
            "name": "with_past",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OccurrencesResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List upcoming occurrences",
        "tags": [
          "recurring-transactions"
        ],
        "x-required-scope": "recurring:read"
      }
    },
    "/v1/recurring-transactions/{id}": {
      "get": {
        "description": "One recurring transaction of the space.",
        "operationId": "getRecurringTransaction",
        "parameters": [
          {
            "description": "Recurring transaction ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringResponseEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Rule version, e.g. \\\"5\\\"; send it back as If-Match",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get recurring transaction",
        "tags": [
          "recurring-transactions"
        ],
        "x-required-scope": "recurring:read"
      }
    },
    "/v1/sandbox/reset": {
      "post": {
        "description": "Puts the sandbox back to its demo data, so a test run starts clean: everything in it is deleted and seeded again; its id, keys and webhook endpoints stay, and change-feed cursors get 410 and read again. Only a sandbox key (`dg_test_`) can call it (403 `SBX_004`). 20 resets a day (429 `SBX_003` with `details.retry_after`).",
        "operationId": "resetSandbox",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Reset the sandbox",
        "tags": [
          "sandbox"
        ],
        "x-required-scope": "any:token"
      }
    },
    "/v1/sources": {
      "get": {
        "description": "The space's custom sources: the scripts and automations that push accounts, transactions and balances into Degroshi through this API, with their status, kind, number of accounts and last push.",
        "operationId": "listSources",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceResponseListEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List sources",
        "tags": [
          "sources"
        ],
        "x-required-scope": "accounts:read"
      },
      "post": {
        "description": "Add a custom source to the space (scope `sources:write`, in the “Import from your own source” and “Full access” tokens). A source is read-only by default: the app then changes only its rows' category, merchant, note and tags, and adds no rows of its own to its accounts. Each plan allows a number of sources (403 BILL_013 above it).",
        "operationId": "createSource",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Makes a retry safe: the same key with the same request within 24 hours returns the first answer (header Idempotent-Replayed: true) instead of creating again; VAL_086 for the key with another request, VAL_087 while the first still runs",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSourceRequest"
              }
            }
          },
          "description": "Source",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceResponseEnvelope"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create source",
        "tags": [
          "sources"
        ],
        "x-required-scope": "sources:write"
      }
    },
    "/v1/sources/{id}": {
      "delete": {
        "description": "Remove a source. Its accounts stay in the space as manual accounts, with every row and balance.",
        "operationId": "deleteSource",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Delete source",
        "tags": [
          "sources"
        ],
        "x-required-scope": "sources:write"
      },
      "get": {
        "description": "One custom source of the space.",
        "operationId": "getSource",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get source",
        "tags": [
          "sources"
        ],
        "x-required-scope": "accounts:read"
      },
      "patch": {
        "description": "Rename, pause or resume a source; fields left out keep their value. A paused source takes no pushes (409 SRC_002) until it is resumed.",
        "operationId": "updateSource",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSourceRequest"
              }
            }
          },
          "description": "Changes",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Update source",
        "tags": [
          "sources"
        ],
        "x-required-scope": "sources:write"
      }
    },
    "/v1/sources/{id}/accounts/{external_id}": {
      "put": {
        "description": "Create the source's account with your id for it (`external_id`, 1 to 200 characters), or update its name, type and liability flag. The type defaults from the source's kind. The currency is fixed once the account exists (409 SRC_004). Push an account before its transactions or balance.",
        "operationId": "upsertSourceAccount",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The account's id in your system",
            "in": "path",
            "name": "external_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertAccountRequest"
              }
            }
          },
          "description": "Account",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpsertAccountResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create or update a source account",
        "tags": [
          "sources"
        ],
        "x-required-scope": "sources:write"
      }
    },
    "/v1/sources/{id}/balances/batch": {
      "post": {
        "description": "Tell Degroshi what each account holds at a moment (`as_of`). The latest `as_of` wins: an older balance is skipped (`stale`). When the account's rows don't add up to the balance, the difference is booked as one balance adjustment, as when the person corrects a balance by hand.",
        "operationId": "pushSourceBalances",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Makes a retry safe: the same key with the same request within 24 hours returns the first answer (header Idempotent-Replayed: true) instead of creating again; VAL_086 for the key with another request, VAL_087 while the first still runs",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BalanceBatchRequest"
              }
            }
          },
          "description": "Balances",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceBatchResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Push balances",
        "tags": [
          "sources"
        ],
        "x-required-scope": "sources:write"
      }
    },
    "/v1/sources/{id}/transactions": {
      "get": {
        "description": "The rows Degroshi holds for one of the source's accounts (`account`, its external id), newest first, to reconcile with your system: each row's external id, signed amount, time, status (booked, pending or cancelled) and whether it was removed. `from` and `to` are days in the person's time zone; follow `next_cursor` for older rows.",
        "operationId": "listSourceTransactions",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The account's external id",
            "in": "query",
            "name": "account",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "First day (YYYY-MM-DD)",
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Last day (YYYY-MM-DD)",
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "next_cursor of the previous page",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Rows per page (default 200, at most 1000)",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushedPageEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List pushed transactions",
        "tags": [
          "sources"
        ],
        "x-required-scope": "transactions:read"
      }
    },
    "/v1/sources/{id}/transactions/batch": {
      "post": {
        "description": "Create, update or remove up to 500 rows of the source's accounts by your id for each row (`external_id`, unique within its account). Amounts are signed decimal strings in the account's currency (negative is money out), unlike `POST /v1/transactions`, which takes a positive `amount` and a `type`. A row has a moment with its offset (`occurred_at`) or a day (`date`). Each item is applied on its own: a bad item fails alone, with its reason in its result, and the response is 200. A known external id updates the row with the fields sent; `status: booked` replaces a pending row (or `replaces` names the pending row's id); a pending row never booked within 14 days is cancelled; `deleted: true` removes a row. A row the person deleted or split in the app stays as they left it, and a merchant or note the person set is kept. New rows that look like rows entered by hand are listed in `possible_duplicates`; nothing is merged. With an `Idempotency-Key` header, the same key within 24 hours returns the first answer (`Idempotent-Replayed: true`); the key with another request is 422 SRC_007.",
        "operationId": "pushSourceTransactions",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your key for this request (1 to 255 characters)",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushBatchRequest"
              }
            }
          },
          "description": "Rows",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushBatchResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Push transactions",
        "tags": [
          "sources"
        ],
        "x-required-scope": "sources:write"
      }
    },
    "/v1/sources/{id}/transactions/{account}/{external_id}": {
      "delete": {
        "description": "Remove one row, as a batch item with `deleted: true` would. 404 SRC_003 for an unknown account or row; a row already removed answers `unchanged`.",
        "operationId": "deleteSourceTransaction",
        "parameters": [
          {
            "description": "Source ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The account's external id",
            "in": "path",
            "name": "account",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The row's external id",
            "in": "path",
            "name": "external_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushItemResultEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Remove a pushed transaction",
        "tags": [
          "sources"
        ],
        "x-required-scope": "sources:write"
      }
    },
    "/v1/transactions": {
      "get": {
        "description": "The space's transactions, newest first, with filters and pagination. Split parts are nested in their parent. Each row carries its category, an explicit `direction` (income, expense, transfer_in, transfer_out) for the always-positive `amount`, its tags and, for a transfer leg, the other account. `tag_id` keeps rows carrying any of the given tags (repeated or comma separated). To catch up on changes, pass `updated_since` (RFC 3339) with `sort=updated_asc`: rows created or edited from then on, oldest change first. The row at the boundary comes again, so drop duplicates by `id` and `version`; deleted rows don't appear (the `transaction.deleted` event reports them).",
        "operationId": "listTransactions",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number",
            "example": 1,
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Items per page (max 200)",
            "example": 50,
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cursor: start right after the row a previous page's meta.next_cursor names (page is then ignored). Send the same filters and sort it was issued for; another sort is a 400. The amount sorts compare at the latest rates, so a rate change between pages can move a row across the cursor: dedupe by id, and use a date sort for an exact walk",
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With after: false reads the page without counting the matches, which is faster in a big space; meta.total and meta.total_pages are then 0, and has_next and next_cursor still say whether more rows follow. Ignored without after",
            "in": "query",
            "name": "count",
            "schema": {
              "default": true,
              "type": "boolean"
            }
          },
          {
            "description": "Filter by account ID",
            "example": "acc_01HXYZ",
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Accounts (any of them, together with account_id): repeat the parameter or send comma separated ids",
            "explode": true,
            "in": "query",
            "name": "account_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Filter by category ID",
            "example": "cat_01HXYZ",
            "in": "query",
            "name": "category_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One merchant's rows, by the key analytics and Suricate's marks give it: p:\u003cbrand id\u003e or n:\u003ctext\u003e",
            "example": "n:coffee point",
            "in": "query",
            "name": "merchant_key",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Categories (any of them, together with category_id): repeat the parameter or send comma separated ids",
            "explode": true,
            "in": "query",
            "name": "category_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "With category_id or category_ids: also match their subcategories (each whole subtree)",
            "in": "query",
            "name": "include_subcategories",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Transactions without a category (what the analytics report as uncategorized). With category_ids: the rows in any of those categories or without one; a category_id alone takes precedence over it",
            "in": "query",
            "name": "uncategorized",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Deprecated: matches no transaction. Nothing is marked for review since 2026-11-10.",
            "in": "query",
            "name": "category_review",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Filter by type: income, expense, transfer",
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Types (any of them, together with type): income, expense, transfer; repeat the parameter or send them comma separated",
            "explode": true,
            "in": "query",
            "name": "types",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Filter by status",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Statuses (any of them, together with status): completed, pending, cancelled; repeat the parameter or send them comma separated",
            "explode": true,
            "in": "query",
            "name": "statuses",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "First local day (YYYY-MM-DD) in the user's zone",
            "example": "\"2026-03-01\"",
            "in": "query",
            "name": "from_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Last local day (YYYY-MM-DD, inclusive) in the user's zone",
            "example": "\"2026-03-31\"",
            "in": "query",
            "name": "to_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Search in description",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Minimum amount",
            "in": "query",
            "name": "min_amount",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Maximum amount",
            "in": "query",
            "name": "max_amount",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Tags (any of them): repeat the parameter or send comma separated ids",
            "explode": true,
            "in": "query",
            "name": "tag_id",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Business counterparty: only the rows linked to it",
            "in": "query",
            "name": "counterparty_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Business project: only the rows of this project and its subprojects",
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Recurring rule: only the rows that settle its occurrences",
            "in": "query",
            "name": "recurring_rule_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Statement import (its session id): only the rows that committed import created",
            "in": "query",
            "name": "import_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A participant's user id: only rows of pooled shared accounts marked as their own spending",
            "in": "query",
            "name": "spent_by",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the rows at this place of the space",
            "in": "query",
            "name": "place_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the rows in this city",
            "in": "query",
            "name": "city",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the rows in this country",
            "in": "query",
            "name": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the purchases made online (true) or not online (false)",
            "in": "query",
            "name": "online",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Currency code for converted amounts",
            "example": "USD",
            "in": "query",
            "name": "currencyCode",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the rows created or edited at or after this instant (RFC 3339). With sort=updated_asc a poller pages through changes; the row at the boundary comes again, so dedupe by id and version. Deleted rows don't appear (use webhooks or GET /v1/events)",
            "example": "\"2026-11-10T08:00:00Z\"",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Order: date_desc (default, newest first), date_asc, amount_desc, amount_asc (amount in the display currency at the latest rates, unsigned; a row without a rate last), updated_asc (oldest change first)",
            "in": "query",
            "name": "sort",
            "schema": {
              "enum": [
                "date_desc",
                "date_asc",
                "amount_desc",
                "amount_asc",
                "updated_asc"
              ],
              "type": "string"
            }
          },
          {
            "description": "Business space: keep rows whose tax treatment waits for review (true) or does not (false); rows without a treatment never match",
            "in": "query",
            "name": "needs_review",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Business space: keep rows with this tax class (revenue, own_transfer_in, owner_draw…)",
            "example": "revenue",
            "in": "query",
            "name": "treatment_class",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Business space: keep rows with any of these tax classes (together with treatment_class); repeat the parameter or send them comma separated",
            "explode": true,
            "in": "query",
            "name": "treatment_classes",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Also list the transfers between the space's portfolio accounts (a wallet and an exchange) as read-only rows of kind portfolio_transfer, ordered, filtered and paged with the transactions; rows no pair can match (category, tag, counterparty, project, tax filters, another type) leave them out",
            "in": "query",
            "name": "include_portfolio_transfers",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "List a transfer inside the space once, as its outgoing leg (the incoming leg stays when the caller can't see the outgoing one). With accounts selected only a transfer between two of them is folded; one with another account keeps the selected account's own leg (one account: always its own leg)",
            "in": "query",
            "name": "one_row_per_transfer",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionListResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List transactions",
        "tags": [
          "transactions"
        ],
        "x-required-scope": "transactions:read"
      },
      "post": {
        "description": "Add a transaction to a manual account (needs the “Full access” token, scope `transactions:write`). `amount` is positive and `type` says its direction (income or expense). Completed and pending rows move the account's balance; cancelled ones don't. An optional client-made `id` makes the request safe to retry: the same id answers 200 with the stored row and the header `Idempotent-Replayed: true`. An account kept by a bank, wallet or exchange takes no rows from the API (422 TXN_ACCOUNT_CONNECTED). The response carries the row's `version`, also as `ETag`.",
        "operationId": "createTransaction",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Makes a retry safe: the same key with the same request within 24 hours returns the first answer (header Idempotent-Replayed: true) instead of creating again; VAL_086 for the key with another request, VAL_087 while the first still runs",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransactionRequest"
              }
            }
          },
          "description": "Transaction data",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponseEnvelope"
                }
              }
            },
            "description": "Replayed: the transaction with this client id already existed (header Idempotent-Replayed: true)",
            "headers": {
              "ETag": {
                "description": "Row version, e.g. \\\"1\\",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponseEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Row version, e.g. \\\"1\\",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Gone"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create transaction",
        "tags": [
          "transactions"
        ],
        "x-required-scope": "transactions:write"
      }
    },
    "/v1/transactions/day-totals": {
      "get": {
        "description": "For the rows `GET /v1/transactions` lists with the same filters: what was spent and received per day (in the person's time zone), in the display currency (`currencyCode`, else the person's), newest day first, with the period's sums. Transfers and cancelled rows count in neither. A currency with no rate to the display currency is left out and named in `unconverted`. Pagination and sorting don't apply.",
        "operationId": "getTransactionDayTotals",
        "parameters": [
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by account ID",
            "example": "acc_01HXYZ",
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Accounts (any of them, together with account_id): repeat the parameter or send comma separated ids",
            "explode": true,
            "in": "query",
            "name": "account_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Filter by category ID",
            "example": "cat_01HXYZ",
            "in": "query",
            "name": "category_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One merchant's rows, by the key analytics and Suricate's marks give it: p:\u003cbrand id\u003e or n:\u003ctext\u003e",
            "example": "n:coffee point",
            "in": "query",
            "name": "merchant_key",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Categories (any of them, together with category_id): repeat the parameter or send comma separated ids",
            "explode": true,
            "in": "query",
            "name": "category_ids",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "With category_id or category_ids: also match their subcategories (each whole subtree)",
            "in": "query",
            "name": "include_subcategories",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Transactions without a category. With category_ids: the rows in any of those categories or without one; a category_id alone takes precedence over it",
            "in": "query",
            "name": "uncategorized",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Deprecated: matches no transaction. Nothing is marked for review since 2026-11-10.",
            "in": "query",
            "name": "category_review",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Filter by type: income, expense, transfer",
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Types (any of them, together with type): income, expense, transfer; repeat the parameter or send them comma separated",
            "explode": true,
            "in": "query",
            "name": "types",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Filter by status",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Statuses (any of them, together with status): completed, pending, cancelled; repeat the parameter or send them comma separated",
            "explode": true,
            "in": "query",
            "name": "statuses",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "First local day (YYYY-MM-DD) in the user's zone",
            "example": "\"2026-10-01\"",
            "in": "query",
            "name": "from_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Last local day (YYYY-MM-DD, inclusive) in the user's zone",
            "example": "\"2026-10-31\"",
            "in": "query",
            "name": "to_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Search in description",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Minimum amount",
            "in": "query",
            "name": "min_amount",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Maximum amount",
            "in": "query",
            "name": "max_amount",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Tags (any of them): repeat the parameter or send comma separated ids",
            "explode": true,
            "in": "query",
            "name": "tag_id",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Display currency of the sums",
            "example": "UAH",
            "in": "query",
            "name": "currencyCode",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Accounts shared with the person: mine (their part, the default) or whole (the whole account, as information)",
            "in": "query",
            "name": "share",
            "schema": {
              "enum": [
                "mine",
                "whole"
              ],
              "type": "string"
            }
          },
          {
            "description": "Business counterparty: only the rows linked to it",
            "in": "query",
            "name": "counterparty_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Business project: only the rows of this project and its subprojects",
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Recurring rule: only the rows that settle its occurrences",
            "in": "query",
            "name": "recurring_rule_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Statement import (its session id): only the rows that committed import created",
            "in": "query",
            "name": "import_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A participant's user id: only rows of pooled shared accounts marked as their own spending",
            "in": "query",
            "name": "spent_by",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the rows at this place of the space",
            "in": "query",
            "name": "place_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the rows in this city",
            "in": "query",
            "name": "city",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the rows in this country",
            "in": "query",
            "name": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the purchases made online (true) or not online (false)",
            "in": "query",
            "name": "online",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Business space: keep rows whose tax treatment waits for review (true) or does not (false); rows without a treatment never match",
            "in": "query",
            "name": "needs_review",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Business space: keep rows with this tax class (revenue, own_transfer_in, owner_draw…)",
            "example": "revenue",
            "in": "query",
            "name": "treatment_class",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Business space: keep rows with any of these tax classes (together with treatment_class); repeat the parameter or send them comma separated",
            "explode": true,
            "in": "query",
            "name": "treatment_classes",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Also list the transfers between the space's portfolio accounts (a wallet and an exchange) as read-only rows of kind portfolio_transfer, ordered, filtered and paged with the transactions; rows no pair can match (category, tag, counterparty, project, tax filters, another type) leave them out",
            "in": "query",
            "name": "include_portfolio_transfers",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "List a transfer inside the space once, as its outgoing leg (the incoming leg stays when the caller can't see the outgoing one). With accounts selected only a transfer between two of them is folded; one with another account keeps the selected account's own leg (one account: always its own leg)",
            "in": "query",
            "name": "one_row_per_transfer",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DayTotalsResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Daily totals of a list",
        "tags": [
          "transactions"
        ],
        "x-required-scope": "transactions:read"
      }
    },
    "/v1/transactions/{id}": {
      "delete": {
        "description": "Delete a transaction and reverse its balance effect (needs the “Full access” token, scope `transactions:write`). Deleting one leg of a transfer deletes both legs; deleting a split deletes its parts, and a single part can't be deleted (TXN_047). A repeated delete answers 404. With `If-Match: \"\u003cversion\u003e\"` the delete applies only when the row still has that version.",
        "operationId": "deleteTransaction",
        "parameters": [
          {
            "description": "Transaction ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Expected row version (the ETag), e.g. \\",
            "in": "header",
            "name": "If-Match",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The transaction this one duplicates (a merged duplicate)",
            "in": "query",
            "name": "as_duplicate_of",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteDataEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Delete transaction",
        "tags": [
          "transactions"
        ],
        "x-required-scope": "transactions:write"
      },
      "get": {
        "description": "One transaction of the space.",
        "operationId": "getTransaction",
        "parameters": [
          {
            "description": "Transaction ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponseEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "Row version, e.g. \\\"4\\\"; send it back as If-Match",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get transaction",
        "tags": [
          "transactions"
        ],
        "x-required-scope": "transactions:read"
      },
      "patch": {
        "description": "Change a transaction (needs the “Full access” token, scope `transactions:write`); fields left out keep their value. Editing one leg of a transfer updates both. Moving a row to or from `cancelled` reverses or re-applies its balance effect. With `If-Match: \"\u003cversion\u003e\"` the change applies only when the row still has that version; otherwise 412 SYNC_VERSION_MISMATCH.",
        "operationId": "updateTransaction",
        "parameters": [
          {
            "description": "Transaction ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The space to act in. A token bound to one space may leave it out.",
            "in": "header",
            "name": "X-Space-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Expected row version (the ETag), e.g. \\",
            "in": "header",
            "name": "If-Match",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The currency to show converted amounts and totals in (ISO 4217, for example EUR). Without it they are in your account's main currency; a query parameter that names the currency (currency, currencyCode or base) wins over it.",
            "in": "header",
            "name": "X-Display-Currency",
            "required": false,
            "schema": {
              "example": "EUR",
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTransactionRequest"
              }
            }
          },
          "description": "Updated transaction data",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponseEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "New row version",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Update transaction",
        "tags": [
          "transactions"
        ],
        "x-required-scope": "transactions:write"
      }
    },
    "/v1/webhooks": {
      "get": {
        "description": "The webhook endpoints this token manages: those of the request's space alone whose every event type the token's scopes read. An endpoint set up in the app for several spaces, or with types the token can't read, isn't listed. Each comes with its health: deliveries and successes in the last 24 hours and 7 days (test events left out), p95 latency and the last delivery. The signing secret is never included.",
        "operationId": "listWebhooks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointResponseListEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List webhook endpoints",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      },
      "post": {
        "description": "An endpoint for the request's space: an HTTPS `url` on a public address (400 `WHK_031` with `details.reason`), the `events` to send (400 `WHK_005` for an unknown type) and an optional `description`. Leave `space_ids` out: it may name only the request's space (403 `WHK_009`). Each event type needs the scope that reads its data, `transactions:read` for `transaction.*` for example (403 `AUTH_007` with `details.required_scope`). The answer carries the signing secret (`dg_whsec_…`): keep it, a token can't read it back, only rotate it. A plan caps the number of endpoints (403 `BILL_013`).",
        "operationId": "createWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            }
          },
          "description": "Endpoint",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedEndpointResponseEnvelope"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/event-types": {
      "get": {
        "description": "The event types a webhook endpoint can take, each with its group and a made-up sample of its data. The same for every space, so no `X-Space-ID` is needed.",
        "operationId": "listWebhookEventTypes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogEntryListEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List webhook event types",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}": {
      "delete": {
        "description": "Removes the endpoint and its delivery log; nothing more is sent to it.",
        "operationId": "deleteWebhook",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteDataEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Delete webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      },
      "get": {
        "description": "One endpoint this token manages, with its health; 404 `WHK_001` for any other.",
        "operationId": "getWebhook",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      },
      "patch": {
        "description": "Changes the `url`, `description` or `events`; an absent field keeps its value. The same rules as creating one: the endpoint stays in the request's space, and each event type needs its read scope.",
        "operationId": "updateWebhook",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            }
          },
          "description": "Changes",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Update webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/deliveries": {
      "get": {
        "description": "The endpoint's log of the last 30 days, newest first: each event's delivery with its status, attempts, last HTTP status and latency. Filter by `type`, `status`, `from` and `to`; page with `meta.next_cursor`.",
        "operationId": "listWebhookDeliveries",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Event type",
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Status",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "pending",
                "succeeded",
                "failed",
                "skipped"
              ],
              "type": "string"
            }
          },
          {
            "description": "Created at or after (RFC 3339)",
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Created before (RFC 3339)",
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "meta.next_cursor of the previous page",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page size (default 50, at most 100)",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryPageEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List webhook deliveries",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/deliveries/{delivery_id}": {
      "get": {
        "description": "One delivery: what was sent (the URL, the headers with the signature, the JSON body) and every attempt with its status, duration, and the answer's first 20 headers and first 4 KB.",
        "operationId": "getWebhookDelivery",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Delivery ID",
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryDetailEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get webhook delivery",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/deliveries/{delivery_id}/resend": {
      "post": {
        "description": "The same event id and body, a new attempt now. 409 `WHK_003` when the endpoint is disabled.",
        "operationId": "resendWebhookDelivery",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Delivery ID",
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliverySummaryEnvelope"
                }
              }
            },
            "description": "Accepted"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Resend webhook delivery",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/pause": {
      "post": {
        "description": "Holds the endpoint's deliveries: they wait up to 3 days, then are skipped. 409 `WHK_003` when the endpoint is disabled.",
        "operationId": "pauseWebhook",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Pause webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/resend": {
      "post": {
        "description": "Sends again the endpoint's failed and skipped deliveries made between `from` and `to`, after an outage: at most 30 days and 10 000 deliveries (400 `WHK_006`).",
        "operationId": "resendWebhookDeliveries",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendRangeRequest"
              }
            }
          },
          "description": "Range",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendRangeResponseEnvelope"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Resend webhook deliveries in a range",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/resume": {
      "post": {
        "description": "Turns a paused or disabled endpoint back on. A disabled endpoint's skipped deliveries can then be sent again with `POST /v1/webhooks/{id}/resend`.",
        "operationId": "resumeWebhook",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Resume webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/rotate-secret": {
      "post": {
        "description": "Makes a new signing secret at once and returns it. The old one keeps signing for `overlap_hours` (0, 1, 24 or 72), so both signatures appear in `Degroshi-Signature` until then and a receiver can switch without missing events.",
        "operationId": "rotateWebhookSecret",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateSecretRequest"
              }
            }
          },
          "description": "Overlap",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Rotate webhook secret",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/stats": {
      "get": {
        "description": "Each day's deliveries (sent, delivered on the first call, after a retry, failed, still retrying) and the calls' response times (min, average, p95, max), test events left out, with the period's total. The last 7 days by default, at most 30.",
        "operationId": "getWebhookStats",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "First day (YYYY-MM-DD; default 6 days before to)",
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Last day (YYYY-MM-DD; default today)",
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsResponseEnvelope"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests: this token's or this route's rate limit is used up (BIZ_080). Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the limit resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the window resets, in Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Get webhook endpoint stats",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhooks/{id}/test": {
      "post": {
        "description": "A made-up event of `type` (`webhook.test` when empty), marked `test: true`, sent to this endpoint only and listed in its log, never counted in its health. An endpoint takes 10 test events a minute (429 `WHK_030` with `details.retry_after`). The delivery's detail shows the request sent and the endpoint's answer.",
        "operationId": "sendWebhookTest",
        "parameters": [
          {
            "description": "Endpoint ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestEventRequest"
              }
            }
          },
          "description": "Event type",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliverySummaryEnvelope"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Send test webhook event",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "description": "Production server",
      "url": "https://api.degroshi.com"
    }
  ],
  "webhooks": {
    "account.balance.updated": {
      "post": {
        "description": "An account's balance changed. `data.previous_attributes.balance` holds the old balance.",
        "operationId": "webhook-account-balance-updated",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "account_id": "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18",
                    "as_of": "2026-11-10T08:12:04Z",
                    "balance": "18240.55",
                    "currency": "UAH",
                    "object": "balance"
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "account.balance.updated"
              },
              "schema": {
                "$ref": "#/components/schemas/AccountBalanceUpdatedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Account balance updated",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "budget.threshold_reached": {
      "post": {
        "description": "Spending reached 80% or 100% of a budget's limit. Sent only to the endpoints of the member the alert is for.",
        "operationId": "webhook-budget-threshold_reached",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "budget_id": "0193a2d3-4e5f-7a6b-8c7d-9e0f1a2b3c4d",
                    "currency": "UAH",
                    "limit": "10000.00",
                    "object": "budget_threshold",
                    "period_end": "2026-11-30",
                    "period_start": "2026-11-01",
                    "spent": "8120.00",
                    "threshold": 80
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "budget.threshold_reached"
              },
              "schema": {
                "$ref": "#/components/schemas/BudgetThresholdReachedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Budget threshold reached",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "connection.status_changed": {
      "post": {
        "description": "A bank, wallet, exchange or broker connection stopped working or works again. `reason` says why it failed.",
        "operationId": "webhook-connection-status_changed",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "id": "0193a0f1-77c2-7d4e-a1b9-3c6d2e8f4a05",
                    "kind": "bank",
                    "object": "connection",
                    "provider": "monobank",
                    "reason": "reauth_required",
                    "status": "error"
                  },
                  "previous_attributes": {
                    "status": "active"
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "connection.status_changed"
              },
              "schema": {
                "$ref": "#/components/schemas/ConnectionStatusChangedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Connection status changed",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "import.completed": {
      "post": {
        "description": "A file import, a bank's first history download or a large batch from a custom source finished: one event with the counts instead of one per transaction.",
        "operationId": "webhook-import-completed",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "account_ids": [
                      "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18"
                    ],
                    "created": 412,
                    "date_from": "2026-01-01",
                    "date_to": "2026-10-31",
                    "deleted": 0,
                    "import_id": "0193b6e0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
                    "object": "import",
                    "source": "file",
                    "updated": 0
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "import.completed"
              },
              "schema": {
                "$ref": "#/components/schemas/ImportCompletedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Import completed",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "recurring.due": {
      "post": {
        "description": "A recurring payment is due today and its transaction (`transaction_id`) was recorded.",
        "operationId": "webhook-recurring-due",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "account_id": "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18",
                    "amount": "399.00",
                    "date": "2026-11-10",
                    "object": "recurring_occurrence",
                    "rule_id": "0193a3e4-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
                    "transaction_id": "0193b7f4-1d2e-7f3a-8b4c-5d6e7f8a9b0c",
                    "type": "expense"
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "recurring.due"
              },
              "schema": {
                "$ref": "#/components/schemas/RecurringDueEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Recurring payment due",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "sandbox.reset": {
      "post": {
        "description": "The developer sandbox went back to its demo data (`POST /v1/sandbox/reset`, or the reset button on the web): its id, keys and endpoints stay, and the wipe and the new data send no other events. Only the sandbox sends it. `origin` is `api` or `app`.",
        "operationId": "webhook-sandbox-reset",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "object": "sandbox_reset",
                    "origin": "api",
                    "seed_version": 1,
                    "seeded_at": "2026-11-16T09:00:00Z",
                    "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b"
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "sandbox.reset"
              },
              "schema": {
                "$ref": "#/components/schemas/SandboxResetEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Sandbox reset",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "transaction.created": {
      "post": {
        "description": "A transaction was added: in the app, through the API, by a bank or wallet sync, an import or a recurring payment. `data.object` is the transaction as `GET /v1/transactions/{id}` returns it.",
        "operationId": "webhook-transaction-created",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "account_id": "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18",
                    "account_name": "Card",
                    "amount": "642.30",
                    "category_id": "0193a1c4-9e2f-7c31-b0d4-7a1e5c8f2d60",
                    "category_name": "Groceries",
                    "created_at": "2026-11-10T08:12:04Z",
                    "description": "Groceries for the week",
                    "direction": "expense",
                    "id": "0193b7f2-5c1e-7a4b-9f3d-2b8e6c1a0d47",
                    "is_split": false,
                    "merchant": "Green Basket",
                    "object": "transaction",
                    "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                    "status": "completed",
                    "tags": [],
                    "transaction_date": "2026-11-10T08:12:03Z",
                    "type": "expense",
                    "updated_at": "2026-11-10T08:12:04Z",
                    "version": 1
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "transaction.created"
              },
              "schema": {
                "$ref": "#/components/schemas/TransactionCreatedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Transaction created",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "transaction.deleted": {
      "post": {
        "description": "A transaction was deleted in the app or through the API, or the bank cancelled it. `data.object` names it and its account.",
        "operationId": "webhook-transaction-deleted",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "account_id": "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18",
                    "deleted": true,
                    "id": "0193b7f2-5c1e-7a4b-9f3d-2b8e6c1a0d47",
                    "object": "transaction"
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "transaction.deleted"
              },
              "schema": {
                "$ref": "#/components/schemas/TransactionDeletedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Transaction deleted",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "transaction.updated": {
      "post": {
        "description": "A transaction's amount, date, category, status, description, note or account changed. `data.previous_attributes` holds the old values of what changed.",
        "operationId": "webhook-transaction-updated",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "account_id": "0193a1c4-2b7d-7e10-8c55-4f2a9d6e3b18",
                    "account_name": "Card",
                    "amount": "642.30",
                    "category_id": "0193a1c4-9e2f-7c31-b0d4-7a1e5c8f2d60",
                    "category_name": "Groceries",
                    "created_at": "2026-11-10T08:12:04Z",
                    "description": "Groceries for the week",
                    "direction": "expense",
                    "id": "0193b7f2-5c1e-7a4b-9f3d-2b8e6c1a0d47",
                    "is_split": false,
                    "merchant": "Green Basket",
                    "object": "transaction",
                    "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                    "status": "completed",
                    "tags": [],
                    "transaction_date": "2026-11-10T08:12:03Z",
                    "type": "expense",
                    "updated_at": "2026-11-10T08:12:04Z",
                    "version": 1
                  },
                  "previous_attributes": {
                    "status": "pending"
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "transaction.updated"
              },
              "schema": {
                "$ref": "#/components/schemas/TransactionUpdatedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Transaction updated",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "transactions.bulk_updated": {
      "post": {
        "description": "One action changed many transactions (a rule applied to earlier ones, an import sorted into categories, an account moved to another space): one event with the `reason` and the `count` instead of one per transaction. Catch up with `GET /v1/transactions?updated_since=`.",
        "operationId": "webhook-transactions-bulk_updated",
        "parameters": [
          {
            "description": "`t=\u003cunix seconds\u003e,v1=\u003chex HMAC-SHA256 of \"\u003ct\u003e.\u003cbody\u003e\"\u003e` with the endpoint's secret; during a secret change a second `v1` carries the old secret's signature.",
            "in": "header",
            "name": "Degroshi-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's id, the same on every retry.",
            "in": "header",
            "name": "Degroshi-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The event's type.",
            "in": "header",
            "name": "Degroshi-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "This delivery's id.",
            "in": "header",
            "name": "Degroshi-Delivery-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 for the first try, then 2, 3…",
            "in": "header",
            "name": "Degroshi-Attempt",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "2026-11-10",
                "created": "2026-11-10T08:12:03.512Z",
                "data": {
                  "object": {
                    "batch_id": "0193b6f1-2c3d-7e4f-9a5b-6c7d8e9f0a1b",
                    "category_id": "0193a1c4-9e2f-7c31-b0d4-7a1e5c8f2d60",
                    "count": 37,
                    "object": "bulk_update",
                    "reason": "rule_applied"
                  }
                },
                "id": "0193b7f3-0a4c-7d2e-9b1f-6c5d4e3a2b10",
                "object": "event",
                "source": "bank_sync",
                "space_id": "0193a1b2-4c3d-7e5f-8a6b-1c2d3e4f5a6b",
                "test": false,
                "type": "transactions.bulk_updated"
              },
              "schema": {
                "$ref": "#/components/schemas/TransactionsBulkUpdatedEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other status, or no answer within 5 seconds, is retried."
          }
        },
        "summary": "Transactions updated in bulk",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "x-error-codes": {
    "ACCT_001": {
      "description": "Account with ID does not exist",
      "status": [
        404
      ]
    },
    "ACCT_003": {
      "description": "Closed",
      "status": [
        400
      ]
    },
    "ACCT_010": {
      "description": "Account type not recognized",
      "status": [
        400
      ]
    },
    "ACCT_044": {
      "description": "Account cannot be deleted",
      "status": [
        403
      ]
    },
    "ACCT_048": {
      "description": "Account can't move there: the target is not another space owned by the caller, or the account's connection can't follow it",
      "status": [
        403,
        422
      ]
    },
    "ACCT_049": {
      "description": "Account can't move: rows in a locked period, splits across accounts, or transfers into a space that can't be linked",
      "status": [
        422
      ]
    },
    "ACCT_066": {
      "description": "Connected account: its bank, wallet or exchange sets the balance",
      "status": [
        422
      ]
    },
    "ACCT_067": {
      "description": "A term (rate, minimum payment, goal, …) the account's type doesn't take",
      "status": [
        422
      ]
    },
    "ANLY_001": {
      "description": "Analytics data not found",
      "status": [
        404
      ]
    },
    "ANLY_002": {
      "description": "Analytics not available",
      "status": [
        503
      ]
    },
    "AUTH_001": {
      "description": "No bearer token provided",
      "status": [
        401
      ]
    },
    "AUTH_002": {
      "description": "Token signature invalid or malformed",
      "status": [
        401
      ]
    },
    "AUTH_007": {
      "description": "Token lacks required scope",
      "status": [
        403
      ]
    },
    "AUTH_008": {
      "description": "Signature verification failed",
      "status": [
        401
      ]
    },
    "AUTH_011": {
      "description": "No user with this identifier",
      "status": [
        404
      ]
    },
    "AUTH_036": {
      "description": "Personal access token isn't bound to the request's space",
      "status": [
        403
      ]
    },
    "AUTH_041": {
      "description": "Not a whole API key: cut short or a stray character (401)",
      "status": [
        401
      ]
    },
    "AUTH_042": {
      "description": "No API key matches this one (401)",
      "status": [
        401,
        404
      ]
    },
    "AUTH_043": {
      "description": "API key has expired; details.expired_at says when (401)",
      "status": [
        401
      ]
    },
    "AUTH_044": {
      "description": "API key was revoked; details.revoked_at says when (401)",
      "status": [
        401
      ]
    },
    "AUTH_045": {
      "description": "API key lacks required permissions",
      "status": [
        403
      ]
    },
    "AUTH_048": {
      "description": "API key couldn't be checked, e.g. its owner's account is switched off (401)",
      "status": [
        401
      ]
    },
    "AUTH_049": {
      "description": "API keys can't reach this route (keys, billing, space admin, connections, security, exports); 401 on the MCP server",
      "status": [
        401,
        403
      ]
    },
    "AUTH_074": {
      "description": "Permission denied for resource",
      "status": [
        403
      ]
    },
    "AUTH_076": {
      "description": "Unauthorized access",
      "status": [
        401
      ]
    },
    "AUTH_077": {
      "description": "Insufficient role for action",
      "status": [
        403
      ]
    },
    "AUTH_078": {
      "description": "Token invalid",
      "status": [
        400,
        401
      ]
    },
    "AUTH_079": {
      "description": "Token expired",
      "status": [
        400
      ]
    },
    "AUTH_080": {
      "description": "The API key's allowlist doesn't include the caller's address",
      "status": [
        403
      ]
    },
    "AUTH_081": {
      "description": "the docs console (docs.degroshi.com) takes sandbox keys (dg_test_) only",
      "status": [
        403
      ]
    },
    "BILL_001": {
      "description": "Web checkout (or the store sync) is not configured on this server",
      "status": [
        503
      ]
    },
    "BILL_002": {
      "description": "Unknown or retired price code",
      "status": [
        422
      ]
    },
    "BILL_003": {
      "description": "A subscription already gives this plan or a higher one (details: provider, plan)",
      "status": [
        409
      ]
    },
    "BILL_004": {
      "description": "The subscription is billed by a store (App Store, Google Play): manage it there",
      "status": [
        409
      ]
    },
    "BILL_005": {
      "description": "No live web subscription to change",
      "status": [
        404
      ]
    },
    "BILL_006": {
      "description": "The payment provider failed or refused the request",
      "status": [
        409,
        503
      ]
    },
    "BILL_007": {
      "description": "Checkout not found for this user",
      "status": [
        404
      ]
    },
    "BILL_008": {
      "description": "The user must accept recurring charges (accept_recurring: true)",
      "status": [
        422
      ]
    },
    "BILL_009": {
      "description": "The subscription is not in a state that can be canceled or resumed",
      "status": [
        409
      ]
    },
    "BILL_010": {
      "description": "monobank sells to Ukrainian residents only: confirm residence_country UA, or pay through Paddle",
      "status": [
        422
      ]
    },
    "BILL_011": {
      "description": "The 14 days to withdraw from the subscription (from its first payment) are over",
      "status": [
        409
      ]
    },
    "BILL_012": {
      "description": "The plan does not include the feature (403; details: feature, plan, upgrade_plan)",
      "status": [
        403
      ]
    },
    "BILL_013": {
      "description": "The plan's limit is reached (403; details: limit, max, used, plan, upgrade_plan)",
      "status": [
        403
      ]
    },
    "BILL_014": {
      "description": "The new owner's plan has no room for the space handed over (403; details as BILL_012 / BILL_013, of the new owner)",
      "status": [
        403
      ]
    },
    "BIZ_080": {
      "description": "Rate limit exceeded",
      "status": [
        429,
        503
      ]
    },
    "BUD_001": {
      "description": "Budget not found",
      "status": [
        404
      ]
    },
    "BUD_010": {
      "description": "Budget period invalid",
      "status": [
        400
      ]
    },
    "BUD_014": {
      "description": "Budget start date invalid",
      "status": [
        400
      ]
    },
    "BUD_030": {
      "description": "Budget allocation not found",
      "status": [
        404
      ]
    },
    "BUD_032": {
      "description": "Allocation exceeds budget amount",
      "status": [
        409
      ]
    },
    "BUD_051": {
      "description": "Budget cannot be modified",
      "status": [
        409
      ]
    },
    "CATE_001": {
      "description": "Category not found",
      "status": [
        404
      ]
    },
    "CATE_002": {
      "description": "Category not accessible in space",
      "status": [
        400
      ]
    },
    "CATE_005": {
      "description": "Cannot delete system category",
      "status": [
        403
      ]
    },
    "CATE_014": {
      "description": "Category icon not recognized",
      "status": [
        400
      ]
    },
    "CATE_019": {
      "description": "Parent category invalid",
      "status": [
        400
      ]
    },
    "CATE_020": {
      "description": "Category emoji must be a single emoji",
      "status": [
        400
      ]
    },
    "CATE_021": {
      "description": "reassign_to is not a category of the same space and type outside the deleted subtree",
      "status": [
        400
      ]
    },
    "CATE_022": {
      "description": "Rule suggestion not found in this space",
      "status": [
        404
      ]
    },
    "CATE_023": {
      "description": "Rule suggestion was already accepted or dismissed",
      "status": [
        409
      ]
    },
    "CATE_024": {
      "description": "Apply batch not found in this space",
      "status": [
        404
      ]
    },
    "CATE_025": {
      "description": "Apply batch was already undone",
      "status": [
        409
      ]
    },
    "CATE_026": {
      "description": "Apply batch is past its 30-day undo window",
      "status": [
        410
      ]
    },
    "CATE_027": {
      "description": "Only the person who applied it or a member who sees every account can undo it",
      "status": [
        403
      ]
    },
    "CATE_028": {
      "description": "Apply batch is still writing its rows",
      "status": [
        409
      ]
    },
    "CATE_029": {
      "description": "Categorization run not found",
      "status": [
        404
      ]
    },
    "CATE_030": {
      "description": "The transaction has no category waiting for a review",
      "status": [
        404
      ]
    },
    "CATE_031": {
      "description": "No rule can be offered for these operations; the message says why",
      "status": [
        422
      ]
    },
    "CURR_001": {
      "description": "Currency not found",
      "status": [
        400,
        404,
        422
      ]
    },
    "CURR_003": {
      "description": "Currency code format invalid",
      "status": [
        400
      ]
    },
    "CURR_010": {
      "description": "Exchange rate not available",
      "status": [
        404
      ]
    },
    "CURR_011": {
      "description": "Cannot fetch exchange rate",
      "status": [
        409,
        503
      ]
    },
    "CURR_020": {
      "description": "Currency conversion failed",
      "status": [
        400
      ]
    },
    "RCR_004": {
      "description": "Recurring transaction paused",
      "status": [
        409
      ]
    },
    "RCR_008": {
      "description": "Recurring transaction not found",
      "status": [
        404
      ]
    },
    "RCR_014": {
      "description": "End date before start date",
      "status": [
        400
      ]
    },
    "RCR_018": {
      "description": "Occurrence date range exceeds the maximum",
      "status": [
        400
      ]
    },
    "RCR_026": {
      "description": "Paused rule: re-activate through the resume action (missed occurrences need a decision)",
      "status": [
        409
      ]
    },
    "RCR_027": {
      "description": "Resume called on a rule that is already active",
      "status": [
        409
      ]
    },
    "RCR_028": {
      "description": "Not an occurrence of the rule (off schedule, before start or after end)",
      "status": [
        400
      ]
    },
    "RCR_029": {
      "description": "Occurrence was already posted or skipped (details: action, transaction_id)",
      "status": [
        409
      ]
    },
    "RCR_030": {
      "description": "mode post on an account that brings its own rows (a connection, PrivatBank e-mails): it only tracks them",
      "status": [
        422
      ]
    },
    "RCR_031": {
      "description": "A track_only rule never posts: no “Pay”, no resume with missed=create",
      "status": [
        409
      ]
    },
    "RCR_032": {
      "description": "The transaction can't be this payment (details.reason: other_account, other_type, transfer, deleted, already_linked)",
      "status": [
        422
      ]
    },
    "RCR_033": {
      "description": "amount_from is before the rule's start date",
      "status": [
        400
      ]
    },
    "RCR_034": {
      "description": "Only an occurrence settled by a match or a link can be unlinked",
      "status": [
        409
      ]
    },
    "RCR_035": {
      "description": "A rule paid as a transfer (a loan payment) can't wait for confirmation yet: post or track_only",
      "status": [
        409,
        422
      ]
    },
    "SPC_002": {
      "description": "Space ID missing",
      "status": [
        400,
        404
      ]
    },
    "SPC_015": {
      "description": "A space's kind (personal/business) can't change after creation",
      "status": [
        422
      ]
    },
    "SPC_016": {
      "description": "The endpoint is only for business spaces",
      "status": [
        422
      ]
    },
    "SPC_020": {
      "description": "Member not found in space",
      "status": [
        404
      ]
    },
    "SPC_021": {
      "description": "User already member of space",
      "status": [
        409
      ]
    },
    "SPC_023": {
      "description": "Cannot modify own role",
      "status": [
        422
      ]
    },
    "SPC_024": {
      "description": "Cannot remove self from space",
      "status": [
        422
      ]
    },
    "SPC_025": {
      "description": "Space member limit reached",
      "status": [
        422
      ]
    },
    "SPC_027": {
      "description": "Owner cannot leave space",
      "status": [
        422
      ]
    },
    "SPC_029": {
      "description": "The owner's only space can't be deleted",
      "status": [
        422
      ]
    },
    "SPC_030": {
      "description": "Invitation not found",
      "status": [
        404
      ]
    },
    "SPC_031": {
      "description": "Invitation has expired",
      "status": [
        410
      ]
    },
    "SPC_032": {
      "description": "Invitation has been revoked",
      "status": [
        410
      ]
    },
    "SPC_033": {
      "description": "Invitation already accepted",
      "status": [
        410
      ]
    },
    "SPC_034": {
      "description": "Invitation email mismatch",
      "status": [
        403
      ]
    },
    "SPC_036": {
      "description": "Cannot invite as admin",
      "status": [
        403
      ]
    },
    "SPC_037": {
      "description": "Role not available in this kind of space (accountant: business spaces only)",
      "status": [
        422
      ]
    },
    "SPC_040": {
      "description": "Access to space denied",
      "status": [
        403
      ]
    },
    "SPC_042": {
      "description": "Write operations restricted",
      "status": [
        403
      ]
    },
    "SPC_043": {
      "description": "Only the space owner sets account access",
      "status": [
        403
      ]
    },
    "SPC_044": {
      "description": "Account access is invalid (unknown account, or the owner's own access)",
      "status": [
        422
      ]
    },
    "SPC_045": {
      "description": "The personal space made with the account (is_default) can't be deleted",
      "status": [
        422
      ]
    },
    "SPC_050": {
      "description": "A space link joins two different spaces that the caller owns",
      "status": [
        422
      ]
    },
    "SPC_051": {
      "description": "Space link not found",
      "status": [
        404
      ]
    },
    "SRC_001": {
      "description": "Source not found in this space",
      "status": [
        404
      ]
    },
    "SRC_002": {
      "description": "The source is paused: resume it in Settings before pushing (409)",
      "status": [
        409
      ]
    },
    "SRC_003": {
      "description": "No account with this external id in the source (push its PUT first)",
      "status": [
        404
      ]
    },
    "SRC_004": {
      "description": "An account's currency can't change once it is created (409)",
      "status": [
        409
      ]
    },
    "SRC_005": {
      "description": "A batch holds at most 500 items (413)",
      "status": [
        413
      ]
    },
    "SRC_006": {
      "description": "One item of a batch is invalid (in the item's result; details: field)",
      "status": [
        400,
        422
      ]
    },
    "SRC_007": {
      "description": "The Idempotency-Key was used with another request in the last 24 hours (422)",
      "status": [
        422
      ]
    },
    "SRC_008": {
      "description": "The row comes from a read-only source: only its category, merchant, note and tags change in the app (422)",
      "status": [
        422
      ]
    },
    "SYNC_ENTITY_DELETED": {
      "description": "The client-supplied id belongs to a deleted entity (410; a replayed create was applied, then deleted)",
      "status": [
        410
      ]
    },
    "SYNC_ID_CONFLICT": {
      "description": "The client-supplied id is already used outside this space (409)",
      "status": [
        409
      ]
    },
    "SYNC_RESYNC_REQUIRED": {
      "description": "The sync cursor expired, is malformed, or the space was reset; pull again without a cursor (410)",
      "status": [
        410
      ]
    },
    "SYNC_VERSION_MISMATCH": {
      "description": "If-Match does not match the row version (412; details.current is the current row)",
      "status": [
        412
      ]
    },
    "SYS_001": {
      "description": "Internal server error",
      "status": [
        500
      ]
    },
    "SYS_015": {
      "description": "Connection pool exhausted",
      "status": [
        503
      ]
    },
    "SYS_020": {
      "description": "External service unavailable",
      "status": [
        503
      ]
    },
    "SYS_030": {
      "description": "Service temporarily unavailable",
      "status": [
        503
      ]
    },
    "TAG_001": {
      "description": "Tag not found in this space",
      "status": [
        404
      ]
    },
    "TAG_002": {
      "description": "A tag with this name already exists in the space (names are case-insensitive)",
      "status": [
        409
      ]
    },
    "TAG_003": {
      "description": "tag_ids or tag_id names a tag that is not in this space",
      "status": [
        422
      ]
    },
    "TAG_004": {
      "description": "Too many tags: per space, or per transaction",
      "status": [
        422
      ]
    },
    "TXN_001": {
      "description": "Transaction not found",
      "status": [
        404
      ]
    },
    "TXN_003": {
      "description": "Transaction still pending",
      "status": [
        400
      ]
    },
    "TXN_011": {
      "description": "Type incompatible with operation",
      "status": [
        400,
        422
      ]
    },
    "TXN_020": {
      "description": "Amount format invalid",
      "status": [
        400
      ]
    },
    "TXN_040": {
      "description": "Transaction already split",
      "status": [
        400
      ]
    },
    "TXN_047": {
      "description": "Transaction split amount mismatch",
      "status": [
        400
      ]
    },
    "TXN_058": {
      "description": "Transfer amount invalid",
      "status": [
        400
      ]
    },
    "TXN_059": {
      "description": "Transfer account not found",
      "status": [
        404
      ]
    },
    "TXN_061": {
      "description": "Exchange rate invalid",
      "status": [
        400
      ]
    },
    "TXN_063": {
      "description": "Cannot fetch current exchange rate",
      "status": [
        400,
        409,
        422,
        503
      ]
    },
    "TXN_087": {
      "description": "Import file exceeds size limit",
      "status": [
        413
      ]
    },
    "TXN_098": {
      "description": "Category incompatible with transaction type",
      "status": [
        400,
        422
      ]
    },
    "TXN_099": {
      "description": "The transfer involves an account the caller can't access",
      "status": [
        403
      ]
    },
    "TXN_120": {
      "description": "Line items do not add up to the transaction or split part amount",
      "status": [
        422
      ]
    },
    "TXN_121": {
      "description": "Line items are invalid (amounts, units, categories or split parts)",
      "status": [
        400
      ]
    },
    "TXN_122": {
      "description": "Line items are not allowed on this transaction (transfer leg or split part)",
      "status": [
        422
      ]
    },
    "TXN_ACCOUNT_CHANGE_NOT_ALLOWED": {
      "description": "Transfer legs, transfer fees and split parents/parts move with their transfer or parent",
      "status": [
        422
      ]
    },
    "TXN_ACCOUNT_CONNECTED": {
      "description": "A person's row (entry, transfer, import) on a connected account: bank-synced, or a wallet/exchange without portfolio_activity_id",
      "status": [
        422
      ]
    },
    "TXN_ACCOUNT_CURRENCY_MISMATCH": {
      "description": "The new account has another currency than the current one",
      "status": [
        409,
        422
      ]
    },
    "TXN_ACCOUNT_NOT_MANUAL": {
      "description": "The current or the new account is connected (bank, wallet or exchange)",
      "status": [
        422
      ]
    },
    "TXN_ACTIVITY_INVALID": {
      "description": "portfolio_activity_id is not an activity of the wallet/exchange account the row goes on",
      "status": [
        422
      ]
    },
    "TXN_ACTIVITY_RECORDED": {
      "description": "The portfolio activity is already recorded as a transaction",
      "status": [
        409
      ]
    },
    "TXN_CROSS_SPACE_FORBIDDEN": {
      "description": "The caller can't write in the other space or can't see its account",
      "status": [
        403
      ]
    },
    "TXN_CROSS_SPACE_INVALID": {
      "description": "The accounts or rows can't form a cross-space transfer (same space, wrong direction, amounts, already a transfer)",
      "status": [
        422
      ]
    },
    "TXN_CROSS_SPACE_LEG": {
      "description": "",
      "status": [
        422
      ]
    },
    "TXN_CROSS_SPACE_NOT_LINKED": {
      "description": "The two spaces are not linked: a cross-space transfer joins spaces owned by the same person",
      "status": [
        422
      ]
    },
    "TXN_LINK_AMOUNT_REQUIRED": {
      "description": "The other account's currency needs the amount it received or sent",
      "status": [
        422
      ]
    },
    "TXN_LINK_BANK_OWNED": {
      "description": "A transfer linked from a bank import keeps the bank's amounts, date, status and fee: unlink it first",
      "status": [
        422
      ]
    },
    "TXN_LINK_NOT_ALLOWED": {
      "description": "The row can't be marked as (or unlinked from) a transfer with that account",
      "status": [
        409,
        422
      ]
    },
    "TXN_P2P_NO_ACCOUNT": {
      "description": "The row names no counterparty account to remember as one the person trades through peer to peer",
      "status": [
        422
      ]
    },
    "TXN_PROJECT_INVALID": {
      "description": "project_id is not a project of the business space (details.field)",
      "status": [
        422
      ]
    },
    "TXN_SPENT_BY_NOT_ALLOWED": {
      "description": "spent_by takes a spending row of a pooled shared account and a person in its share (details.reason)",
      "status": [
        422
      ]
    },
    "TXN_TRANSFER_FEE_INVALID": {
      "description": "fee_amount must be positive and below amount",
      "status": [
        400
      ]
    },
    "TXN_TRANSFER_FEE_MISMATCH": {
      "description": "Same-currency transfer: to_amount must equal amount − fee_amount",
      "status": [
        400
      ]
    },
    "TXN_TRANSFER_TO_AMOUNT_EXCEEDS_AMOUNT": {
      "description": "Same-currency transfer: the received amount is larger than the amount sent",
      "status": [
        400
      ]
    },
    "VAL_001": {
      "description": "General validation failure",
      "status": [
        400,
        413,
        422
      ]
    },
    "VAL_002": {
      "description": "Input validation failed",
      "status": [
        400
      ]
    },
    "VAL_010": {
      "description": "Required field not provided",
      "status": [
        400
      ]
    },
    "VAL_020": {
      "description": "Value format invalid",
      "status": [
        400
      ]
    },
    "VAL_024": {
      "description": "UUID format invalid",
      "status": [
        400
      ]
    },
    "VAL_025": {
      "description": "Date format invalid",
      "status": [
        400
      ]
    },
    "VAL_030": {
      "description": "Amount format invalid",
      "status": [
        400
      ]
    },
    "VAL_075": {
      "description": "Date range invalid",
      "status": [
        400
      ]
    },
    "VAL_076": {
      "description": "Start date after end date",
      "status": [
        400
      ]
    },
    "VAL_080": {
      "description": "File required",
      "status": [
        400
      ]
    },
    "VAL_086": {
      "description": "The Idempotency-Key was used with another request in the last 24 hours (422)",
      "status": [
        422
      ]
    },
    "VAL_087": {
      "description": "A request with this Idempotency-Key is still running; retry in a moment (409)",
      "status": [
        409
      ]
    },
    "VAL_088": {
      "description": "The Idempotency-Key is longer than 255 characters (400)",
      "status": [
        400
      ]
    },
    "WHK_001": {
      "description": "Webhook not found",
      "status": [
        404
      ]
    },
    "WHK_003": {
      "description": "Webhook disabled",
      "status": [
        409
      ]
    },
    "WHK_005": {
      "description": "An event type that isn't in the catalog (GET /v1/webhooks/event-types; details: type)",
      "status": [
        400
      ]
    },
    "WHK_006": {
      "description": "A resend covers at most 30 days and 10 000 deliveries",
      "status": [
        400
      ]
    },
    "WHK_007": {
      "description": "The endpoint names a space the person isn't a member of (details: space_id)",
      "status": [
        403
      ]
    },
    "WHK_008": {
      "description": "GET /v1/events/{id}: no such event in the space in the last 30 days, or not one the caller may see",
      "status": [
        404
      ]
    },
    "WHK_009": {
      "description": "With an API key an endpoint covers exactly the request's space (X-Space-ID); manage multi-space endpoints in the app (403; details: field, space_id)",
      "status": [
        403
      ]
    },
    "WHK_020": {
      "description": "Webhook signature verification failed",
      "status": [
        400
      ]
    },
    "WHK_022": {
      "description": "A test event's edited payload doesn't have the event's shape (400; details: field, expected)",
      "status": [
        400
      ]
    },
    "WHK_023": {
      "description": "A test event's edited payload is over 64 KB (413; details: max)",
      "status": [
        413
      ]
    },
    "WHK_030": {
      "description": "Too many test events for one endpoint: 10 a minute (429; details: retry_after)",
      "status": [
        429
      ]
    },
    "WHK_031": {
      "description": "The URL isn't HTTPS, has credentials, or resolves to a private, loopback or link-local address (details: reason)",
      "status": [
        400
      ]
    },
    "WHK_041": {
      "description": "Integration service unavailable",
      "status": [
        503
      ]
    }
  }
}
