REST API endpoints for Users
Get a user
Section titled “Get a user” GET
/users/{userId} Authentication may enable this endpoint return more information.
Authenticated user can retrieve private information when the target user is the current authenticated user and has <code>user:read</code> scope.
userIdstringRequired<p>The id or username of the user to retrieve.<br>
Can be also <code>@me</code> for the current authenticated user.</p>
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<p>The unique identifier of the user.</p>
namestringRequired<p>The display name of the user.</p>
usernamestringRequired<p>The username of the user.</p>
created_atstringRequired<p>ISO 8601 timestamp of when the user was created.</p>
rolestringRequired<p>The role of the user. Can be <code>user</code>, <code>moderator</code> or <code>admin</code>.</p>
avatar_urlstring<p>The URL of the user avatar.</p>
biostring<p>The short bio of the user.</p>
Modify a user
Section titled “Modify a user” PATCH
/users/{userId} <p>Can only update the current authenticated user.</p>
Authentication is required.
Access token must have <code>user:update</code> scope.
userIdstringRequired<p>The id or username of the user to retrieve.<br>
Can be also <code>@me</code> for the current authenticated user.</p>
Request Body Content-Type: application/json
<p>Only the provided fields will be updated. To remove an optional field, set it to <code>null</code>.</p> namestring<p>The display name of the user.
Regex: <code>/^[p{L}p{N} _-]+$/u</code></p>
biostring<p>The short bio of the user.</p>
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<p>The unique identifier of the user.</p>
namestringRequired<p>The display name of the user.</p>
usernamestringRequired<p>The username of the user.</p>
created_atstringRequired<p>ISO 8601 timestamp of when the user was created.</p>
rolestringRequired<p>The role of the user. Can be <code>user</code>, <code>moderator</code> or <code>admin</code>.</p>
avatar_urlstring<p>The URL of the user avatar.</p>
biostring<p>The short bio of the user.</p>