Me

Get Current User Endpoint

get

Get the currently authenticated user.

Args: user: Authenticated user

Returns: The currently authenticated user.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Responses
200

Successful Response

application/json
get
/users/me
GET /users/me HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

Successful Response

{
  "password": "text",
  "password_expired": true,
  "name": "text",
  "avatar_url": "text",
  "company": "text",
  "job_title": "text",
  "metadata": {},
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "text",
  "email": "text",
  "oauth_provider": "text",
  "oauth_id": "text",
  "is_active": true,
  "is_superuser": false,
  "is_service_account": false,
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "is_onboarded": false
}

Update Current User Endpoint

patch

Update the currently authenticated user.

Args: user_update: User update user: Authenticated user user_manager: User manager

Returns: The updated user.

Raises: ValueError: If the user is internal.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Body

Model for user updates.

passwordany ofOptional
stringOptional
or
nullOptional
password_expiredany ofOptional
booleanOptional
or
nullOptional
nameany ofOptional

The name of the user.

string · min: 1 · max: 50Optional
or
nullOptional
avatar_urlany ofOptional

The avatar URL of the user.

stringOptional
or
nullOptional
companyany ofOptional

The company of the user.

string · min: 1 · max: 50Optional
or
nullOptional
job_titleany ofOptional

The job title of the user.

string · min: 1 · max: 50Optional
or
nullOptional
metadataany ofOptional

Additional metadata associated with the user.

objectOptional
or
nullOptional
usernameany ofOptional

New username for the user. Not possible to change the username for OAuth2 user accounts because it's the same as the email address provided by the external OAuth2 provider.

string · min: 1 · max: 50OptionalPattern: ^[a-zA-Z0-9_\-@.]+$
or
nullOptional
emailany ofOptional

New email address for the user. Not possible to change the email address for OAuth2 user accounts because it's the same as the email address provided by the external OAuth2 provider.

string · emailOptional
or
nullOptional
is_activeany ofOptional
booleanOptional
or
nullOptional
is_onboardedany ofOptional
booleanOptional
or
nullOptional
Responses
200

Successful Response

application/json
patch
/users/me
PATCH /users/me HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 207

{
  "password": "text",
  "password_expired": true,
  "name": "text",
  "avatar_url": "text",
  "company": "text",
  "job_title": "text",
  "metadata": {},
  "username": "text",
  "email": "[email protected]",
  "is_active": true,
  "is_onboarded": true
}
{
  "password": "text",
  "password_expired": true,
  "name": "text",
  "avatar_url": "text",
  "company": "text",
  "job_title": "text",
  "metadata": {},
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "text",
  "email": "text",
  "oauth_provider": "text",
  "oauth_id": "text",
  "is_active": true,
  "is_superuser": false,
  "is_service_account": false,
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "is_onboarded": false
}

Last updated

Was this helpful?