Skip to content

users_retrieve_by_id

GET
/api/users/{id}/
curl --request GET \
--url https://example.com/api/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \
--header 'Authorization: Bearer <token>'

Retrieve a user by their id.

id
required
string format: uuid
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"
}