Skip to content

Updates the user profile information.

PATCH
/api/user/{userId}/profile

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Path Parameters

userId*
Typestring
Required

Request Body

JSON
{
"id": 0,
"firstName": "Peter",
"lastName": "Miller",
"role": 0,
"position": "string",
"regionId": 0,
"gender": 0,
"birthday": "string",
"mobile": "string",
"phone": "string",
"location": {
"street": "string",
"postalCode": "string",
"city": "string"
},
"coordinate": {
"lat": 52.5,
"lon": 13.4
},
"aboutMePublic": "string",
"aboutMeInternal": "string",
"noAutoDelete": 0
}

Responses

Success.
JSON
{
"id": 0,
"firstName": "Peter",
"lastName": "Miller",
"role": 0,
"position": "string",
"regionId": 0,
"gender": 0,
"birthday": "string",
"mobile": "string",
"phone": "string",
"location": {
"street": "string",
"postalCode": "string",
"city": "string"
},
"coordinate": {
"lat": 52.5,
"lon": 13.4
},
"aboutMePublic": "string",
"aboutMeInternal": "string",
"noAutoDelete": 0
}
Authorization
api_key
Variables
Key
Value
userId*
cURL
curl -X PATCH \
'http://localhost/api/user/{userId}/profile' \
 --data '{
  "id": 0,
  "firstName": "Peter",
  "lastName": "Miller",
  "role": 0,
  "position": "string",
  "regionId": 0,
  "gender": 0,
  "birthday": "string",
  "mobile": "string",
  "phone": "string",
  "location": {
    "street": "string",
    "postalCode": "string",
    "city": "string"
  },
  "coordinate": {
    "lat": 52.5,
    "lon": 13.4
  },
  "aboutMePublic": "string",
  "aboutMeInternal": "string",
  "noAutoDelete": 0
}'

Samples

cURL
curl -X PATCH http://localhost/api/user/{userId}/profile
JavaScript
fetch("http://localhost/api/user/{userId}/profile", { method: "PATCH" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/user/{userId}/profile");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.patch("http://localhost/api/user/{userId}/profile")
print(response.json())