PLEXICHATNarrative Docs

Presence

Guides, route-group overviews, and live schema entry points for the Plexichat backend.

REST http://api.plexichat.com/api/v1Gateway ws://api.plexichat.com/gatewayVersion a.1.0-49

Presence API

Endpoints for managing user presence and status.

PUT /users/@me/presence

Update the current user's presence status.

Headers


Authorization: Bearer <token>

Request Body

FieldTypeRequiredConstraintsDescription
statusstringYesValid statusOnline status
custom_statusstringNoMax 128 charsCustom status text
custom_emojistringNo-Custom status emoji

Status Values

StatusDescription
onlineUser is online
idleUser is idle/away
dndDo not disturb
invisibleAppear offline to others
offlineGo offline

Example Request


{
  "status": "online",
  "custom_status": "Working on Plexichat",
  "custom_emoji": ":computer:"
}

Response (200 OK)


{
  "user_id": "123456789012345678",
  "status": "online",
  "custom_status": "Working on Plexichat",
  "custom_emoji": ":computer:",
  "last_seen": 1704067200
}

Error Responses

StatusCodeDescription
400Invalid statusStatus value not recognized

GET /users/{user_id}/presence

Get a user's presence status.

Headers


Authorization: Bearer <token>

Path Parameters

ParameterTypeDescription
user_idstringUser's snowflake ID

Response (200 OK)


{
  "user_id": "123456789012345678",
  "status": "online",
  "custom_status": "Working on Plexichat",
  "custom_emoji": ":computer:",
  "last_seen": 1704067200
}

Notes

  • Returns offline status if user not found
  • Returns offline if user's presence is not visible to requester
  • invisible users appear as offline to others

Presence Object


{
  "user_id": "123456789012345678",
  "status": "online",
  "custom_status": "Working on Plexichat",
  "custom_emoji": ":computer:",
  "last_seen": 1704067200
}
FieldTypeDescription
user_idstringUser's snowflake ID
statusstringCurrent status
custom_statusstring?Custom status text
custom_emojistring?Custom status emoji
last_seenint?Unix timestamp of last activity