Bafflux 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", "status": "online", "customStatus": null },
	"bio": "Making things.",
	"pronouns": "he/him",
	"createdAt": "2026-09-01T10:00:00Z",
	"mutualServers": [{ "id": "103700000000000000", "name": "Game Night", "iconUrl": null }],
	"badges": ["partner", "early_access"],
	"tag": null
}

badges are the icons on their profile:

BadgeGiven to
staffMembers of a Bafflux staff server
developerMembers of a Bafflux 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 for that server.

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",
	"recipient": { "id": "103600000000000000", "username": "andre", "displayName": "Andre", "status": "online", "customStatus": null },
	"lastMessageId": null
}

GET /api/users/@me/channels lists your bot's open DMs. 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.