canonical: https://jentic.com/apis/xero.com

# Xero APIs

Xero is a cloud accounting platform for small and medium businesses. Its APIs cover double-entry bookkeeping, invoicing, payments, and financial reporting through the Accounting API, plus fixed asset registers, Australian payroll, bank feed connections, file storage, and OAuth 2 tenant connection management. Together they let software record and reconcile financial transactions, run payroll, attach source documents, and manage which organisations an integration is connected to.

## For AI agents

An agent can create and reconcile invoices, record payments, pull profit-and-loss and balance sheet reports, manage fixed assets, run Australian payroll for employees and leave, upload source documents, push bank statement feeds, and list or disconnect the Xero organisations it is connected to.

## Scope

Use for: Automating small-business accounting on Xero: invoicing, payments, bank reconciliation, financial reporting, fixed assets, Australian payroll, source-document storage, and managing connected organisations.

Not supported:
- card payment processing
- inventory management
- non-Australian payroll
- public bank-feed access
- customer support ticketing

## APIs

| API | Category | Endpoints | Description |
| --- | --- | --- | --- |
| Xero Accounting API | finance | 237 | Create invoices, record payments, reconcile bank transactions, and generate financial reports for small businesses through Xero's double-entry accounting system. |
| Xero Payroll AU API | hr-recruiting | 32 | Programmatically creates a payroll employee, searches payroll employees. |
| Xero Files API | storage | 18 | Programmatically uploads a file to the inbox, retrieves files. |
| Xero Bank Feeds API | finance | 7 | Programmatically create one or more new feed connection, searches for feed connections. |
| Xero Assets API | finance | 6 | Programmatically adds a fixed asset, searches fixed asset. |
| Xero OAuth 2 Identity Service API | identity-auth | 2 | Programmatically retrieves the connections for this user, deletes a connection for this user (i.e. |

## Which API to use

| Need | API | Why |
| --- | --- | --- |
| Record invoices, payments, and produce financial reports | xero_accounting | The Accounting API is the core double-entry ledger, covering invoices, contacts, bank transactions, and reporting across 237 operations. |
| Track fixed assets and their valuations | xero_assets | The Assets API manages the fixed asset register and asset types separately from the general ledger. |
| Push bank statement lines into an organisation | xero_bankfeeds | The Bank Feeds API is a partner-only service for financial institutions to deliver statement data for reconciliation, distinct from recording transactions in the ledger. |
| Run Australian payroll for employees and leave | xero-payroll-au | The Payroll AU API handles employees and leave applications for Australia-region organisations, which the Accounting API does not cover. |
| Store and attach source documents | xero_files | The Files API manages file uploads, folders, and associations, while the Accounting API only attaches documents to existing records. |
| List or disconnect connected organisations | xero-identity | The OAuth 2 Identity Service API manages tenant connections rather than any business data. |

## Cross-API use cases

### Invoice with attached receipt

An agent creates a sales invoice in the Accounting API, then uploads the supporting receipt through the Files API and associates it with the invoice so the source document travels with the ledger entry.

Example prompt: Create an authorised sales invoice for a contact, upload the PDF receipt, and associate the file with the new invoice.

### Feed-driven bank reconciliation

A financial services partner pushes statement lines through the Bank Feeds API, then an agent pulls the unreconciled bank transactions in the Accounting API and matches them against outstanding invoices by amount and date.

Example prompt: Deliver a batch of statement lines via a feed connection, then retrieve unreconciled bank transactions and reconcile them against matching invoices.

### Payroll cost posting

An agent reads employees and leave applications from the Payroll AU API and records the corresponding wage and leave costs as transactions in the Accounting API general ledger.

Example prompt: List active payroll employees and their leave applications, then record the associated wage expenses as bank transactions in the ledger.

### Multi-organisation reporting

An agent lists the connected Xero organisations through the Identity Service API and then pulls a profit-and-loss report for each one through the Accounting API, selecting the tenant per request.

Example prompt: Retrieve all connected organisations, then generate a profit-and-loss report for each by setting the tenant id per call.

## Why Jentic

- **Setup:** Wiring the Xero APIs by hand means implementing OAuth 2.0, sending the correct xero-tenant-id header on every request, and mapping operations across accounting, assets, payroll, bank feeds, files, and identity yourself. Through Jentic you install once, add the Xero APIs from the Jentic directory, store the OAuth credential once, and your agent calls any of them.
- **Permission scoping:** Your own rules decide which Xero operations the agent may run, so you can grant read-only reporting from the Accounting API while withholding writes such as posting invoices, creating payroll employees, or deleting a tenant connection until you add them.
- **Credential handling:** Your Xero OAuth credential and tenant details are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search the Jentic directory by intent, such as 'create an invoice', 'run a profit and loss report', or 'add a fixed asset', and Jentic returns the matching Xero operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related vendors

- **Stripe** — Processes card payments that become recorded invoice payments in Xero.
- **Plaid** — Pulls live bank account and transaction data that feeds reconciliation in Xero.
- **Sage** — Alternative small-business accounting platform with its own payroll and ledger APIs.
- **QuickBooks** — Competing cloud accounting API covering invoicing, payments, and reporting.

## FAQ

### What can an AI agent do across the Xero APIs?

An agent can run a small business's finances end to end: create and reconcile invoices, record payments, pull profit-and-loss and balance sheet reports, maintain a fixed asset register, run Australian payroll and leave, upload and attach source documents, deliver bank statement feeds, and manage which Xero organisations it is connected to.

### Do the Xero APIs share one set of credentials?

Yes. All of them use OAuth 2.0, and a single Xero connection with the appropriate scopes authorises requests across the Accounting, Assets, Bank Feeds, Payroll AU, Files, and Identity Service APIs. Each request adds a xero-tenant-id header to pick the organisation the operation applies to.

### How do the accounting-related APIs fit together?

The Accounting API is the core ledger for invoices, contacts, payments, and reports. The Assets API keeps the fixed asset register, the Files API stores source documents, the Bank Feeds API delivers statement lines for reconciliation, and the Payroll AU API handles employees and leave. They reference the same organisation, so an agent can combine them in one workflow.

### Are any of the Xero APIs restricted?

The Bank Feeds API is a closed, partner-only service available to financial institutions with a financial services partnership with Xero, so an agent can only use it once that access is granted. The Payroll AU API applies only to organisations in the Australia region.

### Which API selects the organisation an agent acts on?

The OAuth 2 Identity Service API lists the tenant connections available to the authorised user and can disconnect one. Every other API then uses the xero-tenant-id header to target a specific organisation, which is how one integration serves multiple businesses.

### Can an agent work with more than one Xero organisation at a time?

Yes. After listing connections through the Identity Service API, an agent can direct each request at a different organisation by changing the tenant id header, so a single connection can generate reports or post transactions across several businesses.
