# Xero export
Source: https://docs.file.ai/deliver/xero-export

> Connect your Xero organization and send invoices from fileAI to Xero without re-keying them.

fileAI app

# Xero export

Copy pageCopy page

Connect your Xero organization and send invoices from fileAI to Xero without re-keying them.

Copy pageCopy page

The Xero export integration connects a Xero organization to fileAI so you can send extracted financial data straight into Xero. Once connected, you can export purchase invoices and sales invoices to Xero, and download bank statement data as a Xero-compatible CSV for manual import.

Xero export is an app feature. There is no public API to connect Xero or trigger an export yet. Through the API you can read a file’s latest integration export result, and write one from your own system. See [Check export status](#check-export-status).

## 

[​

](#what-you-can-export)

What you can export

Data

How it reaches Xero

Purchase invoices

Exported directly to your connected Xero organization.

Sales invoices

Exported directly to your connected Xero organization.

Bank statements

Downloaded as **XERO\_CSV**, a Xero-compatible CSV you import into Xero yourself.

Exports use the accounts, tax codes and tracking categories you have configured for the integration, so the same mapping is applied every time. The app shows each export’s status and the reason when an export fails.

## 

[​

](#how-it-works)

How it works

### 

[​

](#connect-your-xero-account)

Connect your Xero account

fileAI connects through Xero’s own OAuth2 sign-in. You sign in on Xero’s site, and fileAI never sees or stores your Xero password.

1

Open Xero from Export Integrations

In **Drive** (your file repository), open the integration menu and select **Xero** under Export Integrations.

![Xero in the Export Integrations menu](/images/xero/select-xero.png)

2

Sign in through Xero

You are redirected to Xero’s sign-in page. Sign in with your Xero account.

![Xero sign-in page](/images/xero/xero-sign-in.png)

3

Choose your organization and allow access

Pick the Xero organization to connect, review the permissions Xero lists, and select **Allow access**.

![Xero consent screen with Allow access](/images/xero/allow-access.png)

4

Confirm the connection

Back in fileAI, the Xero export icon now appears in the action bar.

![Xero connected in the fileAI action bar](/images/xero/connected.png)

### 

[​

](#download-a-bank-statement-for-xero)

Download a bank statement for Xero

1

Open the file

Select the bank statement and open its **AI Schema** tab to review the extracted data.

2

Download as XERO\_CSV

Open the **Download** dropdown at the upper right and choose **XERO\_CSV**. The file is saved to your downloads folder when the progress bar finishes.

3

Import into Xero

Upload the CSV to Xero manually.

**XERO\_CSV** only works for bank statements. Choosing it for any other kind of file shows an error. Use XLSX, XLS, CSV, JSON or PDF for other files.

## 

[​

](#check-export-status)

Check export status

Every file returned by `GET /v1/files` includes an `exportInfo` object once it has been exported through an integration:

```
{
  "fileId": "b765bd00-181e-4737-b4d9-004dadd6bd45",
  "exportInfo": {
    "integrationExportStatus": "error",
    "integrationExportMessages": ["…"],
    "integrationExportUpdatedAt": "2026-09-15T02:14:11.000Z"
  }
}
```

`integrationExportStatus`

Meaning

`exporting`

The export is in progress.

`completed`

The export succeeded.

`error`

The export failed. `integrationExportMessages` says why.

`empty`

There was nothing to export.

### 

[​

](#report-an-export-from-your-own-system)

Report an export from your own system

If you export files from fileAI to another system yourself, write the outcome back with `PATCH /v1/files/{fileId}`. fileAI stores it in the file’s `exportInfo`, sets `integrationExportUpdatedAt`, and adds an entry to the file’s activity in the app.

```
curl -X PATCH "$FILEAI_BASE_URL/files/b765bd00-181e-4737-b4d9-004dadd6bd45" \
  -H "x-api-key: $FILEAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "integrationExportStatus": "error", "integrationExportMessages": ["Supplier not found in ledger"] }'
```

`integrationExportStatus` is required and must be one of the four values above; `integrationExportMessages` is optional. The response returns the `fileId` and the new `exportInfo`. `FILEAI_BASE_URL` is `https://api.orion.file.ai/prod/v1`, or your [regional host](/authentication#regions).

## 

[​

](#related)

Related

## Multi-page financial report

Upload a file, wait for processing and read its values end to end.

## AI Schemas

Define the invoice fields you extract before exporting.

## Incremental loading

Read files, including `exportInfo`, into your own systems.

## Notifications

Email the right people when a file meets your conditions.

[Previous](/verify/file-intelligence)[

Notifications

Email the right people automatically when a processed file meets your conditions.

Next

](/deliver/notifications)

⌘I

## On this page

*   [What you can export](#what-you-can-export)
*   [How it works](#how-it-works)
    *   [Connect your Xero account](#connect-your-xero-account)
    *   [Download a bank statement for Xero](#download-a-bank-statement-for-xero)
*   [Check export status](#check-export-status)
    *   [Report an export from your own system](#report-an-export-from-your-own-system)
*   [Related](#related)
