Users API¶
Older endpoint notes
Rendered from ProjectInfo/api-docs/api/users.md on docs/encryption-modes-spec. These notes predate the REST API reference, which is canonical wherever the two overlap. They are published because they still cover endpoints the reference does not yet document — check shapes against the reference and the spec errata.
All endpoints require Authorization: Bearer <token>.
GET /api/users/@me¶
Fetch authenticated user's full profile. Includes email field.
Response 200: User
PATCH /api/users/@me¶
Update own profile. All fields optional.
Request:
{
"username": "string",
"display_name": "string",
"avatar_url": "string",
"banner_url": "string",
"bio": "string",
"status": 1,
"status_text": "string"
}
Status values: 1 ONLINE, 2 IDLE, 3 DND, 4 OFFLINE, 5 INVISIBLE
Updating avatar_url or banner_url or display_name or bio fires a USER_UPDATE event on user.<id>.USER_UPDATE.
Updating status or status_text fires a PRESENCE_UPDATE event.
Response 200: User
GET /api/users/{userID}¶
Fetch any user's public profile. email field is omitted.
Response 200: User (no email)
GET /api/users/search?q={username}¶
Exact username lookup. Used for adding friends by username.
Response 200: User (no email)
Errors: 404 (not found)
GET /api/servers/{serverID}/members/search?q={query}¶
Search server members by username or nickname. Must be a member of the server.
Response 200: Array of ServerMember