Update Profile
PATCH
/api/auth/profile
const url = 'https://example.com/api/auth/profile';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"first_name":"example","last_name":"example","username":"example","avatar_url":"example","job_title":"example","timezone":"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 https://example.com/api/auth/profile \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "first_name": "example", "last_name": "example", "username": "example", "avatar_url": "example", "job_title": "example", "timezone": "example" }'Update the current user’s profile (name, username, avatar_url).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
ProfileUpdateRequest
object
Example generated
{ "first_name": "example", "last_name": "example", "username": "example", "avatar_url": "example", "job_title": "example", "timezone": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleValidation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}