Update own profile
PATCH
/api/profiles/me
const url = 'http://localhost:3000/api/profiles/me';const options = { method: 'PATCH', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"firstName":"example","lastName":"example","avatarUrl":"example","currentPassword":"example","newPassword":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/profiles/me \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "firstName": "example", "lastName": "example", "avatarUrl": "example", "currentPassword": "example", "newPassword": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
firstName
string
lastName
string
avatarUrl
string
currentPassword
Required if changing password
string
newPassword
Required if changing password
string
Example generated
{ "firstName": "example", "lastName": "example", "avatarUrl": "example", "currentPassword": "example", "newPassword": "example"}Responses
Section titled “ Responses ”Updated profile
Media type application/json
object
data
object
id
required
string format: uuid
email
required
string format: email
firstName
string
lastName
string
avatarUrl
string
role
required
string
isActive
required
boolean
createdAt
required
string format: date-time
Example
{ "data": { "role": "super_admin" }}Validation error
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}Not authenticated
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}