# Update user profile

`PATCH https://api.cryptohopper.com/v1/user`

Part of [Users](https://www.cryptohopper.com/api-documentation/api-reference/users.md) in the Cryptohopper API reference.

Updates the user's name and address details. Only name, address1, address2, city, region, postal_code, country, country_nationality, phone and website are saved; other fields are ignored.

OAuth scope: `user`

Always send name: it is written on every call, so leaving it out clears the stored name. Address fields you leave out keep their current value.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | no |  |
| `address1` | string | no |  |
| `address2` | string | no |  |
| `city` | string | no |  |
| `region` | string | no |  |
| `country` | string | no |  |
| `country_nationality` | string | no |  |
| `postal_code` | string | no |  |
| `phone` | string | no |  |
| `website` | string | no |  |

## Example request

```bash
curl -X PATCH "https://api.cryptohopper.com/v1/user" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe","address1":"Main Street 1","city":"Amsterdam","postal_code":"1000 AA","phone":"+31600000000"}'
```

## Response

Example response (illustrative values):

```json
{
    "data": "User profile has been updated."
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
