> For the complete documentation index, see [llms.txt](https://paas.docs.machnetinc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paas.docs.machnetinc.com/api-references/user/user-kyc.md).

# Update User

This API allows you to update the user information. You can provide all the required user information at once. You can also update the user information partially by using this API multiple times as required. Details on what fields can be updated when a user is verified and not verified are provided below.

#### `PATCH /users/{{user_id}}`

{% tabs %}
{% tab title="Individual" %}
**Updatable fields for send user (individual)**

| **Fields**          | **User is verified** | **User is not verified** | **Additional details**                                                                            |
| ------------------- | -------------------- | ------------------------ | ------------------------------------------------------------------------------------------------- |
| first\_name         | No                   | Yes                      |                                                                                                   |
| middle\_name        | No                   | Yes                      |                                                                                                   |
| last\_name          | No                   | Yes                      |                                                                                                   |
| mobile\_phone       | Yes                  | Yes                      |                                                                                                   |
| email               | No                   | Yes                      |                                                                                                   |
| address\_line1      | Yes                  | Yes                      |                                                                                                   |
| address\_line2      | Yes                  | Yes                      |                                                                                                   |
| city                | Yes                  | Yes                      |                                                                                                   |
| state               | Yes                  | Yes                      |                                                                                                   |
| country             | No                   | No                       |                                                                                                   |
| zipcode             | Yes                  | Yes                      |                                                                                                   |
| date\_of\_birth     | No                   | Yes                      |                                                                                                   |
| gender              | No                   | Yes                      |                                                                                                   |
| user\_scope         | No                   | Yes                      |                                                                                                   |
| occupation          | Yes                  | Yes                      |                                                                                                   |
| type                | No                   | No                       |                                                                                                   |
| physical\_documents | Yes                  | Yes                      | Updating physical\_document object will add a new copy of the document and archive the older one. |
| virtual\_documents  | Conditional          | Yes                      | SSN is not updatable once user is verified.                                                       |
| company\_details    | Yes                  | Yes                      |                                                                                                   |
| {% endtab %}        |                      |                          |                                                                                                   |

{% tab title="Business" %}
**Updatable fields for send user (business)**

| **Fields**                                                                       | **User is verified** | **User is not verified** | **Additional details**                                                                                       |
| -------------------------------------------------------------------------------- | -------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------ |
| first\_name                                                                      | No                   | Yes                      |                                                                                                              |
| mobile\_phone                                                                    | Yes                  | Yes                      |                                                                                                              |
| email                                                                            | Yes                  | Yes                      |                                                                                                              |
| address\_line1                                                                   | Yes                  | Yes                      |                                                                                                              |
| address\_line2                                                                   | Yes                  | Yes                      |                                                                                                              |
| city                                                                             | Yes                  | Yes                      |                                                                                                              |
| state                                                                            | Yes                  | Yes                      |                                                                                                              |
| country                                                                          | No                   | No                       |                                                                                                              |
| zipcode                                                                          | Yes                  | Yes                      |                                                                                                              |
| date\_of\_birth                                                                  | No                   | Yes                      |                                                                                                              |
| business                                                                         | No                   | No                       |                                                                                                              |
| business\_type                                                                   | No                   | Yes                      |                                                                                                              |
| user\_scope                                                                      | No                   | Yes                      |                                                                                                              |
| company\_website                                                                 | Yes                  | Yes                      |                                                                                                              |
| number\_of\_employee                                                             | Yes                  | Yes                      |                                                                                                              |
| mailing\_address (address\_line1, address\_line2, city, state, country, zipcode) | Yes                  | Yes                      |                                                                                                              |
| virtual\_documents                                                               | No                   | Yes                      |                                                                                                              |
| physical\_documents                                                              | Conditional          | Yes                      | Physical documents of type EIN and CERTIFICATION\_OF\_INCORPORATION cannot be updated once user is verified. |
| user\_relationship                                                               | No                   | No                       |                                                                                                              |
| number\_of\_transaction\_per\_month                                              | Yes                  | Yes                      |                                                                                                              |
| transaction\_frequency                                                           | Yes                  | Yes                      |                                                                                                              |

{% endtab %}

{% tab title="Request Sample" %}
**Individual User**

```
curl --location -g --request PATCH '{{url}}/users/{{user_id}}' \
--header 'X-Client-Id: {{client_id}}' \
--header 'X-Client-Secret: {{client_secret}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "first_name":"Tenzin",
  "middle_name":"",
  "last_name":"Norgay",
  "date_of_birth":"2000-01-01",
  "email":"norgay@test.com",
  "gender":"female",
  "id":"f45680e1-014d-42c7-be86-3b2899e911c3",
  "ip_address":"10.0.0.1",
  "mobile_phone":"2106603032",
  "address_line1":"500 8 El Camino Real Santa Clara",
  "city":"Santa Clara",
  "state":"CA",
  "country":"US",
  "zipcode":"95053",
  "occupation":"Banker",
  "company_details":{
    "company_name":"ACME",
    "address":"123 address st",
    "phone_number":"222222222"
  },
  "physical_documents":[
    {
      "document_value":"data:image/jpg;base64,SUQs==",
      "document_value_back":"data:image/jpg;base64,SUQs==",
      "country":"US",
      "document_type":"DRIVING_LICENCE",
      "state":"CA"
    },
    {
      "document_value":"data:image/jpg;base64,SUQs==",
      "document_type":"BANK_STATEMENT",
    }
  ],
  "virtual_documents":[
    {
      "document_value":"1111111111",
      "document_type":"DRIVING_LICENCE",
      "expiry_date":"2025-03-09",
      "id_issuing_authority":"CA",
      "country":"US",
      "state":"CA"
    },
    {
      "document_value":"111111112",
      "document_type":"SSN",
      "country":"US",
      "state":"CA"
    }
  ]
}'
```

**Business User**

```
curl --location -g --request PATCH '{{url}}/users/{{user_id}}' \
--header 'X-Client-Id: {{client_id}}' \
--header 'X-Client-Secret: {{client_secret}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "number_of_transaction_per_month": "122",
    "transaction_frequency": "WEEKLY",
    "physical_documents": [
        {
            "document_value": "data:application/pdf;base64,SUQs==",
            "document_type": "CERTIFICATE_OF_INCORPORATION"
        },
        {
        "document_value":"data:image/jpg;base64,SUQs==",
        "document_type":"AUDITED_FINANCIALS"
        } 
    ]
}'
```

{% endtab %}

{% tab title="Response Sample" %}
**Individual User**

```
{
    "address_line1": "500 8 El Camino Real Santa Clara",
    "city": "Santa Clara",
    "company_details": {
        "address": "123 address st",
        "company_name": "ACME",
        "phone_number": "222222222"
    },
    "country": "US",
    "created_at": "2022-03-29T15:59:03.699517",
    "date_of_birth": "2000-01-01",
    "email": "norgay@test.com",
    "first_name": "Tenzin",
    "gender": "female",
    "id": "f45680e1-014d-42c7-be86-3b2899e911c3",
    "ip_address": "10.0.0.1",
    "last_name": "Norgay",
    "middle_name": "",
    "mobile_phone": "2106603032",
    "occupation": "Banker",
    "physical_documents": [
        {
            "country": "US",
            "document_type": "DRIVING_LICENCE",
            "id": "d20dd857-7dc0-4abc-879f-fcfb15f4423d",
            "state": "CA"
        },
        {
            "document_type": "BANK_STATEMENT",
            "id": "9f57c7c9-ffa5-4e88-a28a-af3af1232a46"
        }
    ],
    "state": "CA",
    "status": "UNVERIFIED",
    "user_scope": "ARTS_ENTERTAINMENT",
    "virtual_documents": [
        {
            "country": "US",
            "document_type": "DRIVING_LICENCE",
            "document_value": "1111111111",
            "id": "38f41ac7-ddb6-44e4-b40c-fa0cf8d05b9d",
            "state": "CA",
            "expiry_date": "2025-03-09",
            "id_issuing_authority": "CA"
        },
        {
            "country": "US",
            "document_type": "SSN",
            "document_value": "*****1112",
            "id": "a301b04f-c904-4c78-9a8b-9a384c51b497",
            "state": "CA"
        }
    ],
    "zipcode": "95053"
}
```

**Business User**

```
{
    "address_line1": "500 8 El Camino Real Santa Clara",
    "city": "Santa Clara",
    "company_website": "www.example.com",
    "country": "US",
    "created_at": "2022-04-22T02:21:23.084565",
    "date_of_birth": "1995-01-01",
    "email": "example@mail.com",
    "first_name": "Machnet Technologies Inc",
    "id": {{UUID}},
    "ip_address": "10.0.10.5",
    "mailing_address": {
        "address_line1": "500 8 El Camino Real Santa Clara",
        "city": "Santa Clara",
        "country": "US",
        "state": "CA",
        "zipcode": "95053"
    },
    "mobile_phone": "222222222",
    "number_of_employee": "BETWEEN_25_TO_50",
    "number_of_transaction_per_month": 122,
    "physical_documents": [
        {
            "document_type": "CERTIFICATE_OF_INCORPORATION",
            "id": {{UUID}}
        },
        {
            "document_type": "BANK_STATEMENT",
            "id": {{UUID}}
        }
    ],
    "state": "CA",
    "status": "UNVERIFIED",
    "transaction_frequency": "WEEKLY",
    "user_scope": "COMPUTER_TECHNOLOGY",
    "zipcode": "95053"
}
```

{% endtab %}
{% endtabs %}
