How to Connect Xero to an AI Agent
Auth setup
1. Register at developer.xero.com. 2. Create app (PKCE for public clients). 3. Authorize and get tenant_id. 4. Include Xero-tenant-id header in all requests.
Key facts
| Base URL | https://api.xero.com/api.xro/2.0/ |
| API version | 2.0 |
| Auth | OAuth 2.0 with PKCE. Register at developer.xero.com. Multi-tenant: one token accesses multiple orgs. |
| Token URL | https://identity.xero.com/connect/token |
| Scopes | openid profile email accounting.transactions accounting.contacts |
| Request body | application/json |
| Pagination | page-based: ?page=1 (100 records per page). Check HasMorePages in response. |
| Rate limit | 60 req/min per tenant. Daily: 5,000 API calls. App limit: 10,000/day across all tenants. |
| Error format | JSON: {"Type":"ValidationException","Message":"...","Elements":[...]} |
Key endpoints
| Method | Path | Description |
GET | /Invoices | List invoices |
POST | /Invoices | Create invoice |
GET | /Contacts | List contacts |
GET | /Reports/ProfitAndLoss | Profit & Loss report |
Quickstart
GET /api.xro/2.0/Invoices?where=Status=="AUTHORISED"
Authorization: Bearer {access_token}
Xero-tenant-id: {tenant_id}
Agent pitfalls & tips
- Xero-tenant-id header is REQUIRED on every API call.
- Use 'where' parameter with OData-like filtering for queries.
- Demo company available for testing โ no real data needed.
- Amounts use decimal format (e.g., 100.50).
- Webhooks: Xero sends SHA256 HMAC signed payloads for validation.
Source: curated by KanseiLink from official documentation (docs) and registry checks. Last reviewed: 2026-04-07. Specs change โ verify against the official docs before production use.
Frequently Asked Questions
What is Xero's AEO score?
โผ
Xero has an AEO score of 0.70 and is rated A (Functional agent integration). AEO (Agent Engine Optimization) measures how well a SaaS service works with AI agents. Scores range from 0.00 to 1.00, with grades from AAA (best) to D (not agent-ready).
Is Xero AI-agent-ready?
โผ
Xero is currently connectable for AI agent use. API access is available but no dedicated MCP server has been published yet. For detailed connection guides, auth setup, and known pitfalls, use the KanseiLink MCP tool.
How does Xero compare to other Accounting & Finance services?
โผ
In the Accounting & Finance category, Xero is rated A. KanseiLink evaluates services based on MCP availability, API quality, documentation, auth-guide clarity, and integration recipe availability (methodology published). Visit the full rankings at kansei-link.com to see how Xero compares.
How can I integrate Xero with an AI agent?
โผ
The fastest way to integrate Xero with an AI agent is through KanseiLink MCP. Install it with: npx @kansei-link/mcp-server โ then use the search_services and get_service_detail tools to get the current auth setup, endpoints, rate limits, and agent-specific tips. This data is kept fresh from registry checks, curated official-doc guides, and agent reports.
How do I authenticate with Xero?
โผ
OAuth 2.0 with PKCE. Register at developer.xero.com. Multi-tenant: one token accesses multiple orgs. Setup: 1. Register at developer.xero.com. 2. Create app (PKCE for public clients). 3. Authorize and get tenant_id. 4. Include Xero-tenant-id header in all requests.
What are Xero's API rate limits?
โผ
60 req/min per tenant. Daily: 5,000 API calls. App limit: 10,000/day across all tenants.