PATCH
https://api.cryptohopper.com/v1/user
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 About scopes
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.
Example request
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"}'
const response = await fetch('https://api.cryptohopper.com/v1/user', {
method: 'PATCH',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Jane Doe",
"address1": "Main Street 1",
"city": "Amsterdam",
"postal_code": "1000 AA",
"phone": "+31600000000"
})
});
const data = await response.json();
import requests
response = requests.patch(
"https://api.cryptohopper.com/v1/user",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"name": "Jane Doe",
"address1": "Main Street 1",
"city": "Amsterdam",
"postal_code": "1000 AA",
"phone": "+31600000000"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/user');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Jane Doe',
'address1' => 'Main Street 1',
'city' => 'Amsterdam',
'postal_code' => '1000 AA',
'phone' => '+31600000000',
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Optional | |
address1 | string | Optional | |
address2 | string | Optional | |
city | string | Optional | |
region | string | Optional | |
country | string | Optional | |
country_nationality | string | Optional | |
postal_code | string | Optional | |
phone | string | Optional | |
website | string | Optional |
Response
{
"data": "User profile has been updated."
}