Skip to content

REST API endpoints for Users

GET /users/{userId}
Authentication

Authentication may enable this endpoint return more information.

Authenticated users can retrieve their own private information when the target user is the current authenticated user and the access token has user:read scope.

Learn more about authentication

Path Parameters
userIdstringRequired

The ID or username of the user to retrieve.
Use @me for the current authenticated user.

Response Body Content-Type: application/json

This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more

idstringRequired

The unique identifier of the user.

namestringRequired

The display name of the user.

usernamestringRequired

The username of the user.

created_atstringRequired

ISO 8601 timestamp of when the user was created.

rolestringRequired

The role of the user. Can be user, moderator or admin.

avatar_urlstring

The URL of the user avatar.

biostring

The short bio of the user.

PATCH /users/{userId}

Can only update the current authenticated user.

Authentication

Authentication is required.

Access token must have user:update scope.

Learn more about authentication

Path Parameters
userIdstringRequired

The ID or username of the user to update.
Use @me for the current authenticated user.

Request Body Content-Type: application/json

Only the provided fields will be updated. Fields are optional but not nullable.

slugstring

The username of the user. It can be updated only after the slug update cooldown.
Regex: /^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i

namestring

The display name of the user.
Regex: /^[\p{L}\p{N} _\-()]+$/u

biostring

The short bio of the user. Maximum 256 characters.

Response Body Content-Type: application/json

This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more

idstringRequired

The unique identifier of the user.

namestringRequired

The display name of the user.

usernamestringRequired

The username of the user.

created_atstringRequired

ISO 8601 timestamp of when the user was created.

rolestringRequired

The role of the user. Can be user, moderator or admin.

avatar_urlstring

The URL of the user avatar.

biostring

The short bio of the user.

auth_idstring

The auth provider identifier. Returned only for the current authenticated user.

last_slug_updated_atstring

ISO 8601 timestamp of the last username update. Returned only for the current authenticated user.