baff.gg Docs Developer Portal

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

http
PATCH /api/users/@me/presence
Content-Type: application/json

{ "status": "dnd", "customStatus": "Playing 3 games" }
FieldNotes
statusonline, idle, dnd (Do Not Disturb) or invisible
customStatusUp 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:

json
{
	"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:

FieldNotes
user.avatarUrlTheir profile picture, or null for the default Baff avatar
user.clanTagThe clan tag they wear, or null
user.status, user.customStatusAs others see them (offline while they're away or invisible)
bannerUrlTheir banner, or null (the card then uses themePrimary)
pronouns, bioPronouns and About Me, or null
themePrimary, themeAccentProfile theme colors as #rrggbb, or null for the defaults
createdAtWhen they joined baff.gg
serverJoinedAt, nickWith ?serverId=: when they joined that server and their nickname there
badges, tagProfile badges (below) and the pill next to their name (bot, verified_bot, official, system, staff)

badges are the icons on their profile:

BadgeGiven to
staffMembers of a baff.gg staff server
developerMembers of a baff.gg developer server
partnerOwners of a partnered server
verified_server_ownerOwners of a verified server
early_accessPeople 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:

json
"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:

http
POST /api/users/@me/channels
Content-Type: application/json

{ "recipientId": "103600000000000000" }
json
{
	"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 username becomes deleted_user_ plus 12 random letters and digits, and displayName becomes "Deleted User". No one else can pick a username starting with deleted_user_, so you can recognise one by it. Avatar, banner and status are gone; they show as offline.
  • 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_UPDATE with the new name and "deleted": true.
  • Their profile is empty apart from user (no bio, createdAt, badges or mutuals) and has "deleted": true.
  • DMs with them stay readable but closed: sending answers 403 with code recipient_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.