Skip to content

users_update_navigation

PATCH
/api/users/{id}/
curl --request PATCH \
--url https://example.com/api/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "first_name": "example", "last_name": "example", "ror": "example", "orcid": "example", "last_workspace": "example", "last_path": "example" }'

Update own profile fields (first_name, last_name, ror, orcid) and navigation state (last_workspace, last_path). Only the authenticated user can update their own record. ror and orcid accept either a full URL or a bare identifier (e.g. 02feahw73, 0000-0002-1825-0097) and are stored as canonical URLs.

id
required
string format: uuid

Serializer for the MadbotUser model.

object
id
string format: uuid
username

Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.

string
email
Email address
string format: email
first_name
string
<= 150 characters
last_name
string
<= 150 characters
is_signup_incomplete
boolean
social_accounts

Retrieve the social accounts associated with the user.

Array<object>
object
key
additional properties
impersonation

Return active impersonation session data if the request token is an impersonation token.

Checks whether the current request’s OAuth2 token matches an active :class:~madbot_api.core.models.ImpersonateSession. Returns None for all normal (non-impersonated) requests, or when the serializer is used without a request context (e.g. in tests or admin).

object
key
additional properties
ror
string
<= 255 characters
orcid
string
nullable <= 255 characters
last_workspace
string
nullable <= 255 characters
last_path
string
nullable <= 2000 characters

Example generated

{
"first_name": "example",
"last_name": "example",
"ror": "example",
"orcid": "example",
"last_workspace": "example",
"last_path": "example"
}
Media typeapplication/json

Serializer for the MadbotUser model.

object
id
required
string format: uuid
username
required

Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.

string
email
required
Email address
string format: email
first_name
string
<= 150 characters
last_name
string
<= 150 characters
is_signup_incomplete
required
boolean
social_accounts
required

Retrieve the social accounts associated with the user.

Array<object>
object
key
additional properties
impersonation
required

Return active impersonation session data if the request token is an impersonation token.

Checks whether the current request’s OAuth2 token matches an active :class:~madbot_api.core.models.ImpersonateSession. Returns None for all normal (non-impersonated) requests, or when the serializer is used without a request context (e.g. in tests or admin).

object
key
additional properties
ror
required
string
<= 255 characters
orcid
string
nullable <= 255 characters
last_workspace
string
nullable <= 255 characters
last_path
string
nullable <= 2000 characters

Example generated

{
"first_name": "example",
"last_name": "example",
"ror": "example",
"orcid": "example",
"last_workspace": "example",
"last_path": "example"
}