---
title: "Create customers (recommended method)"
method: POST
path: "/customersBatch"
tags: ["Customers"]
---

# Create customers (recommended method)

`POST /customersBatch`

## Request

- Base URL: `https://api.trueaccord.com/api/v1`
- URL: `https://api.trueaccord.com/api/v1/customersBatch`
- Auth: none declared
- TypeScript: <https://skmtc.dev/trueaccord/apis/trueaccord-api/docs/customersBatch/post.ts> (a function with typed inputs; its response is checked against the schema)

Updated version of the `/customers` endpoint. `/customersBatch` (this endpoint) is recommended to use over `/customers`. The response mirrors the request and also includes the results or errors per account.

## Request body

- object
  - `responses` CustomerRequest[]
    - `name` object, required
      - `firstName` string, required
      - `middleName` string
      - `lastName` string, required
    - `dateOfBirth` Date
      - `day` integer: Day of the calendar year.
      - `month` integer: Month of calendar year.
      - `year` integer: Calendar year.
    - `businesses` object[]: Use the `businesses` array to provide one or more businesses names associated with this customer.
      - `name` string
      - `url` string
    - `addresses` object[]
      - `streetLine1` string
      - `streetLine2` string
      - `city` string, required
      - `state` string, required
      - `zipcode` string, required
      - `countryCode` string, required
      - `types` string[]
    - `phones` object[]
      - `phoneNumber` string, required
      - `types` string[]: Can contain the following strings: 'HOME', 'WORK', 'CELL', 'FAX', or 'BUSINESS'. The types argument can be left blank if context doesn't exist.
    - `emails` object[]
      - `email` string, required
      - `types` string[]: Can contain the following strings: 'HOME' or 'WORK'
    - `comments` object[]: The `comments` array can be used to provide us with context you may have about this customer.
      - `comment` string, required
    - `reference` string: The reference is a string used to attach your (client's) system's customer unique ID to this object.
    - `debts` Debt[]
      - `biller` string: For aggregators and marketplaces: this field stores the name of your sub merchant.
      - `product` string: description of the product or service associated with this debt.
      - `initialPrincipal` MonetaryAmount
        - `amount` integer
        - `currency` string
      - `initialInterest` MonetaryAmount
        - `amount` integer
        - `currency` string
      - `initialFees` MonetaryAmount
        - `amount` integer
        - `currency` string
      - `postChargeOffInformation` PostChargeOffInformation: information relevant for post charge-off debts. Required for accounts in the state of NY.
        - `balanceAtChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
        - `chargeOffTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
        - `feesAccruedSinceChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
        - `interestAccruedSinceChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
        - `totalPaidSinceChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
      - `transactionId` string: arbitrary string that you can use to store a reference to the transaction on your system.
      - `transactionIp` string: IP address associated with this transaction. Either in IPv4 or IPv6 format.
      - `transactionTimestamp` integer: time that the transaction leading to the debt occurred, if applicable. Format: milliseconds since Jan 1st, 1970 UTC. For example, the origination date of the loan or the date the customer purchased the product which led to the debt. This should be **before** the `defaultTimestamp`. Note that this date may be shown to the customer to provide context on the debt, and also has ramifications in our system's compliance rules.
      - `defaultTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
      - `accountOpenTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
      - `clientFields` object: Client-specific key-value pairs.
      - `sendCbrNegativeNotice` boolean: Boolean flag indicating whether a negative notice **WILL BE** submitted to a credit bureau in the future.
      - `hasSentCbrNegativeNotice` boolean: Boolean flag indicating whether a negative notice **HAS BEEN** submitted to a credit bureau in the past.
    - `ssn` string
  - `addDebtsIfPossible` boolean: Optional boolean flag to add new debts to customers in the request if they have already been placed.
  - `customersWithAddedDebts` Customer[]: Existing customers who had a new debt added
    - `meta` Meta
      - `id` string
      - `isActive` boolean: Indicates whether an object is active in the system. If a customer or a debt are inactive, our system will not attempt to collect them.
      - `isPrimary` boolean: If the object appears in a list of objects (like emails, or phones) this indicates whether that object has priority over others. There can be at most one primary object in a list.
      - `timeCreated` integer: Milliseconds since Jan 1st, 1970 UTC.
      - `lastModified` integer: Milliseconds since Jan 1st, 1970 UTC.
    - `name` object, required
      - `firstName` string, required
      - `middleName` string
      - `lastName` string, required
    - `dateOfBirth` Date
      - `day` integer: Day of the calendar year.
      - `month` integer: Month of calendar year.
      - `year` integer: Calendar year.
    - `businesses` object[]: Use the `businesses` array to provide one or more businesses names associated with this customer.
      - `name` string
      - `url` string
    - `addresses` object[]
      - `streetLine1` string
      - `streetLine2` string
      - `city` string, required
      - `state` string, required
      - `zipcode` string, required
      - `countryCode` string, required
      - `types` string[]
    - `phones` object[]
      - `phoneNumber` string, required
      - `types` string[]: Can contain the following strings: 'HOME', 'WORK', 'CELL', 'FAX', or 'BUSINESS'. The types argument can be left blank if context doesn't exist.
    - `emails` object[]
      - `email` string, required
      - `types` string[]: Can contain the following strings: 'HOME' or 'WORK'
    - `comments` object[]: The `comments` array can be used to provide us with context you may have about this customer.
      - `comment` string, required
    - `reference` string: The reference is a string used to attach your (client's) system's customer unique ID to this object.
    - `debts` Debt[]
      - `biller` string: For aggregators and marketplaces: this field stores the name of your sub merchant.
      - `product` string: description of the product or service associated with this debt.
      - `initialPrincipal` MonetaryAmount
        - `amount` integer
        - `currency` string
      - `initialInterest` MonetaryAmount
        - `amount` integer
        - `currency` string
      - `initialFees` MonetaryAmount
        - `amount` integer
        - `currency` string
      - `postChargeOffInformation` PostChargeOffInformation: information relevant for post charge-off debts. Required for accounts in the state of NY.
        - `balanceAtChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
        - `chargeOffTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
        - `feesAccruedSinceChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
        - `interestAccruedSinceChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
        - `totalPaidSinceChargeOff` MonetaryAmount
          - `amount` integer
          - `currency` string
      - `transactionId` string: arbitrary string that you can use to store a reference to the transaction on your system.
      - `transactionIp` string: IP address associated with this transaction. Either in IPv4 or IPv6 format.
      - `transactionTimestamp` integer: time that the transaction leading to the debt occurred, if applicable. Format: milliseconds since Jan 1st, 1970 UTC. For example, the origination date of the loan or the date the customer purchased the product which led to the debt. This should be **before** the `defaultTimestamp`. Note that this date may be shown to the customer to provide context on the debt, and also has ramifications in our system's compliance rules.
      - `defaultTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
      - `accountOpenTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
      - `clientFields` object: Client-specific key-value pairs.
      - `sendCbrNegativeNotice` boolean: Boolean flag indicating whether a negative notice **WILL BE** submitted to a credit bureau in the future.
      - `hasSentCbrNegativeNotice` boolean: Boolean flag indicating whether a negative notice **HAS BEEN** submitted to a credit bureau in the past.
    - `ssn` string

## Response `201`

In the case where the request succeeds, the response will mirror your request but with an additional `meta` field that can be used in the future to reference the customer objects you have created. If `addDebtsIfPossible` is flagged, the response will mirror your request with new customers, and also include a flag for `isAddedDebt` if an existing customer had another debt placed.

If there are any duplicate references/transaction ids or any other issues with a placed customer, it will be visible in the response with the flag `isError`.

- object
  - `responses` union[]
    - union
      - object
        - `isAddedDebt` boolean
        - `customer` Customer: For best results, you should specify as many fields as possible in the Customers object. Besides the above mandatory fields, all other fields are optional. If you have no value to supply for a field, you can omit it in your request.
          - `meta` Meta
            - `id` string
            - `isActive` boolean: Indicates whether an object is active in the system. If a customer or a debt are inactive, our system will not attempt to collect them.
            - `isPrimary` boolean: If the object appears in a list of objects (like emails, or phones) this indicates whether that object has priority over others. There can be at most one primary object in a list.
            - `timeCreated` integer: Milliseconds since Jan 1st, 1970 UTC.
            - `lastModified` integer: Milliseconds since Jan 1st, 1970 UTC.
          - `name` object, required
            - `firstName` string, required
            - `middleName` string
            - `lastName` string, required
          - `dateOfBirth` Date
            - `day` integer: Day of the calendar year.
            - `month` integer: Month of calendar year.
            - `year` integer: Calendar year.
          - `businesses` object[]: Use the `businesses` array to provide one or more businesses names associated with this customer.
            - `name` string
            - `url` string
          - `addresses` object[]
            - `streetLine1` string
            - `streetLine2` string
            - `city` string, required
            - `state` string, required
            - `zipcode` string, required
            - `countryCode` string, required
            - `types` string[]
          - `phones` object[]
            - `phoneNumber` string, required
            - `types` string[]: Can contain the following strings: 'HOME', 'WORK', 'CELL', 'FAX', or 'BUSINESS'. The types argument can be left blank if context doesn't exist.
          - `emails` object[]
            - `email` string, required
            - `types` string[]: Can contain the following strings: 'HOME' or 'WORK'
          - `comments` object[]: The `comments` array can be used to provide us with context you may have about this customer.
            - `comment` string, required
          - `reference` string: The reference is a string used to attach your (client's) system's customer unique ID to this object.
          - `debts` Debt[]
            - `biller` string: For aggregators and marketplaces: this field stores the name of your sub merchant.
            - `product` string: description of the product or service associated with this debt.
            - `initialPrincipal` MonetaryAmount
              - …
            - `initialInterest` MonetaryAmount
              - …
            - `initialFees` MonetaryAmount
              - …
            - `postChargeOffInformation` PostChargeOffInformation: information relevant for post charge-off debts. Required for accounts in the state of NY.
              - …
            - `transactionId` string: arbitrary string that you can use to store a reference to the transaction on your system.
            - `transactionIp` string: IP address associated with this transaction. Either in IPv4 or IPv6 format.
            - `transactionTimestamp` integer: time that the transaction leading to the debt occurred, if applicable. Format: milliseconds since Jan 1st, 1970 UTC. For example, the origination date of the loan or the date the customer purchased the product which led to the debt. This should be **before** the `defaultTimestamp`. Note that this date may be shown to the customer to provide context on the debt, and also has ramifications in our system's compliance rules.
            - `defaultTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
            - `accountOpenTimestamp` integer: Milliseconds since Jan 1st, 1970 UTC.
            - `clientFields` object: Client-specific key-value pairs.
            - `sendCbrNegativeNotice` boolean: Boolean flag indicating whether a negative notice **WILL BE** submitted to a credit bureau in the future.
            - `hasSentCbrNegativeNotice` boolean: Boolean flag indicating whether a negative notice **HAS BEEN** submitted to a credit bureau in the past.
          - `ssn` string
      - CustomersBatchError: Response error for the customersBatch endpoint.
        - `isError` boolean
        - `error` object
          - `errorCode` string
          - `message` string
          - `reference` string
          - `transactionId` string

---

[API](https://skmtc.dev/trueaccord/apis/trueaccord-api.md) - [All operations](https://skmtc.dev/trueaccord/apis/trueaccord-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trueaccord/apis/trueaccord-api/revisions/93d3c0ce897d?raw)
