> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equalsmoney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update people

> Update a person's details, such as their last name or phone number.

Update a person's details, such as their last name or phone number.

## Update a person

<Note>
  **PATCH** `/v2/people/{personId}`
</Note>

### Request

Use this request to update or add details about a given person, such as their last name or their phone number. The `accountId` is required and any other parameters are optional, depending on what you want to update.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X PATCH \
    'https://api.equalsmoney.com/v2/people/ef6d922f-70d5-4433-835c-8c77fa40d814' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "accountId": "F12345",
      "title": "Ms",
      "middleInitials": "A",
      "gender": "Female"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X PATCH \
    'https://api.equalsmoney.com/v2/people/{personId} \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "accountId": "string",
      "title": "string",
      "middleInitials": "string",
      "gender": "string"
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="personId" type="string" required>
  The ID of the person that you want to update.

  Allowable values: An existing `personId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to work with.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

<ParamField body="firstName" type="string">
  The person's first name.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="lastName" type="string">
  The person's last name.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="title" type="string or null">
  The person's first name.

  Allowable values: `Master`, `Mr`, `Miss`, `Mrs`, `Ms`, `Mx`
</ParamField>

<ParamField body="middleInitials" type="string or null">
  The person's middle initials.

  Allowable values: ≤ 10 characters
</ParamField>

<ParamField body="dob" type="string (date) or null">
  The person's middle initials.

  Allowable values: YYYY-MM-DD
</ParamField>

<ParamField body="gender" type="string or null">
  The person's gender.

  Allowable values: ≤ 20 characters
</ParamField>

<ParamField body="nationality" type="string or null">
  The person's nationality.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="countryOfResidence" type="string or null">
  The person's country of residence.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="primaryMobileNumber" type="string">
  The person's primary mobile phone number.

  Allowable values: ≤ 50 characters
</ParamField>

<ParamField body="emailTheme" type="string or null">
  The theme used in emails sent to this person.

  Allowable values: `em-light`, `em-dark`
</ParamField>

<ParamField body="transactionalEmailPreference" type="boolean or null">
  Whether or not all the personas associated with this person have opted to receive emails.

  Allowable values: `true`, `false`
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing the updated details for this person.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "avatar": {
      "url": "",
      "fileName": ""
    },
    "id": "ef6d922f-70d5-4433-835c-8c77fa40d814",
    "productId": "d926625b-5e11-4ec1-b4cd-0af2a8021efc",
    "sub": "2a5a39cf-fda0-4901-9372-3f9039a2ee94",
    "firstName": "Alison",
    "lastName": "Abraham",
    "title": "Ms",
    "middleInitials": "A",
    "dob": "1996-07-17",
    "gender": "Female",
    "nationality": null,
    "countryOfResidence": null,
    "status": "active",
    "primaryMobileNumber": "+447798121212",
    "primaryEmailAddress": "a.abraham@acme.com",
    "createdAt": "2024-01-02T13:47:01.000Z",
    "updatedAt": "2024-01-02T13:47:02.000Z",
    "emailTheme": "em-light",
    "persona": {
      "id": "32684fcd-b4be-438a-88d2-ee9b5f3eecd3",
      "emailAddress": "a.abraham@acme.com",
      "employeeNumber": "948",
      "workNumber": null,
      "status": "invited",
      "jobTitle": "Administrative Assistant",
      "createdByPersonaId": null,
      "transactionalEmailPreference": true,
      "cardTransactionPushNotificationPreference": false,
      "createdAt": "2024-01-02T13:47:02.000Z",
      "updatedAt": "2024-01-02T13:47:02.000Z",
      "inviteSentDate": "2024-01-02T13:47:02.000Z"
    }
  }
  ```

  ```json Response structure theme={null}
  {
    "avatar": {
      "url": "string",
      "fileName": "string"
    },
    "id": "string",
    "productId": "string",
    "sub": "string",
    "firstName": "string",
    "lastName": "string",
    "title": "string",
    "middleInitials": "string",
    "dob": "string",
    "gender": "string",
    "nationality": "string",
    "countryOfResidence": "string",
    "status": "string",
    "primaryMobileNumber": "string",
    "primaryEmailAddress": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "emailTheme": "string",
    "persona": {
      "id": "string",
      "emailAddress": "string",
      "employeeNumber": "string",
      "workNumber": "string",
      "status": "string",
      "jobTitle": "string",
      "createdByPersonaId": "string",
      "transactionalEmailPreference": boolean,
      "cardTransactionPushNotificationPreference": boolean,
      "createdAt": "string",
      "updatedAt": "string",
      "inviteSentDate": "string"
    }
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/people/update-a-person).
