Xero Accounting API
- URL
-
https://api.xero.com/api.xro/2.0 - Spec
- https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/xero_accounting.yaml
- Spec (json)
- https://api.apis.guru/v2/specs/xero.com/xero_accounting/2.9.4/openapi.json
- Docs
- https://developer.xero.com/documentation/api/accounting/overview
xero-tenant-id: <credential> discovered Create an app in the Xero Developer Centre and choose the appropriate grant type. For standard web-server OAuth, select Auth Code; Xero assigns a client_id and lets you generate a client_secret in the app settings. For native/public apps, use the PKCE flow instead. Send users to Xero authorization, exchange the code at https://identity.xero.com/connect/token, then call GET https://api.xero.com/connections to discover authorized tenantId values. Request offline_access if you need refresh tokens.
Authorization: Bearer <credential> + Xero Custom Connection app credentials (client credentials grant for a single organisation) xero-tenant-id: <credential> discovered Create a Custom Connection in the Xero Developer Centre following the Custom Connections guide. Xero issues a client_id and client_secret for a single organisation; use the client-credentials flow to obtain a bearer access token for that org. This is intended for bespoke integrations tied to one Xero organisation rather than multi-tenant user-consent apps.