openapi: 3.1.0
info:
title: Xero Accounting Accounts Contacts API
version: '2.0'
description: 'REST API for managing invoices, contacts, bank transactions, accounts, items,
journals, reports, and other accounting resources in a Xero organization.
All requests require an OAuth 2.0 bearer token and the Xero-Tenant-Id header
to scope requests to a specific organization. Endpoints derived from the
official XeroAPI/Xero-OpenAPI repository.
'
contact:
name: Xero Developer
url: https://developer.xero.com/documentation/api/accounting/overview
servers:
- url: https://api.xero.com/api.xro/2.0
description: Xero Accounting API production server
security:
- OAuth2:
- accounting.transactions
- accounting.settings
- accounting.contacts
- accounting.attachments
- accounting.reports.read
- accounting.journals.read
tags:
- name: Contacts
paths:
/Contacts:
get:
tags:
- Contacts
summary: Retrieve all contacts in a Xero organisation
operationId: getContacts
parameters:
- $ref: '#/components/parameters/XeroTenantId'
responses:
'200':
description: Contacts
put:
tags:
- Contacts
summary: Create multiple contacts (bulk)
operationId: createContacts
parameters:
- $ref: '#/components/parameters/XeroTenantId'
responses:
'200':
description: Created contacts
components:
parameters:
XeroTenantId:
name: Xero-Tenant-Id
in: header
required: true
description: Xero identifier for the tenant (organisation) the request applies to
schema:
type: string
securitySchemes:
OAuth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://login.xero.com/identity/connect/authorize
tokenUrl: https://identity.xero.com/connect/token
scopes:
accounting.transactions: Grant read/write access to bank transactions, credit notes, invoices, repeating invoices
accounting.settings: Grant read/write access to organisation and account settings
accounting.contacts: Grant read/write access to contacts and contact groups
accounting.attachments: Grant read/write access to attachments
accounting.reports.read: Grant read-only access to accounting reports
accounting.journals.read: Grant read-only access to journals