# Update identity

For primary identities, the isArchived field cannot be changed.

Endpoint: PUT /people/{personId}/identities/{personIdentityId}
Version: 2023-11-29
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `personId` (string, required)
    A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

  - `personIdentityId` (string, required)
    An identity's unique identifier.

## Request fields (application/json):

  - `customIdentityTypeName` (string)
    The name of a personal or business ID. Required if identityType=customID. This needs to be "one word"
only US (a-zA-Z) letters. No numbers.

For example: Metrica Consular Card for Mexicans living abroad.
- identityType=customID
- customIdentityTypeName=metricaConsularCard

  - `expirationDate` (string,null)
    Date the identification expires.

  - `identityType` (string)
    Personal and business identifiers that are supported.
customID can be used for personal or business IDs that are not explicitly listed as one of the enum values.
If you pass identityType=customID, a customIdentityTypeName is also required.

For example: Metrica Consular Card for Mexicans living abroad.
- identityType=customID
- customIdentityTypeName=metricaConsularCard
    Enum: "SSN", "ITIN", "passport", "driversLicense", "taxID", "FEIN", "stateID", "customID"

  - `issueDate` (string,null)
    Date the identification was issued.

  - `issuingCountry` (string)
    Country that issued the identification. English short name according to ISO 3166-1 standard.

  - `valid` (boolean)
    Whether the identity is valid.

  - `value` (string)
    The value of a personal identifier. For example, 123456789.

  - `isArchived` (boolean)
    Determines whether the identity has been archived. By default, only non-archived
identities are shown. Cannot be changed for primary identities.

  - `caseId` (string)
    An identifier for an existing case.

## Response 200 fields (application/json):

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

  - `status` (integer)
    HTTP status code.

  - `data` (object)
    The borrower's identifier. For example, the Social Security number.

  - `data.createdAt` (string)

  - `data.customIdentityTypeName` (string)
    The name of a personal or business ID. Required if identityType=customID. This needs to be "one word"
only US (a-zA-Z) letters. No numbers.

For example: Metrica Consular Card for Mexicans living abroad.
- identityType=customID
- customIdentityTypeName=metricaConsularCard

  - `data.deletedAt` (string,null)

  - `data.expirationDate` (string,null)
    Date the identification expires.

  - `data.id` (string)

  - `data.identityType` (string)
    Personal and business identifiers that are supported.
customID can be used for personal or business IDs that are not explicitly listed as one of the enum values.
If you pass identityType=customID, a customIdentityTypeName is also required.

For example: Metrica Consular Card for Mexicans living abroad.
- identityType=customID
- customIdentityTypeName=metricaConsularCard
    Enum: "SSN", "ITIN", "passport", "driversLicense", "taxID", "FEIN", "stateID", "customID"

  - `data.issueDate` (string,null)
    Date the identification was issued.

  - `data.issuingCountry` (string)
    Country that issued the identification. English short name according to ISO 3166-1 standard.

  - `data.object` (string)
    Enum: "identity"

  - `data.updatedAt` (string,null)

  - `data.valid` (boolean)
    Whether the identity is valid.

  - `data.value` (string)
    The value of a personal identifier. For example, 123456789.

  - `data.isArchived` (boolean)
    Determines whether the identity has been archived. By default, only non-archived
identities are shown. Cannot be changed for primary identities.

  - `data.isPrimary` (boolean)
    Whether the identity is the borrower's primary identity or not. A borrower may
only have one primary identity. Primary identities can be created when
creating a borrower, or separately.


