API reference
Users and DMs
Your bot's own account, its status, other people's profiles, and direct messages.
Your bot
GET /api/auth/me returns the bot's account (see Authentication). Its name, username and pictures are set in the Developer Portal.
Status
PATCH /api/users/@me/presence
Content-Type: application/json
{ "status": "dnd", "customStatus": "Playing 3 games" }| Field | Notes |
|---|---|
status | online, idle, dnd (Do Not Disturb) or invisible |
customStatus | Up to 128 characters. null or "" clears it |
The status sticks across restarts. Your bot only shows as online (in that status) while it's connected to the gateway; otherwise it shows as offline.
Profiles
GET /api/users/{userId}/profile returns someone's profile, if your bot shares a server or DM with them:
{
"user": {
"id": "103600000000000000",
"username": "andre",
"displayName": "Andre",
"avatarUrl": "https://cdn.baff.gg/avatars/103600000000000000/104000000000000000.webp",
"clanTag": { "serverId": "103700000000000000", "name": "RAID", "badge": "sword", "color": 16769889 },
"status": "online",
"customStatus": "Building a bot"
},
"bannerUrl": null,
"pronouns": "he/him",
"themePrimary": "#2ec4b6",
"themeAccent": "#04201d",
"bio": "Making things.",
"createdAt": "2026-09-01T10:00:00Z",
"serverJoinedAt": null,
"nick": null,
"mutualServers": [{ "id": "103700000000000000", "name": "Game Night", "iconUrl": null }],
"badges": ["partner", "early_access"],
"tag": null
}Everything a person's profile card shows is here:
| Field | Notes |
|---|---|
user.avatarUrl | Their profile picture, or null for the default Baff avatar |
user.clanTag | The clan tag they wear, or null |
user.status, user.customStatus | As others see them (offline while they're away or invisible) |
bannerUrl | Their banner, or null (the card then uses themePrimary) |
pronouns, bio | Pronouns and About Me, or null |
themePrimary, themeAccent | Profile theme colors as #rrggbb, or null for the defaults |
createdAt | When they joined baff.gg |
serverJoinedAt, nick | With ?serverId=: when they joined that server and their nickname there |
badges, tag | Profile badges (below) and the pill next to their name (bot, verified_bot, official, system, staff) |
badges are the icons on their profile:
| Badge | Given to |
|---|---|
staff | Members of a baff.gg staff server |
developer | Members of a baff.gg developer server |
partner | Owners of a partnered server |
verified_server_owner | Owners of a verified server |
early_access | People who joined during early access |
Server badges are worked out from the servers they own or are in each time, so they come and go with the server. Bots never get staff or developer.
Add ?serverId= to also get serverJoinedAt and nick for that server.
Clan tags
People can wear one server's clan tag next to their name. Wherever a user object comes with it (message authors and reply previews, the member list, profiles' user, MEMBER_ADD, USER_UPDATE), it carries clanTag, or null when they wear none:
"clanTag": { "serverId": "103700000000000000", "name": "RAID", "badge": "sword", "color": 16769889 }name is 1 to 4 uppercase letters or numbers, badge is one of gem, flame, heart, leaf, bolt, moon, mushroom, skull, slime, sword, and color is 0xRRGGBB as a number. When a server changes or removes its tag, a CLAN_TAG_UPDATE event ({ serverId, clanTag, cleared }) goes out: cleared: true means everyone wearing it lost it. Bots can't wear clan tags.
Direct messages
Open (or find) a DM with someone your bot shares a server with, then send to its channel like any other:
POST /api/users/@me/channels
Content-Type: application/json
{ "recipientId": "103600000000000000" }{
"id": "103750000000000000",
"type": "dm",
"recipient": { "id": "103600000000000000", "username": "andre", "displayName": "Andre", "status": "online", "customStatus": null },
"recipients": [{ "id": "103600000000000000", "username": "andre", "displayName": "Andre", "status": "online", "customStatus": null }],
"lastMessageId": null
}GET /api/users/@me/channels lists your bot's open DMs. type is "dm" (two people, recipient is the other one) or "group_dm"; recipients is everyone in it except you.
Group DMs
People can start group DMs with up to 10 people. Bots can't be added to them, start them or join their calls, so your bot only sees them through shared data like message types. A group DM channel has type: "group_dm", no recipient, and may carry name (absent = the app shows the members' names), iconUrl and ownerId. In channel selects (see Message Components) its channel type number is 3, like Discord's. Slash commands work in DMs with your bot too; their interactions have serverId: null.
Please don't DM people who didn't ask for it. Bots that spam DMs get removed.
Deleted accounts
When someone deletes their baff.gg account, it waits 14 days (they can cancel by logging in), then it's erased. The account's ID stays, because their messages can stay behind:
- Their
usernamebecomesdeleted_user_plus 12 random letters and digits, anddisplayNamebecomes"Deleted User". No one else can pick a username starting withdeleted_user_, so you can recognise one by it. Avatar, banner and status are gone; they show asoffline. - They leave every server (you get
MEMBER_REMOVE) and every friend list. Their reactions are removed (MESSAGE_REACTION_REMOVE). - Their messages stay, shown as from Deleted User, unless they chose to delete them too. Then they're deleted in batches over the next minutes, each with a normal
MESSAGE_DELETE. - Everyone who could see them gets a
USER_UPDATEwith the new name and"deleted": true. - Their profile is empty apart from
user(nobio,createdAt, badges or mutuals) and has"deleted": true. - DMs with them stay readable but closed: sending answers
403with coderecipient_deleted, and opening a new DM with them does too. DM objects carry"recipientDeleted": true.
If the person owned apps, their apps and bots are deleted with the account. Store user IDs, not usernames, if you keep data about people: delete what you hold for an ID once you see "deleted": true.