# Xero Accounting — Pipedream Connect

> Accounting Software

- API slug: `xero_accounting_api` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Commerce
- Website: https://xero.com
- Managed OAuth scopes: `offline_access` · `openid` · `profile` · `email` · `accounting.transactions` · `accounting.transactions.read` · `accounting.reports.read` · `accounting.settings` · `accounting.settings.read` · `accounting.contacts` · `accounting.attachments` · `accounting.journals.read` · `accounting.reports.banksummary.read`
- This page (HTML): https://pipedream.com/apps/xero-accounting-api
- Tools: 39 actions · 4 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: xero_accounting_api`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "xero_accounting_api",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Add Items to Existing Sales Invoice:
const result = await mcp.callTool({
  name: "xero_accounting_api-add-line-item-to-invoice",
  arguments: {
    tenantId: "Tenant ID",
    invoiceId: "Invoice ID",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Xero Accounting endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.xero.com/connections

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkueGVyby5jb20vY29ubmVjdGlvbnM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "xero_accounting_api-add-line-item-to-invoice",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    xero_accounting_api: { authProvisionId: "apn_xxxxxxx" },
    tenantId: "Tenant ID",
    invoiceId: "Invoice ID",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (39)

### `xero_accounting_api-add-line-item-to-invoice` — Add Items to Existing Sales Invoice (Write)

Adds line items to an existing sales invoice. See the docs here

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/add-line-item-to-invoice.md

### `xero_accounting_api-get-bank-statements-report` — Bank Statements Report (Read-only)

Gets bank statements for the specified bank account.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-bank-statements-report.md

### `xero_accounting_api-create-bank-transaction` — Create Bank Transaction (Write)

Create a new bank transaction See the documentation

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-bank-transaction.md

### `xero_accounting_api-create-bill` — Create Bill (Write)

Creates a new bill (Accounts Payable)See the docs here

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-bill.md

### `xero_accounting_api-create-credit-note` — Create Credit Note (Write)

Creates a new credit note.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-credit-note.md

### `xero_accounting_api-xero-accounting-create-employee` — Create Employee (Write)

Creates a new employee.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/xero-accounting-create-employee.md

### `xero_accounting_api-create-history-note` — Create History Note (Write)

Creates a new note adding it to a document.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-history-note.md

### `xero_accounting_api-create-item` — Create Item (Write)

Creates a new item.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-item.md

### `xero_accounting_api-xero-accounting-create-or-update-contact` — Create or Update Contact (Write)

Creates a new contact or updates if the contact exists.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/xero-accounting-create-or-update-contact.md

### `xero_accounting_api-create-update-contact` — Create or update contact (Write)

Creates a new contact or updates a contact if a contact already exists. See the docs here

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-update-contact.md

### `xero_accounting_api-create-payment` — Create Payment (Write)

Creates a new payment

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-payment.md

### `xero_accounting_api-xero-create-purchase-bill` — Create Purchase Bill (Write)

Creates a new purchase bill.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/xero-create-purchase-bill.md

### `xero_accounting_api-xero-create-sales-invoice` — Create Sales Invoice (Write)

Creates a new sales invoice. See the documentation

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/xero-create-sales-invoice.md

### `xero_accounting_api-create-tracking-category` — Create tracking category (Write)

Create a new tracking category See the documentation.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/create-tracking-category.md

### `xero_accounting_api-delete-tracking-category` — Delete tracking category (Write)

Delete a tracking category by ID See the documentation.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/delete-tracking-category.md

### `xero_accounting_api-delete-tracking-category-option` — Delete tracking category option (Write)

Delete a tracking category option by ID See the documentation.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/delete-tracking-category-option.md

### `xero_accounting_api-download-invoice` — Download Invoice (Write)

Downloads an invoice as pdf file. File will be placed at the action's associated workflow temporary folder.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/download-invoice.md

### `xero_accounting_api-email-an-invoice` — Email an Invoice (Write)

Triggers the email of a sales invoice out of Xero.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/email-an-invoice.md

### `xero_accounting_api-find-contact` — Find contact.  Optionally, create one if none are found (Write)

Finds a contact by name or account number. Optionally, create one if none are found. See the docs here

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/find-contact.md

### `xero_accounting_api-find-invoice` — Find Invoice (Read-only)

Finds an invoice by number or reference.See the docs here

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/find-invoice.md

### `xero_accounting_api-find-or-create-contact` — Find or Create Contact (Read-only)

Finds a contact by name or email address. Optionally, create one if none are found. See the docs here

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/find-or-create-contact.md

### `xero_accounting_api-get-bank-summary` — Get Bank Summary (Read-only)

Gets the balances and cash movements for each bank account.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-bank-summary.md

### `xero_accounting_api-get-contact` — Get Contact (Read-only)

Gets details of a contact.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-contact.md

### `xero_accounting_api-get-history-of-changes` — Get History of Changes (Read-only)

Gets the history of changes to a single existing document.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-history-of-changes.md

### `xero_accounting_api-get-invoice` — Get Invoice (Read-only)

Gets details of an invoice.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-invoice.md

### `xero_accounting_api-get-item` — Get Item (Read-only)

Gets details of an item.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-item.md

### `xero_accounting_api-get-invoice-online-url` — Get Sales Invoice Online URL (Read-only)

Retrieves the online sales invoice URL.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-invoice-online-url.md

### `xero_accounting_api-get-tenant-connections` — Get Tenant Connections (Read-only)

Gets the tenants connections the user is authorized to access

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-tenant-connections.md

### `xero_accounting_api-get-tracking-category` — Get tracking category (Read-only)

Get information from a tracking category by ID See the documentation.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/get-tracking-category.md

### `xero_accounting_api-list-contacts` — List Contacts (Read-only)

Lists information from contacts in the given tenant id as per filter parameters.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/list-contacts.md

### `xero_accounting_api-list-credit-notes` — List Credit Notes (Read-only)

Lists information from credit notes in the given tenant id as per filter parameters.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/list-credit-notes.md

### `xero_accounting_api-list-invoices` — List Invoices (Read-only)

Lists information from invoices in the given tenant id as per filter parameters.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/list-invoices.md

### `xero_accounting_api-list-manual-journals` — List Manual Journals (Read-only)

Lists information from manual journals in the given tenant id as per filter parameters.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/list-manual-journals.md

### `xero_accounting_api-list-tracking-categories` — List tracking categories (Read-only)

Lists information from tracking categories See the documentation.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/list-tracking-categories.md

### `xero_accounting_api-make-an-api-call` — Make API Call (Write)

Makes an aribitrary call to Xero Accounting API.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/make-an-api-call.md

### `xero_accounting_api-xero-accounting-update-contact` — Update Contact (Write)

Updates a contact given its identifier.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/xero-accounting-update-contact.md

### `xero_accounting_api-update-tracking-category` — Update tracking category (Write)

Update a tracking category by ID See the documentation.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/update-tracking-category.md

### `xero_accounting_api-update-tracking-category-option` — Update tracking category option (Write)

Update a tracking category by ID See the documentation.

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/update-tracking-category-option.md

### `xero_accounting_api-upload-file` — Upload File (Write)

Uploads a file to the specified document. See the documentation

Full schema: https://pipedream.com/apps/xero-accounting-api/actions/upload-file.md

## Triggers (4)

### `xero_accounting_api-new-updated-contact` — New or Updated Contact (Polling)

Emit new notifications when you create a new or update existing contact

Full schema: https://pipedream.com/apps/xero-accounting-api/triggers/new-updated-contact.md

### `xero_accounting_api-new-updated-invoice` — New or updated invoice (Polling)

Emit new notifications when you create a new or update existing invoice

Full schema: https://pipedream.com/apps/xero-accounting-api/triggers/new-updated-invoice.md

### `xero_accounting_api-new-or-updated-quote` — New or Updated Quote (Polling)

Emit new event each time a quote is added or updated. See the documentation

Full schema: https://pipedream.com/apps/xero-accounting-api/triggers/new-or-updated-quote.md

### `xero_accounting_api-webhook-event-received` — Webhook Event Received (Instant) (Instant)

Emit new event for each incoming webhook notification. To create a Xero Webhook, please follow the instructions here.

Full schema: https://pipedream.com/apps/xero-accounting-api/triggers/webhook-event-received.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
