# Update credit agency

Endpoint: PUT /companies/{companyId}/credit-agencies/{creditAgencyId}
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `companyId` (string, required)
    The unique company identifier.

  - `creditAgencyId` (string, required)
    The ID of the credit agency

## Request fields (application/json):

  - `agencyName` (string)
    The credit agency name.
    Enum: "experian", "equifax", "transUnion", "innovis"

  - `country` (string)
    The credit agency country.

  - `dataFormat` (string)
    The format of the reported data and file.
    Enum: "metro2"

  - `encryptionMethod` (string)
    The encryption method that Peach system with use to encrypt the files.
    Enum: "GPG"

  - `fileNamePrefix` (string)
    The file name prefix. Must be provided if `agencyName=experian` and `nameFilePerAgencyConvention=true`. Only used if `agencyName=experian` and `nameFilePerAgencyConvention=true`.

  - `isPeachAggregator` (boolean)
    **DEPRECATED ATTRIBUTE**
This field is deprecated, and is only included to remain backward compatible. Only send `false`.

  - `nameFilePerAgencyConvention` (boolean)
    If `true` Peach system will name the file based on the credit agency convention.
**Equifax**: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt.
For example: `PEACHFINANCEINCCPYL69X5Z1EQUIFAX20211021.txt`.
**Experian**: `fileNamePrefix` + `.` + today's date MMDDYYYY + .txt.
For example: MKFRT.10262021.txt.
**TransUnion**: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt.
For example: `PEACHFINANCEINCCPYL69X5Z1TRANSUNION20211213.txt`.
If `false` Peach system will name the file as:
Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt
For example: `PEACHFINANCEINCCPYL69X5Z1EXPERIAN20211021.txt`

  - `publicKey` (string)
    The lender's public key to use to encrypt the files. A value must be passed if encryptionMethod is set.

  - `sftpAccessMethod` (string)
    If `usernamePassword`, then `sftpUsername` and `sftpPassword` must be provided.
If `keys`, then `sftpSSHPeachPrivateKey` and `sftpSSHPeachPublicKey` will be created by peach.
    Enum: "usernamePassword", "keys"

  - `sftpCdDir` (string)
    Change directory into this folder before performing the upload.

  - `sftpHostname` (string)
    The SFTP hostname. If SFTP hostname, username, and password are set, they will be used instead of the default credit bureau credentials.
Host name should not contain a scheme, so don't put `sftp://` on the front. You may optionally specify a port like so: `example.com:222`.
If no port is supplied a default of 22 will be used.

  - `sftpPassword` (string)
    The password for SFTP.

  - `sftpUsername` (string)
    The username for SFTP.

  - `specificDays` (array)
    Specific days designate the day(s) when to upload the credit reporting file. Only the 1st day of the month is currently supported.
The allowed values for specific day(s) depends on the uploadFrequency.
`monthly` - provide one number in the valid range 1-31. 1=first day of a month. Use 31 to indicate the last day of a month.
For example: [1].

  - `uploadFrequency` (string)
    The credit reporting file creation frequency. Only monthly is currently supported.
    Enum: "monthly"

  - `useLoanExternalId` (boolean)
    Indicates what identifier to use as an account identifier for credit reporting.
If `true`, the system will use loan `externalId` as an account identifier for credit reporting. If `externalId` doesn't exist the system will use loan Peach Public ID.
If `false`, the system will use loan Peach Public ID (e.g. LN-JFU3-ER3S) as an account identifier for credit reporting.

## Response 200 fields (application/json):

  - `message` (string)
    Description of the server action or error.

  - `status` (integer)
    HTTP status code.

  - `data` (object)

  - `data.createdAt` (string)

  - `data.deletedAt` (string)

  - `data.id` (string)

  - `data.updatedAt` (string)

  - `data.agencyName` (string)
    The credit agency name.
    Enum: "experian", "equifax", "transUnion", "innovis"

  - `data.companyId` (string)
    The unique company identifier.

  - `data.country` (string)
    The credit agency country.

  - `data.dataFormat` (string)
    The format of the reported data and file.
    Enum: "metro2"

  - `data.encryptionMethod` (string)
    The encryption method that Peach system with use to encrypt the files.
    Enum: "GPG"

  - `data.fileNamePrefix` (string)
    The file name prefix. Must be provided if `agencyName=experian` and `nameFilePerAgencyConvention=true`. Only used if `agencyName=experian` and `nameFilePerAgencyConvention=true`.

  - `data.isPeachAggregator` (boolean)
    **DEPRECATED ATTRIBUTE**
This field is deprecated, and is only included to remain backward compatible. Only send `false`.

  - `data.nameFilePerAgencyConvention` (boolean)
    If `true` Peach system will name the file based on the credit agency convention.
**Equifax**: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt.
For example: `PEACHFINANCEINCCPYL69X5Z1EQUIFAX20211021.txt`.
**Experian**: `fileNamePrefix` + `.` + today's date MMDDYYYY + .txt.
For example: MKFRT.10262021.txt.
**TransUnion**: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt.
For example: `PEACHFINANCEINCCPYL69X5Z1TRANSUNION20211213.txt`.
If `false` Peach system will name the file as:
Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt
For example: `PEACHFINANCEINCCPYL69X5Z1EXPERIAN20211021.txt`

  - `data.publicKey` (string)
    The lender's public key to use to encrypt the files. A value must be passed if encryptionMethod is set.

  - `data.sftpAccessMethod` (string)
    If `usernamePassword`, then `sftpUsername` and `sftpPassword` must be provided.
If `keys`, then `sftpSSHPeachPrivateKey` and `sftpSSHPeachPublicKey` will be created by peach.
    Enum: "usernamePassword", "keys"

  - `data.sftpCdDir` (string)
    Change directory into this folder before performing the upload.

  - `data.sftpHostname` (string)
    The SFTP hostname. If SFTP hostname, username, and password are set, they will be used instead of the default credit bureau credentials.
Host name should not contain a scheme, so don't put `sftp://` on the front. You may optionally specify a port like so: `example.com:222`.
If no port is supplied a default of 22 will be used.

  - `data.sftpPassword` (string)
    The password for SFTP.

  - `data.sftpSSHPeachPrivateKey` (string)
    An opaque reference to Peach's SSH private key, used internally to authenticate with `sftpHostname`. Only populated when `sftpAccessMethod` is `keys`.

  - `data.sftpSSHPeachPublicKey` (string)
    Peach's SSH public key to be whitelisted on `sftpHostname`. Only populated when `sftpAccessMethod` is `keys`.

  - `data.sftpUsername` (string)
    The username for SFTP.

  - `data.specificDays` (array)
    Specific days designate the day(s) when to upload the credit reporting file. Only the 1st day of the month is currently supported.
The allowed values for specific day(s) depends on the uploadFrequency.
`monthly` - provide one number in the valid range 1-31. 1=first day of a month. Use 31 to indicate the last day of a month.
For example: [1].

  - `data.uploadFrequency` (string)
    The credit reporting file creation frequency. Only monthly is currently supported.
    Enum: "monthly"

  - `data.useLoanExternalId` (boolean)
    Indicates what identifier to use as an account identifier for credit reporting.
If `true`, the system will use loan `externalId` as an account identifier for credit reporting. If `externalId` doesn't exist the system will use loan Peach Public ID.
If `false`, the system will use loan Peach Public ID (e.g. LN-JFU3-ER3S) as an account identifier for credit reporting.

