Update my profile
curl --request PATCH \
--url https://api.example.com/api/v1/users/meimport requests
url = "https://api.example.com/api/v1/users/me"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/api/v1/users/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/me"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v1/users/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_bodyProfile
Update my profile
Edit the authenticated user’s profile (Edit Profile screen).
PATCH
/
api
/
v1
/
users
/
me
Update my profile
curl --request PATCH \
--url https://api.example.com/api/v1/users/meimport requests
url = "https://api.example.com/api/v1/users/me"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/api/v1/users/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/me"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/v1/users/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_bodyOverview
Updates the authenticated user’s profile. Every field is optional — send only what changed (at least one field is required). Returns the full updated profile (same shape asGET /users/me).
Email is not editable here. Changing the email would require a re-verification flow; it is omitted deliberately.
Setting the profile photo
The avatar uses the standard upload pipeline:POST /uploads/presignwithfileType: "AVATAR".PUTthe image bytes to the returned URL with the returned headers.POST /uploads/confirm→ returns anuploadId.PATCH /users/mewith{ "avatarUploadId": "<that id>" }. The server resolves it to the public CDN url and stores it asavatarUrl.
Authentication
Bearer <accessToken> required. Scope: user.
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
firstName | string | no | 1..100 chars after trim. |
lastName | string | no | 1..100 chars after trim. |
dateOfBirth | string | no | ISO YYYY-MM-DD; must be 18 or older. |
bio | string | null | no | ≤ 500 chars. Send null to clear it. |
avatarUploadId | string | no | 24-char ObjectId of a confirmed AVATAR upload owned by you. |
{
"firstName": "Alice",
"lastName": "Andersson",
"dateOfBirth": "1990-06-15",
"bio": "Looking to swap my 2-bed in Camden.",
"avatarUploadId": "66400a8f1c2b4d5e6f7a8b90"
}
Response — 200 OK
The full updated profile — see GET /users/me for the field table.
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | Empty body; name out of range; dateOfBirth not YYYY-MM-DD or under 18; bio over 500 chars. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 404 | NOT_FOUND | User gone, or avatarUploadId is not a confirmed AVATAR upload owned by you. |
Side effects
- Writes the provided non-PII fields (
firstName,lastName,bio,avatarUrl). dateOfBirth, when provided, is written through the encrypted-at-rest PII path.
See also
- Get my profile
- Presign upload URLs — step 1 of the avatar flow.
curl
# Update name + bio
curl -X PATCH https://api.swappr.co.uk/api/v1/users/me \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "firstName": "Alice", "bio": "Hello!" }'
# Set the avatar from a confirmed AVATAR upload
curl -X PATCH https://api.swappr.co.uk/api/v1/users/me \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "avatarUploadId": "66400a8f1c2b4d5e6f7a8b90" }'