Skip to main content

Overview

The Monzoh API reference provides comprehensive documentation for all classes, methods, and models in the Monzoh Python library. This section covers every aspect of the library’s API surface.

Main Client

The MonzoClient is the primary entry point for interacting with the Monzo API:

Client Properties

API Endpoints

Accounts & Balance

  • List all accounts
  • Get account balance information
  • Access current account and savings account data

Transactions

  • List transactions with filtering options
  • Get individual transaction details
  • Add notes and metadata to transactions

Pots (Savings)

  • List all savings pots
  • Deposit and withdraw from pots
  • Create and manage pot goals

Attachments

  • Upload files to transactions
  • Manage image and document attachments
  • Remove attachments from transactions

Receipts

  • Add detailed receipt information to transactions
  • Include itemized purchase details
  • Manage receipt data and taxes

Webhooks

  • Register webhook endpoints
  • Manage webhook subscriptions
  • Handle webhook events and callbacks

Feed Items

  • Create custom feed entries
  • Add rich content to account feeds
  • Manage feed item styling and actions

Authentication

Monzoh handles OAuth2 authentication automatically:

Error Handling

Monzoh provides specific exception types for different error conditions:

Data Models

All API responses are returned as Pydantic models with full type safety:

Core Models

  • Account: Bank account information
  • Balance: Account balance and spending data
  • Transaction: Transaction details and metadata
  • Pot: Savings pot information
  • Attachment: File attachment data
  • Receipt: Detailed receipt information
  • Webhook: Webhook configuration and status

Authentication Models

  • OAuthToken: OAuth2 token data
  • WhoAmI: Authentication status information

Context Manager Support

Monzoh supports context managers for resource cleanup:

Mock Mode

Use mock mode for testing without real API calls:

HTTP Client Customization

Customize the underlying HTTP client for advanced use cases:

Quick Reference

Common Operations

Error Handling Pattern

Next Steps

Explore the detailed API documentation for each component:

Client

MonzoClient class and initialization options

Accounts

Account listing and balance operations

Transactions

Transaction listing and management

Pots

Savings pot operations and transfers

Models

Data models and type definitions

Exceptions

Error types and handling