---
title: "Creates contacts to a specific contact group"
method: PUT
path: "/ContactGroups/{ContactGroupID}/Contacts"
tags: ["Accounting"]
---

# Creates contacts to a specific contact group

`PUT /ContactGroups/{ContactGroupID}/Contacts`

## Path parameters

- `ContactGroupID` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- Contacts
  - `pagination` Pagination
    - `page` integer
    - `pageSize` integer
    - `pageCount` integer
    - `itemCount` integer
  - `Warnings` ValidationError[] — Displays array of warning messages from the API
    - `Message` string — Validation error message
  - `Contacts` Contact[]
    - `ContactID` string, uuid — Xero identifier
    - `MergedToContactID` string, uuid — ID for the destination of a merged contact. Only returned when using paging or when fetching a contact by ContactId or ContactNumber.
    - `ContactNumber` string — This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero.
    - `AccountNumber` string — A user defined account number. This can be updated via the API and the Xero UI (max length = 50)
    - `ContactStatus` 'ACTIVE' | 'ARCHIVED' | 'GDPRREQUEST' — Current status of a contact – see contact status types
    - `Name` string — Full name of contact/organisation (max length = 255)
    - `FirstName` string — First name of contact person (max length = 255)
    - `LastName` string — Last name of contact person (max length = 255)
    - `CompanyNumber` string — Company registration number (max length = 50)
    - `EmailAddress` string — Email address of contact person (umlauts not supported) (max length = 255)
    - `ContactPersons` ContactPerson[] — See contact persons
      - `FirstName` string — First name of person
      - `LastName` string — Last name of person
      - `EmailAddress` string — Email address of person
      - `IncludeInEmails` boolean — boolean to indicate whether contact should be included on emails with invoices etc.
    - `BankAccountDetails` string — Bank account number of contact
    - `TaxNumber` string — Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)
    - `TaxNumberType` 'SSN' | 'EIN' | 'ITIN' | 'ATIN' — Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers
    - `AccountsReceivableTaxType` string — The tax type from TaxRates
    - `AccountsPayableTaxType` string — The tax type from TaxRates
    - `Addresses` Address[] — Store certain address types for a contact – see address types
      - `AddressType` 'POBOX' | 'STREET' — define the type of address
      - `AddressLine1` string — max length = 500
      - `AddressLine2` string — max length = 500
      - `AddressLine3` string — max length = 500
      - `AddressLine4` string — max length = 500
      - `City` string — max length = 255
      - `Region` string — max length = 255
      - `PostalCode` string — max length = 50
      - `Country` string — max length = 50, [A-Z], [a-z] only
      - `AttentionTo` string — max length = 255
    - `Phones` Phone[] — Store certain phone types for a contact – see phone types
      - `PhoneType` 'DEFAULT' | 'DDI' | 'MOBILE' | 'FAX' | 'OFFICE'
      - `PhoneNumber` string — max length = 50
      - `PhoneAreaCode` string — max length = 10
      - `PhoneCountryCode` string — max length = 20
    - `IsSupplier` boolean — true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts payable invoice is generated against this contact.
    - `IsCustomer` boolean — true or false – Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts receivable invoice is generated against this contact.
    - `SalesDefaultLineAmountType` 'INCLUSIVE' | 'EXCLUSIVE' | 'NONE' — The default sales line amount type for a contact. Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
    - `PurchasesDefaultLineAmountType` 'INCLUSIVE' | 'EXCLUSIVE' | 'NONE' — The default purchases line amount type for a contact Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
    - `DefaultCurrency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EEK' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SKK' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZMK' | 'ZWD' — 3 letter alpha code for the currency – see list of currency codes
    - `XeroNetworkKey` string — Store XeroNetworkKey for contacts.
    - `SalesDefaultAccountCode` string — The default sales account code for contacts
    - `PurchasesDefaultAccountCode` string — The default purchases account code for contacts
    - `SalesTrackingCategories` SalesTrackingCategory[] — The default sales tracking categories for contacts
      - `TrackingCategoryName` string — The default sales tracking category name for contacts
      - `TrackingOptionName` string — The default purchase tracking category name for contacts
    - `PurchasesTrackingCategories` SalesTrackingCategory[] — The default purchases tracking categories for contacts
      - `TrackingCategoryName` string — The default sales tracking category name for contacts
      - `TrackingOptionName` string — The default purchase tracking category name for contacts
    - `TrackingCategoryName` string — The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
    - `TrackingCategoryOption` string — The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
    - `PaymentTerms` PaymentTerm
      - `Bills` Bill
        - `Day` integer — Day of Month (0-31)
        - `Type` 'DAYSAFTERBILLDATE' | 'DAYSAFTERBILLMONTH' | 'OFCURRENTMONTH' | 'OFFOLLOWINGMONTH'
      - `Sales` Bill
        - `Day` integer — Day of Month (0-31)
        - `Type` 'DAYSAFTERBILLDATE' | 'DAYSAFTERBILLMONTH' | 'OFCURRENTMONTH' | 'OFFOLLOWINGMONTH'
    - `UpdatedDateUTC` string — UTC timestamp of last update to contact
    - `ContactGroups` ContactGroup[] — Displays which contact groups a contact is included in
      - `Name` string — The Name of the contact group. Required when creating a new contact group
      - `Status` 'ACTIVE' | 'DELETED' — The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are returned on GETs.
      - `ContactGroupID` string, uuid — The Xero identifier for an contact group – specified as a string following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
      - `Contacts` Contact[] — The ContactID and Name of Contacts in a contact group. Returned on GETs when the ContactGroupID is supplied in the URL.
    - `Website` string — Website address for contact (read only)
    - `BrandingTheme` BrandingTheme
      - `BrandingThemeID` string, uuid — Xero identifier
      - `Name` string — Name of branding theme
      - `LogoUrl` string — The location of the image file used as the logo on this branding theme
      - `Type` 'INVOICE' — Always INVOICE
      - `SortOrder` integer — Integer – ranked order of branding theme. The default branding theme has a value of 0
      - `CreatedDateUTC` string — UTC timestamp of creation date of branding theme
    - `BatchPayments` BatchPaymentDetails — Bank details for use on a batch payment stored with each contact
      - `BankAccountNumber` string — Bank account number for use with Batch Payments
      - `BankAccountName` string — Name of bank for use with Batch Payments
      - `Details` string — (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
      - `Code` string — (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
      - `Reference` string — (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
    - `Discount` number, double — The default discount rate for the contact (read only)
    - `Balances` Balances — The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only)
      - `AccountsReceivable` AccountsReceivable
        - `Outstanding` number, double
        - `Overdue` number, double
      - `AccountsPayable` AccountsPayable
        - `Outstanding` number, double
        - `Overdue` number, double
    - `Attachments` Attachment[] — Displays array of attachments from the API
      - `AttachmentID` string, uuid — Unique ID for the file
      - `FileName` string — Name of the file
      - `Url` string — URL to the file on xero.com
      - `MimeType` string — Type of file
      - `ContentLength` integer — Length of the file content
      - `IncludeOnline` boolean — Include the file with the online invoice
    - `HasAttachments` boolean — A boolean to indicate if a contact has an attachment
    - `ValidationErrors` ValidationError[] — Displays validation errors returned from the API
      - `Message` string — Validation error message
    - `HasValidationErrors` boolean — A boolean to indicate if a contact has an validation errors
    - `StatusAttributeString` string — Status of object

## Response `200`

Success - return response of type Contacts array of added Contacts

- Contacts
  - `pagination` Pagination
    - `page` integer
    - `pageSize` integer
    - `pageCount` integer
    - `itemCount` integer
  - `Warnings` ValidationError[] — Displays array of warning messages from the API
    - `Message` string — Validation error message
  - `Contacts` Contact[]
    - `ContactID` string, uuid — Xero identifier
    - `MergedToContactID` string, uuid — ID for the destination of a merged contact. Only returned when using paging or when fetching a contact by ContactId or ContactNumber.
    - `ContactNumber` string — This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero.
    - `AccountNumber` string — A user defined account number. This can be updated via the API and the Xero UI (max length = 50)
    - `ContactStatus` 'ACTIVE' | 'ARCHIVED' | 'GDPRREQUEST' — Current status of a contact – see contact status types
    - `Name` string — Full name of contact/organisation (max length = 255)
    - `FirstName` string — First name of contact person (max length = 255)
    - `LastName` string — Last name of contact person (max length = 255)
    - `CompanyNumber` string — Company registration number (max length = 50)
    - `EmailAddress` string — Email address of contact person (umlauts not supported) (max length = 255)
    - `ContactPersons` ContactPerson[] — See contact persons
      - `FirstName` string — First name of person
      - `LastName` string — Last name of person
      - `EmailAddress` string — Email address of person
      - `IncludeInEmails` boolean — boolean to indicate whether contact should be included on emails with invoices etc.
    - `BankAccountDetails` string — Bank account number of contact
    - `TaxNumber` string — Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)
    - `TaxNumberType` 'SSN' | 'EIN' | 'ITIN' | 'ATIN' — Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers
    - `AccountsReceivableTaxType` string — The tax type from TaxRates
    - `AccountsPayableTaxType` string — The tax type from TaxRates
    - `Addresses` Address[] — Store certain address types for a contact – see address types
      - `AddressType` 'POBOX' | 'STREET' — define the type of address
      - `AddressLine1` string — max length = 500
      - `AddressLine2` string — max length = 500
      - `AddressLine3` string — max length = 500
      - `AddressLine4` string — max length = 500
      - `City` string — max length = 255
      - `Region` string — max length = 255
      - `PostalCode` string — max length = 50
      - `Country` string — max length = 50, [A-Z], [a-z] only
      - `AttentionTo` string — max length = 255
    - `Phones` Phone[] — Store certain phone types for a contact – see phone types
      - `PhoneType` 'DEFAULT' | 'DDI' | 'MOBILE' | 'FAX' | 'OFFICE'
      - `PhoneNumber` string — max length = 50
      - `PhoneAreaCode` string — max length = 10
      - `PhoneCountryCode` string — max length = 20
    - `IsSupplier` boolean — true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts payable invoice is generated against this contact.
    - `IsCustomer` boolean — true or false – Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts receivable invoice is generated against this contact.
    - `SalesDefaultLineAmountType` 'INCLUSIVE' | 'EXCLUSIVE' | 'NONE' — The default sales line amount type for a contact. Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
    - `PurchasesDefaultLineAmountType` 'INCLUSIVE' | 'EXCLUSIVE' | 'NONE' — The default purchases line amount type for a contact Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
    - `DefaultCurrency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EEK' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SKK' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZMK' | 'ZWD' — 3 letter alpha code for the currency – see list of currency codes
    - `XeroNetworkKey` string — Store XeroNetworkKey for contacts.
    - `SalesDefaultAccountCode` string — The default sales account code for contacts
    - `PurchasesDefaultAccountCode` string — The default purchases account code for contacts
    - `SalesTrackingCategories` SalesTrackingCategory[] — The default sales tracking categories for contacts
      - `TrackingCategoryName` string — The default sales tracking category name for contacts
      - `TrackingOptionName` string — The default purchase tracking category name for contacts
    - `PurchasesTrackingCategories` SalesTrackingCategory[] — The default purchases tracking categories for contacts
      - `TrackingCategoryName` string — The default sales tracking category name for contacts
      - `TrackingOptionName` string — The default purchase tracking category name for contacts
    - `TrackingCategoryName` string — The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
    - `TrackingCategoryOption` string — The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
    - `PaymentTerms` PaymentTerm
      - `Bills` Bill
        - `Day` integer — Day of Month (0-31)
        - `Type` 'DAYSAFTERBILLDATE' | 'DAYSAFTERBILLMONTH' | 'OFCURRENTMONTH' | 'OFFOLLOWINGMONTH'
      - `Sales` Bill
        - `Day` integer — Day of Month (0-31)
        - `Type` 'DAYSAFTERBILLDATE' | 'DAYSAFTERBILLMONTH' | 'OFCURRENTMONTH' | 'OFFOLLOWINGMONTH'
    - `UpdatedDateUTC` string — UTC timestamp of last update to contact
    - `ContactGroups` ContactGroup[] — Displays which contact groups a contact is included in
      - `Name` string — The Name of the contact group. Required when creating a new contact group
      - `Status` 'ACTIVE' | 'DELETED' — The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are returned on GETs.
      - `ContactGroupID` string, uuid — The Xero identifier for an contact group – specified as a string following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
      - `Contacts` Contact[] — The ContactID and Name of Contacts in a contact group. Returned on GETs when the ContactGroupID is supplied in the URL.
    - `Website` string — Website address for contact (read only)
    - `BrandingTheme` BrandingTheme
      - `BrandingThemeID` string, uuid — Xero identifier
      - `Name` string — Name of branding theme
      - `LogoUrl` string — The location of the image file used as the logo on this branding theme
      - `Type` 'INVOICE' — Always INVOICE
      - `SortOrder` integer — Integer – ranked order of branding theme. The default branding theme has a value of 0
      - `CreatedDateUTC` string — UTC timestamp of creation date of branding theme
    - `BatchPayments` BatchPaymentDetails — Bank details for use on a batch payment stored with each contact
      - `BankAccountNumber` string — Bank account number for use with Batch Payments
      - `BankAccountName` string — Name of bank for use with Batch Payments
      - `Details` string — (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
      - `Code` string — (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
      - `Reference` string — (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
    - `Discount` number, double — The default discount rate for the contact (read only)
    - `Balances` Balances — The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only)
      - `AccountsReceivable` AccountsReceivable
        - `Outstanding` number, double
        - `Overdue` number, double
      - `AccountsPayable` AccountsPayable
        - `Outstanding` number, double
        - `Overdue` number, double
    - `Attachments` Attachment[] — Displays array of attachments from the API
      - `AttachmentID` string, uuid — Unique ID for the file
      - `FileName` string — Name of the file
      - `Url` string — URL to the file on xero.com
      - `MimeType` string — Type of file
      - `ContentLength` integer — Length of the file content
      - `IncludeOnline` boolean — Include the file with the online invoice
    - `HasAttachments` boolean — A boolean to indicate if a contact has an attachment
    - `ValidationErrors` ValidationError[] — Displays validation errors returned from the API
      - `Message` string — Validation error message
    - `HasValidationErrors` boolean — A boolean to indicate if a contact has an validation errors
    - `StatusAttributeString` string — Status of object

## Other responses

- `400` — A failed request due to validation error

---

[API](https://skmtc.net/xeroapi/apis/xero-accounting-api.md) · [All operations](https://skmtc.net/xeroapi/apis/xero-accounting-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xeroapi/xero-accounting-api/versions/dc231cafd8de/schema)
