# Update collection agency

Endpoint: PUT /companies/{companyId}/collection-agencies/{collectionAgencyId}
Version: 2023-11-29
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

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

  - `collectionAgencyId` (string, required)
    The ID of the collection agency

## Request fields (application/json):

  - `externalId` (string,null)
    A lender's identifier for an object.

After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.

To fetch the object using externalId you need to add ext- to the URL.

Note: Don't add ext- to the identifier value. For example: if the external identifier is ABCDE, then pass externalId=ABCDE and NOT ext-ABCDE when creating the object.

  - `contactEmail` (string)
    The third party debt collection agency email address that the charged-off loan was assigned to.

  - `contactPhone` (string)
    The third party debt collection agency primary phone that the charged-off loan was assigned to. Should be provided in E.164 format.

  - `legalName` (string)
    The third party debt collection agency name that the charged-off loan was assigned to.

  - `mailingAddress` (object)
    The mailing address.

  - `mailingAddress.POBox` (string,null)
    Post Office Box

  - `mailingAddress.addressLine1` (string)
    Address line 1.

If company.allowPartialAddress=false, then this field is required, else it is not required

  - `mailingAddress.addressLine2` (string,null)
    Address line 2.

  - `mailingAddress.city` (string)
    City.

  - `mailingAddress.country` (string)
    Country. English short name according to
[ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.

  - `mailingAddress.countyOrRegion` (string,null)
    County or region.

  - `mailingAddress.postalCode` (string)
    Postal code. Also known as ZIP code.

  - `mailingAddress.state` (string,null)
    State/Province. This is a required field if the country is US or CA.

  - `isArchived` (boolean)
    Set to true if the debt collection agency no longer active. Loans that were assigned to that agency will keep the reference, but new loans cannot be assigned.

## Response 200 fields (application/json):

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

  - `status` (integer)
    HTTP status code.

  - `data` (object)


