Connect to AI
Finance & Accounting OAuth 2.0

Xero Accounting API REST API

Automate accounting workflows with cloud-based finance API

Xero's REST API provides comprehensive access to accounting, invoicing, payroll, and financial reporting data. Developers use it to build integrations that automate bookkeeping, synchronize transactions, manage invoices and payments, and generate real-time financial insights. The API powers thousands of business applications connecting to Xero's cloud accounting platform used by millions of small businesses worldwide.

Base URL https://api.xero.com/api.xro/2.0

API Endpoints

MethodEndpointDescription
GET/InvoicesRetrieve all invoices with optional filtering by status, date, or contact
POST/InvoicesCreate new sales invoices or purchase bills with line items and tax details
GET/Invoices/{InvoiceID}Retrieve a specific invoice by its unique identifier
GET/ContactsList all contacts (customers and suppliers) in the organization
POST/ContactsCreate new customer or supplier contact records
GET/AccountsRetrieve the chart of accounts including asset, liability, equity, revenue, and expense accounts
GET/BankTransactionsGet bank transactions including spend money, receive money, and bank transfers
POST/BankTransactionsCreate bank transactions for recording payments and receipts
GET/PaymentsRetrieve payment records linked to invoices and credit notes
POST/PaymentsRecord payments against invoices or bills
GET/Reports/ProfitAndLossGenerate profit and loss statement for specified date range
GET/Reports/BalanceSheetRetrieve balance sheet report showing assets, liabilities, and equity
GET/ItemsList inventory items and services with pricing information
GET/TaxRatesGet configured tax rates for sales and purchases
GET/OrganisationsRetrieve organization details including name, address, and fiscal settings

Code Examples

curl -X GET 'https://api.xero.com/api.xro/2.0/Invoices?Status=DRAFT' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'xero-tenant-id: YOUR_TENANT_ID' \
  -H 'Accept: application/json'

Use Xero Accounting API from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for Xero Accounting API. Paste your Xero Accounting API API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Xero Accounting API directly with your credentials — no local install, works on mobile.

create_invoice Generate and send invoices to customers with line items, tax calculations, and due dates
get_financial_reports Retrieve profit & loss, balance sheet, and cash flow reports for financial analysis
reconcile_bank_transactions Match and reconcile bank transactions with invoices and bills automatically
manage_contacts Create, update, and retrieve customer and supplier contact information
track_payments Record and monitor payment status for outstanding invoices and bills

Connect in 60 seconds

Paste your Xero Accounting API key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect Xero Accounting API to your AI →

Related APIs