> ## 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 a person

> You can update a person's first and last name, their title, middle initials, date of birth, gender, nationality, country of residence, and primary mob

# Step 4: update a person

You can update a person's first and last name, their title, middle initials, date of birth, gender, nationality, country of residence, and primary mobile number.

In this example, we're only updating our person's country of residence and primary phone number.

<Info>
  The `accountId` is a required parameter, everything else is optional.
</Info>

<CodeGroup>
  ```bash Sandbox theme={null}
  curl -i -X PATCH \
    'https://api-sandbox.equalsmoney.com/v2/people/{personId} \
    -H 'Authorization: ApiKey {apiKey}' \
    -H 'Content-Type: application/json' \
    -d '{
      "accountId": "F12345",
      "countryOfResidence": "US",
      "primaryMobileNumber": "+447798121212"
    }'
  ```

  ```bash Production theme={null}
  curl -i -X PATCH \
    'https://api.equalsmoney.com/v2/people/{personId}' \
    -H 'Authorization: ApiKey {apiKey}' \
    -H 'Content-Type: application/json' \
    -d '{
      "accountId": "F12345",
      "countryOfResidence": "US",
      "primaryMobileNumber": "+447798121212"
    }'
  ```
</CodeGroup>

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

```json 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": null,
  "middleInitials": null,
  "dob": null,
  "gender": null,
  "nationality": null,
  "countryOfResidence": "US", # The updated country of residence
  "status": "active",
  "primaryMobileNumber": "+447798121212", # The update phone number
  "primaryEmailAddress": "a.abraham@acme.com",
  "createdAt": "2024-01-02T13:47:01.000Z",
  "updatedAt": "2024-01-02T14:07:10.000Z",
  "emailTheme": "em-light",
  "persona": {
    "id": "32684fcd-b4be-438a-88d2-ee9b5f3eecd3",
    "emailAddress": "a.abraham@acme.com",
    "employeeNumber": null,
    "workNumber": null,
    "status": "invited",
    "jobTitle": null,
    "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"
  }
}
```
