API

Mirage

Servers, channels, threads, messages, search, emoji, roles, invites, direct messages and live events.

See Mirage. Every route is under /v1/messaging for people signed in; bots reach the ones their permissions allow with their own token. Live events come over a WebSocket: POST socket answers a one-time ticket and the address to connect to. Direct messages are encrypted on devices: their routes carry ciphertext, and the keys each device seals for the others. Public pages and emoji images are under /v1/hooks/messaging without authentication.

Incoming webhooks

An incoming webhook posts into one text or announcement channel from anything that can send an HTTP request: CI, monitoring, alerts. Someone with Manage Webhooks makes one (POST /v1/messaging/channels/:channelId/webhooks); its URL holds a token shown once. Post Discord's payload to it, or Slack's at …/slack, so tools that support either work unchanged:

curl -X POST "$WEBHOOK_URL" -H "content-type: application/json" \
  -d '{"username":"CI","content":"Deployed **main**","embeds":[{"title":"Build 42","url":"https://ci.example/42","fields":[{"name":"Duration","value":"3m 12s"}]}]}'

Messages show the webhook's name (or username) with a WEBHOOK tag. Embeds and Slack attachments show as quotes; avatars and images in a payload aren't shown, and links get previews as usual. A webhook can mention people by id (<@usr_…>) but never roles or @everyone, and posts up to 30 times a minute. Reset the token if the URL leaks.

Every route below, with its parameters, request and response, errors and samples, is in the API reference.

RouteWhat it does
GET /v1/hooks/messaging/servers/:serverId/iconA server's icon image (a redirect, cached for 50 minutes); 404 when it has none or uses an emoji. No authentication.
GET /v1/hooks/messaging/emojis/:emojiIdAn emoji's image (a redirect, cached for 50 minutes): a server's (mem_…), or one of Discord's copied across the bridge (dce_<id>). No authentication.
GET /v1/hooks/messaging/stickers/:stickerIdA sticker's image (a redirect): a server's (mst_…), or one of Discord's copied across the bridge (dst_<id>). No authentication.
GET /v1/hooks/messaging/gif-preview/:provider/:sigA GIF picker preview (a redirect to Mirage's copy): u is one of the provider's media links as GET /v1/messaging/gifs signed it; copied into Mirage's files once, so viewers never load the provider's hosts. No authentication.
GET /v1/hooks/messaging/sounds/:soundIdA sound's file (a redirect). No authentication.
GET /v1/hooks/messaging/servers/:serverId/pageA community server's public page (when its owners turned it on): name, icon, banner, description, traits, member count and a lasting invite. No authentication.
GET /v1/hooks/messaging/invites/:codeAn invite's preview without signing in (link previews of the invite page): the server's name, icon, description, member and online counts; 404 when it's expired. Limited per address a minute. No authentication.
POST /v1/hooks/messaging/incoming/:webhookId/:tokenPosts in the webhook's channel with Discord's payload: content (Markdown; people as <@usr_…>), username (instead of the webhook's name) and embeds (title, url, description, author, fields, footer: shown as a quote). JSON, or a form's payload_json. 204, or the message with ?wait=true. Up to 30 posts a minute by default (platform data); never pings roles or @everyone. The token in the URL is the only credential.
POST /v1/hooks/messaging/incoming/:webhookId/:token/slackPosts in the webhook's channel with Slack's payload: text (mrkdwn), blocks (header, section, context, divider, rich text) and attachments (as quotes), username. JSON, or a form's payload. Answers ok. Up to 30 posts a minute.
GET /v1/messaging/meYour Mirage profile: name, status, custom status and the order of your servers; whether your account shows you are 18 or over (adult), whether age-restricted channels show in the phone app (ageRestrictedOnPhone), and whether your phones still get pushes while you're on Do Not Disturb (pushDuringDnd, on by default).
PATCH /v1/messaging/meSets your status (online, idle, dnd, invisible), custom status or server order; your servers, friends and DM members hear the new status, and your other devices what you chose. ageRestrictedOnPhone shows age-restricted channels in the phone app: adults only, and never from the phone app itself (403). pushDuringDnd: false holds every push back while you're on Do Not Disturb.
POST /v1/messaging/socketA one-time ticket (a minute) and the socket URL: open <url>?ticket=<ticket> for live events from your servers. Send {"type":"ping"} within 10 minutes to keep it open, and {"type":"idle","idle":true} (or false) when nobody's using it: with every connection idle, an online person shows as idle.
GET /v1/messaging/presenceYour friends' and DM members' presence (status: online, idle, dnd or offline, with their custom status); servers' member lists carry their members'.
GET /v1/messaging/read-statesWhere you've read up to in each channel, and unread mentions.
GET /v1/messaging/serversYour servers in your order, each with whether it has unread messages and your unread mentions there.
POST /v1/messaging/serversCreates a server you own (name, optional icon emoji, description, template), with @everyone, #general and a General voice channel. Servers belong to people, never to an organisation.
GET /v1/messaging/servers/discoverRetired with organisation links: always { servers: [] }, for apps from before. Servers are joined with an invite.
GET /v1/messaging/me/linkable-orgsRetired with organisation links: always { orgs: [] }, for apps from before.
PUT /v1/messaging/servers/:serverId/orgRetired with organisation links: 410. Mirage is a space of its own, apart from organisations and Personal.
PATCH /v1/messaging/servers/:serverId/orgRetired with organisation links: 410.
DELETE /v1/messaging/servers/:serverId/orgRetired with organisation links: 410. Links left from before are removed by the separation script.
POST /v1/messaging/servers/:serverId/joinRetired with organisation links: 410. Join with an invite (POST /v1/messaging/invites/:code).
GET /v1/messaging/servers/:serverIdA server: its channels you can see, roles, your membership and your server permissions.
PATCH /v1/messaging/servers/:serverIdRenames a server or changes its icon, description or system channel (MANAGE_SERVER).
DELETE /v1/messaging/servers/:serverIdDeletes a server and everything in it. Owner only.
POST /v1/messaging/servers/:serverId/leaveLeaves a server (the owner transfers it or deletes it instead).
POST /v1/messaging/servers/:serverId/transferHands the server to another member (userId, never a bot); recorded in the audit log. Owner only.
POST /v1/messaging/servers/:serverId/channelsCreates a channel or category (type, name, parentId, topic, slowmode, nsfw, userLimit, overwrites; voice channels also bitrate 8 to 96 kbps, audio voice, music or stereo, videoQuality auto or full, rtcRegion). MANAGE_CHANNELS.
PATCH /v1/messaging/servers/:serverId/channelsReorders channels and moves them between categories: [{ id, position, parentId }]. MANAGE_CHANNELS.
PATCH /v1/messaging/servers/:serverId/channels/:channelIdChanges a channel's name, topic, category, slow mode, NSFW, user limit, position (MANAGE_CHANNELS there) or permission overwrites (MANAGE_ROLES there; only permissions you have, server-wide or there; one overwrite per role or member); a voice channel's bitrate, audio, video quality or region override (rtcRegion, a location id; null for automatic). Fields sent unchanged need nothing. New overwrites apply to people connected at once, and a category's reach its synced channels.
DELETE /v1/messaging/servers/:serverId/channels/:channelIdDeletes a channel and its messages (a category's channels stay, uncategorised). MANAGE_CHANNELS in the channel.
POST /v1/messaging/servers/:serverId/rolesCreates a role just above @everyone (name, color, permissions, hoist, mentionable); you can only grant permissions you have. MANAGE_ROLES.
PATCH /v1/messaging/servers/:serverId/rolesReorders roles below your highest role: [{ roleId, position }].
PATCH /v1/messaging/servers/:serverId/roles/:roleIdChanges a role below your highest role.
DELETE /v1/messaging/servers/:serverId/roles/:roleIdDeletes a role below your highest role; members lose it and channels drop its overwrites.
GET /v1/messaging/servers/:serverId/messages/searchSearches a server's messages you can read, newest first (sort=oldest for oldest): words in q (case and accents ignored), from (user id), mentions (user id), in (channel or thread id; a channel includes its threads), has (link, file, image, video; repeat or comma-separate), before and after (ms or ISO dates), limit up to 50. Pass the returned cursor back for more. End-to-end encrypted DMs aren't searchable on the server.
POST /v1/messaging/servers/:serverId/icon/uploadsWhere to PUT a new server icon (mime: PNG, JPEG, WebP or GIF; size up to 2 MB); then save the server with the icon it answers (image:<version>). MANAGE_SERVER.
GET /v1/messaging/servers/:serverId/automod/rulesA server's AutoMod rules. MANAGE_SERVER.
POST /v1/messaging/servers/:serverId/automod/rulesAdds an AutoMod rule (up to 20): trigger (keyword with keywords and an allow list, invites to other servers, mentions or links over a limit), what it does (block with an optional blockMessage, alertChannelId, timeoutMinutes), and exemptRoles and exemptChannels. Keywords: word whole words, word* starting, *word ending, *word* anywhere. The owner, Administrator, Manage Server and bots aren't checked. MANAGE_SERVER.
PATCH /v1/messaging/servers/:serverId/automod/rules/:ruleIdChanges an AutoMod rule (or turns it off with enabled: false). MANAGE_SERVER.
DELETE /v1/messaging/servers/:serverId/automod/rules/:ruleIdDeletes an AutoMod rule. MANAGE_SERVER.
GET /v1/messaging/servers/:serverId/eventsA server's upcoming and live events (and ones that ended in the last day) you can see, soonest first, with whether you're interested.
POST /v1/messaging/servers/:serverId/eventsSchedules an event: name, startAt (ms), in a voice channel (channelId) or somewhere else (place, with endAt), optional description. MANAGE_EVENTS.
PATCH /v1/messaging/servers/:serverId/events/:eventIdChanges an event's name, description or times, ends it now (end: true) or cancels it (cancel: true). MANAGE_EVENTS.
DELETE /v1/messaging/servers/:serverId/events/:eventIdDeletes an event. MANAGE_EVENTS.
PUT /v1/messaging/servers/:serverId/events/:eventId/interestedMarks you interested in an event.
DELETE /v1/messaging/servers/:serverId/events/:eventId/interestedTakes your interest back.
GET /v1/messaging/servers/:serverId/events/:eventId/interestedWho's interested (first 100).
PUT /v1/messaging/servers/:serverId/events/:eventId/rsvpAnswers an event: status going, interested or null to take your answer back. Returns the event with your answer (rsvp) and the counts.
POST /v1/messaging/servers/:serverId/events/:eventId/threadOpens an event's discussion: its thread, made the first time someone opens it in the system channel or else the first text channel everyone can see (you need Create Threads there).
GET /v1/messaging/emojisEvery emoji of your servers, by server (its name, icon and emoji): what a story's emoji stickers pick from.
GET /v1/messaging/servers/:serverId/emojisA server's own emoji (name, animated, who added it) and its limits (platform data; by default 100 still and 100 animated, 256 KB each).
POST /v1/messaging/servers/:serverId/emojis/uploadsWhere to PUT an emoji image (name, mime: PNG, JPEG, GIF, WebP or AVIF, size) before adding it. MANAGE_EMOJIS.
POST /v1/messaging/servers/:serverId/emojisAdds an uploaded emoji (emojiId from the upload, name: 2–32 letters, numbers and underscores, unique in the server). GIFs are animated. Use it as <:name:id> in messages and name:id as a reaction. MANAGE_EMOJIS.
PATCH /v1/messaging/servers/:serverId/emojis/:emojiIdRenames an emoji. MANAGE_EMOJIS.
DELETE /v1/messaging/servers/:serverId/emojis/:emojiIdDeletes an emoji. MANAGE_EMOJIS.
GET /v1/messaging/stickersEvery sticker you can pick, by server (each of your servers with stickers: its name, icon and stickers). Another server's need USE_EXTERNAL_STICKERS where you send them.
GET /v1/messaging/servers/:serverId/stickersA server's stickers (name, description, related emoji as tags, format, who added it) and its limits (platform data; by default 60 stickers, 512 KB each).
POST /v1/messaging/servers/:serverId/stickers/uploadsWhere to PUT a sticker image (mime: PNG, APNG, GIF or WebP; size) before adding it; the answer names its stickerId. MANAGE_EMOJIS.
POST /v1/messaging/servers/:serverId/stickersAdds an uploaded sticker (stickerId, mime, name 2 to 30 characters, optional description and tags: the emoji it's like). Send it with a message's stickerIds (up to 3). MANAGE_EMOJIS.
PATCH /v1/messaging/servers/:serverId/stickers/:stickerIdChanges a sticker's name, description or tags (null clears). MANAGE_EMOJIS.
DELETE /v1/messaging/servers/:serverId/stickers/:stickerIdDeletes a sticker. MANAGE_EMOJIS.
GET /v1/messaging/soundsEvery soundboard sound you can play, by server (each of your servers with sounds). Another server's need USE_EXTERNAL_SOUNDS where you play them.
GET /v1/messaging/servers/:serverId/soundsA server's soundboard (name, emoji, volume, length, who added it) and its limits (platform data; by default 48 sounds, 512 KB and 5.2 seconds each).
POST /v1/messaging/servers/:serverId/sounds/uploadsWhere to PUT a sound (mime: MP3, Ogg, WAV, WebM or MP4 audio; size) before adding it; the answer names its soundId. MANAGE_EMOJIS.
POST /v1/messaging/servers/:serverId/soundsAdds an uploaded sound (soundId, mime, durationMs as measured, name 2 to 32 characters, optional emoji and volume 0 to 1). MANAGE_EMOJIS.
PATCH /v1/messaging/servers/:serverId/sounds/:soundIdChanges a sound's name, emoji or volume. MANAGE_EMOJIS.
DELETE /v1/messaging/servers/:serverId/sounds/:soundIdDeletes a sound. MANAGE_EMOJIS.
POST /v1/messaging/channels/:channelId/soundboardPlays a sound (soundId) for everyone connected to the voice or stage channel: they get a soundboard event and their apps play it. You must be connected there, able to speak and not deafened; USE_SOUNDBOARD (and USE_EXTERNAL_SOUNDS for another server's). Up to 12 a minute.
GET /v1/messaging/servers/:serverId/membersThe server's members with nicknames, roles and presence (q filters by name).
GET /v1/messaging/servers/:serverId/members/searchThe member directory, a page at a time: sort (name, joined_desc, joined_asc), roleId, q (names and nicknames, accents and case ignored), limit (up to 100) and cursor (from the last page; null when there's no more). Every member may look; moderators also get, per person, what they may do to them (manage).
POST /v1/messaging/servers/:serverId/members/bulkOne action for up to 100 members: kick, ban (reason), timeout (until, ms, or null to remove), add_role or remove_role (roleId). Each goes through the usual permission and hierarchy checks; returns who it was done to and who failed and why.
PATCH /v1/messaging/servers/:serverId/members/meYour settings in a server: nickname (CHANGE_NICKNAME), notifications (notify: all, mentions, none; muted with muteMinutes; suppressEveryone, suppressRoles), privacy (allowDms from its members), whether you wear its tag, hiding muted channels, and your channel list (Browse Channels: showAllChannels, and channels switched on or off as { channelId, listed }, a category's id for all its channels; only channels you can see).
POST /v1/messaging/servers/:serverId/onboardingAnswers the server's onboarding questions (answers: option indexes per question), at joining or again later (Channels & Roles): the chosen options' roles are granted (answering again takes back roles of options no longer chosen) and their channels added to your channel list. Returns your roles and settings.
GET /v1/messaging/servers/:serverId/insightsMembership and activity: members, online now, joins per day over 30 days, messages and people per channel over 7 days, members per role. MANAGE_SERVER.
GET /v1/messaging/servers/:serverId/templateThe server's template, if it has one: its link, name, uses and size. MANAGE_SERVER.
POST /v1/messaging/servers/:serverId/templateMakes (or replaces) the server's template from its current channels, roles, permission overwrites and settings. Messages and members are never included. MANAGE_SERVER.
PUT /v1/messaging/servers/:serverId/templateBrings the template up to date with the server's current channels and roles.
DELETE /v1/messaging/servers/:serverId/templateDeletes the server's template; its link stops working.
GET /v1/messaging/templates/:codeWhat a template link holds: name, description, categories with their channels, and roles.
POST /v1/messaging/templates/:codeCreates a server you own from a template (name, optional icon).
POST /v1/messaging/servers/:serverId/securitySecurity actions: pause new joins through invites (invitesPausedHours) or DMs between members who aren't friends (dmsPausedHours) for up to 24 hours; 0 resumes. MANAGE_SERVER.
GET /v1/messaging/servers/:serverId/audit-logThe audit log, newest first (45 days): who changed the server, its channels, roles, members, invites and settings. Filters action, userId; before pages. VIEW_AUDIT_LOG.
PATCH /v1/messaging/servers/:serverId/members/:userIdA member's nickname, roles, timeout (timeoutUntil, up to 28 days) or voice mute and deafen, by permission and hierarchy.
DELETE /v1/messaging/servers/:serverId/members/:userIdKicks a member below you (KICK_MEMBERS).
GET /v1/messaging/servers/:serverId/bansBanned people and why (BAN_MEMBERS).
PUT /v1/messaging/servers/:serverId/bans/:userIdBans someone (reason optional): they're removed and can't rejoin.
DELETE /v1/messaging/servers/:serverId/bans/:userIdLifts a ban.
GET /v1/messaging/servers/:serverId/invitesThe server's working invites (not expired or used up), newest first, with who made each (inviter) and their uses (MANAGE_SERVER).
POST /v1/messaging/servers/:serverId/invitesCreates an invite (channelId, maxUses up to 100, maxAgeSeconds up to 7 days; 0 never expires). CREATE_INVITE.
GET /v1/messaging/channels/:channelId/invitesOne channel's working invites, as the server's list gives them (MANAGE_CHANNELS in the channel).
GET /v1/messaging/invites/:codeWhat an invite opens: the server's name, icon, description, member and online counts, and whether you're in it already. Limited per person a minute.
POST /v1/messaging/invites/:codeJoins the invite's server (bans apply).
DELETE /v1/messaging/invites/:codeRevokes an invite (its creator, MANAGE_SERVER, or MANAGE_CHANNELS in its channel).
GET /v1/messaging/channels/:channelId/messagesA page of messages, oldest first: the newest by default, before or after a message id, or around one (jumping to it), limit up to 100. hasMoreBefore and hasMoreAfter say whether there's more either side.
POST /v1/messaging/channels/:channelId/messagesSends a message (content up to 4,000 characters, replyTo, attachments uploaded first, nonce to send once). Mentions: <@usr_…>, <@&role>, @everyone/@here (MENTION_EVERYONE). A bot's message can carry components: up to five action rows (type 1) of up to five buttons (type 2) or one select menu: options (3), members (5), roles (6) or channels (8, channelTypes), with minValues, maxValues, defaultValues ({ id, type }), placeholder and disabled.
GET /v1/messaging/channels/:channelId/messages/:messageIdOne message.
PATCH /v1/messaging/channels/:channelId/messages/:messageIdEdits your own message (content).
DELETE /v1/messaging/channels/:channelId/messages/:messageIdDeletes a message: your own, or anyone's with MANAGE_MESSAGES.
GET /v1/messaging/channels/:channelId/pinsThe channel's pinned messages, newest first (50 at most).
PUT /v1/messaging/channels/:channelId/pins/:messageIdPins a message (MANAGE_MESSAGES).
DELETE /v1/messaging/channels/:channelId/pins/:messageIdUnpins a message.
PUT /v1/messaging/channels/:channelId/messages/:messageId/reactions/:emojiAdds your reaction (a new emoji on the message needs ADD_REACTIONS; 20 different at most).
DELETE /v1/messaging/channels/:channelId/messages/:messageId/reactions/:emojiRemoves your reaction.
GET /v1/messaging/channels/:channelId/messages/:messageId/reactions/:emojiWho reacted with an emoji.
PATCH /v1/messaging/channels/:channelId/settingsYour notifications for a channel, category or thread (notify: default follows the next place out: a thread its channel, a channel its category, a category the server; all, mentions or none) and its mute (muted, with muteMinutes for a while). A muted place (or one in a muted category) shows no unread mark and sends no pushes; none shows no mention count; all pushes every message to your phone.
PUT /v1/messaging/channels/:channelId/messages/:messageId/poll/answers/:answerIdVotes for a poll's answer (with one answer each, it replaces your earlier vote). Polls are posted with poll (question, 2–10 answers, hours open, multiple) on a new message; SEND_POLLS.
DELETE /v1/messaging/channels/:channelId/messages/:messageId/poll/answers/:answerIdTakes your vote for an answer back.
GET /v1/messaging/channels/:channelId/messages/:messageId/poll/answers/:answerId/votersWho chose an answer (first 100).
POST /v1/messaging/channels/:channelId/messages/:messageId/poll/endEnds a poll early (its author, or MANAGE_MESSAGES).
DELETE /v1/messaging/channels/:channelId/messages/:messageId/embedsRemoves a message's link previews for good (its author, or MANAGE_MESSAGES). Links are previewed after a message is sent or edited; <https://…> in angle brackets isn't.
POST /v1/messaging/channels/:channelId/messages/:messageId/forwardForwards a copy of a message (its text, files and link previews, as they are now, and where it came from; not its author) to up to five channels in to, with an optional note. Mentions in the copy don't notify; polls and system messages can't be forwarded; forwarding a forward sends the original copy on. Each channel's own rules apply (Send Messages, Attach Files for files, slow mode, AutoMod); results says what happened in each. Forwards to direct messages are made by the app (they're end to end). Needs READ_MESSAGE_HISTORY where it's from.
GET /v1/messaging/forward-targetsWhere you can forward to: by server, the text and announcement channels you can post in.
POST /v1/messaging/channels/:channelId/messages/:messageId/publishPublishes a post in an announcement channel to the channels following it: each gets a copy shown as this server and channel, with a link back. Edits and deletion of the post reach the copies; mentions in copies don't notify. Your own post (with SEND_MESSAGES), or anyone's with MANAGE_MESSAGES; once per post.
POST /v1/messaging/channels/:channelId/followersHas targetChannelId (a text channel where you have MANAGE_WEBHOOKS) follow this announcement channel, which you need to see. The target channel gets a notice; it can follow up to 10 channels.
DELETE /v1/messaging/channels/:channelId/followers/:targetChannelIdStops a channel following this announcement channel. MANAGE_WEBHOOKS in the following channel.
GET /v1/messaging/servers/:serverId/followingThe announcement channels this server's channels follow, with their server and channel names. MANAGE_WEBHOOKS.
GET /v1/messaging/follow-targetsWhere you can have a channel follow an announcement channel: by server, the text channels where you have MANAGE_WEBHOOKS.
POST /v1/messaging/channels/:channelId/unreadMarks a channel or thread unread from messageId on (the read marker moves to the message before it).
POST /v1/messaging/channels/:channelId/ackMarks the channel read up to messageId and clears its mentions; your other devices hear.
POST /v1/messaging/channels/:channelId/typingShows you typing to the channel for 8 seconds.
POST /v1/messaging/uploadsWhere to PUT a file (channelId, name, size up to 25 MB, mime) before sending it as an attachment (ATTACH_FILES).
GET /v1/messaging/channels/:channelId/threadsA channel's threads you can see: active ones, or archived ones with archived=1, most recently active first.
POST /v1/messaging/channels/:channelId/threadsStarts a thread (name; messageId to start it from a message; private in text channels; autoArchive 60, 1440, 4320 or 10080 minutes). In a forum channel it's a post and needs a first message. CREATE_THREADS.
GET /v1/messaging/servers/:serverId/threadsThe active threads you follow in a server.
GET /v1/messaging/threads/:threadIdA thread with its members. Its messages use the channel message routes with the thread's id.
PATCH /v1/messaging/threads/:threadIdRenames, archives, unarchives or changes a thread's auto-archive (its creator or MANAGE_THREADS); locks it (MANAGE_THREADS).
DELETE /v1/messaging/threads/:threadIdDeletes a thread and its messages. MANAGE_THREADS.
PUT /v1/messaging/threads/:threadId/members/meFollows a thread.
DELETE /v1/messaging/threads/:threadId/members/meStops following a thread.
PUT /v1/messaging/threads/:threadId/members/:userIdAdds someone to a thread (private threads: its members or MANAGE_THREADS).
DELETE /v1/messaging/threads/:threadId/members/:userIdRemoves someone from a thread (themselves, its creator or MANAGE_THREADS).
GET /v1/messaging/relationshipsYour friends, friend requests (incoming and outgoing) and people you've blocked.
POST /v1/messaging/relationshipsSends a friend request by userId or exact email (the answer is the same whether or not the address has an account). Accepts theirs if they already asked you.
PUT /v1/messaging/relationships/:userIdAccepts a friend request.
PUT /v1/messaging/relationships/:userId/blockBlocks someone: no friendship, requests or DMs between you. They aren't told.
DELETE /v1/messaging/relationships/:userIdRemoves a friend, cancels or declines a request, or unblocks.
GET /v1/messaging/devicesYour devices registered for end-to-end DMs.
GET /v1/messaging/devices/signerMirage's device-signing key (a P-256 JWK, or null on a stage without one): devices check other devices' certificates with it before sealing keys for them.
PUT /v1/messaging/devices/:deviceIdRegisters a device's public key (a P-256 JWK, publicKey) for end-to-end DMs, again on each launch. Mirage certifies it; a new device's conversations ask their members' devices to share their keys with it.
DELETE /v1/messaging/devices/:deviceIdRemoves a device: conversations move to new keys it doesn't get.
GET /v1/messaging/dmsYour open DMs and group DMs, most recent first, with members, the current key version and read position.
POST /v1/messaging/dmsOpens a DM with one person (userIds: [id], reusing the existing one) or a group DM with up to 9 others (name optional). Friends and people you share a server with.
GET /v1/messaging/dms/candidatesPeople you can message: friends first, then people in your servers (q filters by name).
PATCH /v1/messaging/dms/:dmIdChanges a group DM: its name or icon (name, icon; any member, and the conversation says who), or its members (add, remove; removing is the owner's). Membership changes start a new key version.
DELETE /v1/messaging/dms/:dmIdCloses a DM (it reopens with the next message) or leaves a group DM.
GET /v1/messaging/dms/:dmId/devicesThe members' certified devices in use, each with its certificate and whether it has the current key, and the current key version.
GET /v1/messaging/dms/:dmId/keysThe conversation keys sealed for one of your devices (device), every version it has, each with the device that sealed it; which members can still share each version (holders); and when your device registered.
GET /v1/messaging/dms/:dmId/keys/missingMembers' certified devices without a key version that exists, so any member's device that has it can seal it for them.
POST /v1/messaging/dms/:dmId/keysStores conversation keys a member's device sealed (senderDeviceId, keys), for current members' certified devices: the current version's key (create, once), the next version's (rotate), or versions the device has, shared with devices that lack them.
POST /v1/messaging/dms/:dmId/keys/requestAsks the members' devices to share keys one of your devices lacks (deviceId); at most once a minute per conversation.
GET /v1/messaging/dms/:dmId/messagesA page of encrypted messages, oldest first (before, limit), with their encrypted reactions and votes; thread replies only with thread (the message that started it; after for newer).
GET /v1/messaging/dms/:dmId/messages/:messageIdOne encrypted message (a reply's original, a pin or a saved message).
GET /v1/messaging/dms/:dmId/messages/:messageId/editsAn edited message's earlier versions, oldest first, each still encrypted under the key it was written with.
PUT /v1/messaging/dms/:dmId/messages/:messageId/marks/:kindSets your encrypted reactions to a message (reactions) or your vote in its poll (vote), with the current key; members hear dm_mark.
DELETE /v1/messaging/dms/:dmId/messages/:messageId/marks/:kindTakes back your reactions to a message, or your vote.
POST /v1/messaging/dms/:dmId/messages/:messageId/poll/endEnds your poll early: it takes no more votes.
POST /v1/messaging/dms/:dmId/messages/:messageId/forwardForwards a DM's text to up to 5 channels (to, optional note): your device decrypts it and sends the copy (copy.content); its files stay in the DM.
GET /v1/messaging/dms/:dmId/pinsThe conversation's pinned messages, most recently pinned first.
PUT /v1/messaging/dms/:dmId/pins/:messageIdPins a message (any member, up to 50); the conversation says who.
DELETE /v1/messaging/dms/:dmId/pins/:messageIdUnpins a message.
POST /v1/messaging/dms/:dmId/uploadsWhere to PUT a file's ciphertext before sending it (size, up to 25 MB): the file is encrypted on your device under a key the message's ciphertext holds.
GET /v1/messaging/dms/:dmId/files/:uploadIdA short-lived URL for one of the conversation's files (its ciphertext; your device decrypts it).
POST /v1/messaging/dms/:dmId/icon/uploadsWhere to PUT a group DM's new icon (mime, size up to 2 MB); PATCH /v1/messaging/dms/:dmId with icon sets it.
GET /v1/messaging/dms/:dmId/iconRedirects to a group DM's icon (members only; the image isn't encrypted, as the group's name isn't). ?as=url answers { url }, a short-lived link, instead.
POST /v1/messaging/dms/:dmId/scheduledSend Later in a DM: a message your device sealed now (senderDeviceId, keyVersion, iv, ciphertext), sent at at. If the key changes first it waits for your device to seal it again.
POST /v1/messaging/dms/:dmId/remindersRemind Me about a DM message (messageId, at): it's saved to Later, and the reminder says who sent it, not what.
GET /v1/messaging/composer-settingsWhat the composer offers: gifs (enabled, the provider and its label, shown as "Powered by") and voiceMaxSeconds, the longest voice message (a platform limit).
GET /v1/messaging/gifsTrending GIFs, or a search with q; page (from next) and locale. 24 a page; every preview link (preview.mp4, gif, still) loads from Mirage. Send a GIF by sending its url as a message. 60 a minute.
GET /v1/messaging/gifs/favouritesYour favourite GIFs, newest first.
PUT /v1/messaging/gifs/favouritesAdds a GIF to your favourites (provider, id), looked up with its provider; up to mirage.gifs.favourites (a platform limit).
DELETE /v1/messaging/gifs/favourites/:provider/:gifIdTakes a GIF out of your favourites.
POST /v1/messaging/link-previewsA link's preview for a DM you're writing (url): fetched by the API (browsers can't; YouTube, X, Spotify, Vimeo, SoundCloud and TikTok through their oEmbed), with its image up to 1 MB, kept nowhere; a GIF provider's link comes with its still and animated GIF. Your device encrypts it into the message. 30 a minute.
POST /v1/messaging/dms/:dmId/messagesSends an encrypted message (senderDeviceId, keyVersion: the current one, iv, ciphertext, nonce). With strict, refused (409 devices_missing, listing them) while a member's current device lacks the key. In the clear for the API: attachmentIds (uploaded files), poll.endsAt, threadId.
PATCH /v1/messaging/dms/:dmId/messages/:messageIdReplaces your message's ciphertext (an edit); the version it replaces is kept for the edit history.
DELETE /v1/messaging/dms/:dmId/messages/:messageIdDeletes your message.
POST /v1/messaging/dms/:dmId/ackMarks the DM read up to messageId.
POST /v1/messaging/dms/:dmId/typingShows you typing to the others for 8 seconds.
POST /v1/messaging/channels/:channelId/summaryCatch Me Up: Caity summarises what you haven't read in the channel (or its recent conversation when you're up to date) and sends it to you alone over the socket as caity_summary (channelId, text, count). It reads only what Caity may read, for someone who can read the channel; counts against your hourly questions to Caity. READ_MESSAGE_HISTORY. 403 with code: "caity_off" (and canChange for Manage Server) when the server has Caity off.
POST /v1/messaging/servers/:serverId/caityAsks Caity about the server: without question, a summary of what you missed across its channels, threads and forum posts; with question (up to 500 characters), an answer from the server's history, found with its search, and from the server's notes when you can open them in Notes (with notes: true, your own Notes too). 202 with a requestId; the answer goes to you alone over the socket as caity_server (serverId, kind summary or answer, requestId, text, count, a summary's channels, an answer's sources and notes). It reads only channels both you and Caity can read now, never private or age-restricted channels, private threads or DMs, and Notes only as you can read them. Counts against your hourly questions to Caity, your plan's messages for the day and the monthly cap (429). 403 with code: "caity_off" when the server's admins turned Caity off (caity on PATCH /v1/messaging/servers/:serverId, Manage Server).
GET /v1/messaging/servers/:serverId/caity/notesThe server's notes, the Notes page Caity also answers from, as you see them: { linked: false }, { linked: true, readable: true, title, url } when you can open it in Notes, else { linked: true, readable: false }. Members only.
PUT /v1/messaging/servers/:serverId/caity/notesLinks the server's notes: link, a Notes page you can open (its URL, or <org>/<pageId>); Caity answers from it and the pages under it for members who can open it themselves. Manage Server. 400 for something that isn't a link to a page in one of your organisations, 404 for a page you can't open.
DELETE /v1/messaging/servers/:serverId/caity/notesUnlinks the server's notes. Manage Server.
POST /v1/messaging/channels/:channelId/caity/draftHelp Me Write: Caity drafts a message from text (what you want to say, up to 1,000 characters) and the channel's latest messages when you and Caity can both read them, in your language. 202 with a requestId; the draft goes to you alone over the socket as caity_assist (kind: "draft", requestId, channelId, text, failed when it couldn't). Nothing is sent. Server channels and threads where you can send; never DMs. Counts like a question to Caity; 403 with code: "caity_off" when she's off there.
POST /v1/messaging/channels/:channelId/messages/:messageId/translateTranslates a message you can read into your language, for you alone: 202 with a requestId; the translation arrives over the socket as caity_assist (kind: "translate", messageId, text, language). Server channels and threads only, never DMs. Counts like a question to Caity; 403 with code: "caity_off" when she's off there.
GET /v1/messaging/savedYour Later list: messages you saved, newest saved first, each with done and the message (null when it was deleted or you can't read it any more). Up to 500.
GET /v1/messaging/saved/idsThe ids of the messages you saved (for showing Save or Remove).
PUT /v1/messaging/saved/:messageIdSaves a message for later (channelId where it is). You need to be able to read it.
PATCH /v1/messaging/saved/:messageIdMarks a saved message done (done: true) or not.
DELETE /v1/messaging/saved/:messageIdRemoves a message from your Later list.
GET /v1/messaging/users/:userId/profileSomeone beyond their card: the servers you're both in (with their nickname there), your mutual friends, and your private note about them. Only for people in a server or conversation with you, or among your friends, requests and blocks; 404 otherwise.
PUT /v1/messaging/users/:userId/noteYour private note about someone (note, up to 256 characters; empty clears it). Only you see it.
POST /v1/messaging/channels/:channelId/webhooksMakes an incoming webhook in a text or announcement channel (name, default Webhook; Manage Webhooks there; up to 15 a channel by default, as platform data sets). The answer's url holds the token: it's shown this once, and whoever has it can post.
GET /v1/messaging/servers/:serverId/webhooksA server's incoming webhooks in the channels where you have Manage Webhooks and can see (name, channel, who made it, when it last posted), never their tokens. Refused without Manage Webhooks anywhere.
PATCH /v1/messaging/servers/:serverId/webhooks/:webhookIdRenames a webhook (name) or moves it to another channel of the server (channelId, where you also manage webhooks).
POST /v1/messaging/servers/:serverId/webhooks/:webhookId/tokenA new token for a webhook: the answer's url replaces the old one, which stops working at once.
DELETE /v1/messaging/servers/:serverId/webhooks/:webhookIdDeletes a webhook; its URL stops working. Its messages stay.
GET /v1/messaging/inbox/mentionsYour recent mentions across your servers, newest first (limit up to 50), each with its server's name: you by name, your roles and @everyone/@here (as each server's suppress settings allow; roles=0 or everyone=0 leaves them out), never your own messages; cursor (the last result's id) for the next page.
GET /v1/messaging/inbox/unreadsThe channels with messages you haven't read, by server, newest first, with their mention counts; muted servers and channels are left out.
GET /v1/messaging/me/noticesYour notices from the platform, newest first (notices: id, kind (report: a report you filed was reviewed), title, body, read, createdAt; kept 90 days), and how many are unread.
POST /v1/messaging/me/notices/readMarks your notices read; your other devices hear (notice event with unread: 0).
POST /v1/messaging/channels/:channelId/scheduledSend Later: posts content in the channel at at (milliseconds since 1970; at least a minute and at most 120 days ahead), as you, with your permissions then. If it can't go, you hear why over the socket (scheduled_failed, with the text). Up to 50 scheduled messages and reminders at once.
POST /v1/messaging/channels/:channelId/remindersRemind Me: a reminder about messageId at at, on your open apps (reminder over the socket) and your phone; the message is saved to your Later list now and comes back into progress when it's due.
GET /v1/messaging/scheduledYour scheduled messages and reminders, soonest first (channelId for one channel).
PATCH /v1/messaging/scheduled/:scheduledIdChanges a scheduled message's content or at (a reminder's at).
DELETE /v1/messaging/scheduled/:scheduledIdCancels a scheduled message or reminder.
POST /v1/messaging/reportsReports something to the people who can act on it: kind message (channelId, messageId: the server's moderators), user (userId, with serverId for that server's moderators) or dm_message (dmId, messageId and content, the text as your device decrypted it: platform staff only). With a reason (spam, harassment, hate, violence, self_harm, sexual, illegal, impersonation, other) and optional details. A copy of what was reported is kept; moderators don't see who reported. Once per thing, and up to 20 an hour.
GET /v1/messaging/servers/:serverId/reportsA server's open reports (status=all for every one), newest first, with a copy of what was reported. For moderators: Manage Messages, Moderate Members, Kick Members or Ban Members.
PATCH /v1/messaging/servers/:serverId/reports/:reportIdMarks a report actioned or dismissed (with an optional note), or open again. For moderators.
POST /v1/messaging/channels/:channelId/voiceJoins a voice or stage channel (CONNECT), starting its meeting when nobody's in it; on a stage you join the audience, listening, and in the server's AFK channel join is null (there's no call). Returns your voice state and join: the meeting, your attendee and its join token (yours alone), the channel's audio profile and camera quality, and local on the local stack. sessionId names this tab or app; joining elsewhere leaves where you were. A full channel (userLimit) refuses unless you have MOVE_MEMBERS; without SPEAK you only listen, without STREAM camera and screen share are receive-only, and server mute and deafen apply.
GET /v1/messaging/servers/:serverId/voice-statesWho's connected to the server's voice channels you can see, with their mute, deafen, camera and screen share.
PATCH /v1/messaging/servers/:serverId/voice-states/:userIdModerators: server mute (mute, MUTE_MEMBERS) or deafen (deaf, DEAFEN_MEMBERS) someone, kept on their membership; move them to another voice or stage channel (channelId: MOVE_MEMBERS there and where they are, CONNECT there; passes the user limit) or disconnect them (channelId: null); on a stage, bring them up to speak (muted) or back to the audience (speaker, stage moderators: MANAGE_CHANNELS, MUTE_MEMBERS and MOVE_MEMBERS there). Moves and disconnects are in the audit log.
POST /v1/messaging/channels/:channelId/voice/moveMoves everyone in a voice or stage channel to another (channelId; MOVE_MEMBERS in both, CONNECT there; people who can't see it stay) or disconnects them all (channelId: null). Returns how many moved. In the audit log.
GET /v1/messaging/servers/:serverId/stagesThe server's live stages you can see: channel, topic, who started it and when.
PUT /v1/messaging/channels/:channelId/stageStarts a stage with a topic (up to 120 characters), or changes the topic of a live one. Everyone who can see the channel gets a stage event. Stage moderators.
DELETE /v1/messaging/channels/:channelId/stageEnds a live stage; people stay connected. It also ends when the last person leaves. Stage moderators.
PATCH /v1/messaging/channels/:channelId/stage/meOn a stage you're connected to: raise or lower your hand (request, REQUEST_TO_SPEAK), step down to the audience (speaker: false), or step up to speak (speaker: true, stage moderators).
GET /v1/messaging/voice/regionsLocations a voice channel can keep its media in (its rtcRegion). Without one, media goes to the location serving whoever starts the call.
GET /v1/messaging/voice/meWhere you're connected (a voice channel or a DM call), or null.
PATCH /v1/messaging/voice/meYour own mute, deafen, camera and screen share (selfMute, selfDeaf, selfVideo, selfStream) for the session given (sessionId). Camera and screen share need STREAM.
POST /v1/messaging/voice/heartbeatKeeps your connection listed: every 45 seconds, or after 2 minutes you're taken out. 404 when you aren't connected, 409 when another session took over.
POST /v1/messaging/voice/idleYour app saw you idle (not speaking, not using it) for the server's AFK timeout: moves your connection (sessionId) to the server's AFK channel, where there's no call. Nothing happens without an AFK channel.
POST /v1/messaging/voice/leaveLeaves the voice channel or call, when sessionId is still the one connected (a closed tab's beacon can't end a newer session). The last one out ends the meeting.
GET /v1/messaging/callsCalls going on in your DMs: who's in each and who's being rung.
GET /v1/messaging/dms/:dmId/callThe DM's call going on, or null.
POST /v1/messaging/dms/:dmId/callStarts a call in a DM or group DM, ringing everyone else for 45 seconds (video starts with cameras on), or joins the one going on (answering). Returns the call, your voice state and join, as for voice channels. Not in a DM where either person blocked the other.
POST /v1/messaging/dms/:dmId/call/ringRings people in the DM who aren't in the call (userIds, or everyone). You must be in it.
POST /v1/messaging/dms/:dmId/call/declineStops the call ringing for you.
GET /v1/messaging/servers/:serverId/leaderboardsA server's leaderboards page in one read: its settings (enabled, timeZone, coursesBy, channelId), whether you manage them and may make courses, its boards, courses (with a thinned preview of each route), seasons, badges, your entry, recent awards, its leagues, and the closed circuits speed boards may use. Members, once a manager has turned them on.
PUT /v1/messaging/servers/:serverId/leaderboards/settingsTurns leaderboards on or off and sets the time zone periods are cut in (a place's zone), who may make courses (managers or members) and the channel results are posted in. Manage Server.
GET /v1/messaging/leaderboards/circuitsThe closed circuits speed and lap boards may use (checked and enabled in Admin): names, regions, lengths and boundaries.
GET /v1/messaging/servers/:serverId/leaderboards/meYour entry in a server's leaderboards (joined, the cars entered and your choices) and the cars you may enter: your own, from your Personal space.
PUT /v1/messaging/servers/:serverId/leaderboards/meTakes part, or changes which cars do (vehicleIds: up to 5 of your own), with your choices: anonymous (show a stand-in name), showCars, courses (join course boards), notifyResults, notifyRecords, paused. Newly entered cars' drives from the last 90 days are counted too.
PATCH /v1/messaging/servers/:serverId/leaderboards/meChanges your choices (anonymous, showCars, courses, notifyResults, notifyRecords, paused).
DELETE /v1/messaging/servers/:serverId/leaderboards/meStops taking part: everything counted for you in this server (stats, course efforts, badges) is deleted.
POST /v1/messaging/servers/:serverId/leaderboards/boardsMakes a board: name, metric (efficiency, consistency, regenShare, co2Saved, distance, drives, smoothness, activeDays, streak, offPeakShare, solarShare, superchargerVisits, newSuperchargers, placesExplored, climbing; and on a closed circuit only, with circuitId, bestLap, topSpeed, circuitLaps, circuitDistance), period (week, month, year, all, season with seasonId or the current season, rolling7, rolling30, custom with from and to), groupBy (member, car, role with roleIds), filters (models, tripClasses, minimum), top, anonymous, channelId, announce, emoji, description. Speed and time on public roads are refused. Manage Server.
PUT /v1/messaging/servers/:serverId/leaderboards/boards/orderPuts the boards in the order given (boardIds). Manage Server.
GET /v1/messaging/servers/:serverId/leaderboards/boards/:boardIdA board with its standings for the current period (offset=-1 the one before, back to 52), its period's dates, how its metric reads, and your own place. Stand-in names hide who's behind them, ids included.
GET /v1/messaging/servers/:serverId/leaderboards/boards/:boardId/resultsA board's finished periods, newest first: each one's standings as it ended.
PATCH /v1/messaging/servers/:serverId/leaderboards/boards/:boardIdChanges a board (the fields of making one; null clears an optional one). The same safety rule applies. Manage Server.
DELETE /v1/messaging/servers/:serverId/leaderboards/boards/:boardIdDeletes a board. Manage Server.
GET /v1/messaging/servers/:serverId/leaderboards/drivesYour recent drives of one of your cars (vehicleId), newest first, to make a course from: when, how far, whether each has a route. Private drives aren't listed. For people who may make courses.
GET /v1/messaging/servers/:serverId/leaderboards/drives/:vehicleId/:tripIdOne of your own drives' route (simplified), to choose a stretch of for a course (startedAt: when it started, from the list). Yours alone.
POST /v1/messaging/servers/:serverId/leaderboards/coursesMakes a course: name, rankBy (efficiency, smoothness or efforts; time and topSpeed only for a course wholly inside a closed circuit), and either path ([lat, lon] points drawn or typed) or a stretch of your own drive (vehicleId, tripId, startedAt, fromKm, toKm). Entered cars' drives from the last 30 days are matched against it. Manage Server, or any member where the server allows it.
POST /v1/messaging/servers/:serverId/leaderboards/courses/snapPuts a drawn route on the roads: path (2 to 501 [lat, lon] points). Returns path and snapped; where no road matches closely, or snapping isn't available (reason: no_match, no_token, error), the route as sent. Up to 60 an hour a person. Whoever may make courses here.
POST /v1/messaging/servers/:serverId/leaderboards/courses/previewWhich of your own drives from the last 30 days would count on a drawn route: path (2 to 501 [lat, lon] points). Returns checked (drives read, at most 20) and matches (each car, when, distance, smoothness, efficiency and the stretch; never a time or speed). Only yours. Up to 30 an hour a person. Whoever may make courses here.
GET /v1/messaging/servers/:serverId/leaderboards/courses/:courseIdA course (its route), its standings for a period (all, season, year, month, week; offset for earlier ones), best effort per person, and your own efforts. Road courses keep no times.
PATCH /v1/messaging/servers/:serverId/leaderboards/courses/:courseIdRenames a course or changes how it ranks (the safety rule applies). Its maker or Manage Server.
DELETE /v1/messaging/servers/:serverId/leaderboards/courses/:courseIdDeletes a course. Its maker or Manage Server.
POST /v1/messaging/servers/:serverId/leaderboards/seasonsMakes a season: name, from and to (local days, inclusive, at most 400 days), optional emoji. Season boards rank over it. Manage Server.
PATCH /v1/messaging/servers/:serverId/leaderboards/seasons/:seasonIdChanges a season's name, emoji or dates. Manage Server.
DELETE /v1/messaging/servers/:serverId/leaderboards/seasons/:seasonIdDeletes a season. Manage Server.
POST /v1/messaging/servers/:serverId/leaderboards/badgesMakes a badge: name, emoji, optional color and description, and a rule: { kind: rank, boardId, top } (a top place when a board's period ends), { kind: threshold, metric, value, period } (a total reached in a month, year, season or all time; road metrics only), { kind: course, courseId, efforts }, or { kind: manual }. Manage Server.
PATCH /v1/messaging/servers/:serverId/leaderboards/badges/:badgeIdChanges a badge. Manage Server.
DELETE /v1/messaging/servers/:serverId/leaderboards/badges/:badgeIdDeletes a badge and its awards. Manage Server.
POST /v1/messaging/servers/:serverId/leaderboards/badges/:badgeId/awardsGives a hand-awarded badge to a member (userId, optional note). Manage Server.
DELETE /v1/messaging/servers/:serverId/leaderboards/badges/:badgeId/awards/:userId/:awardKeyTakes an award back. Manage Server.
POST /v1/messaging/servers/:serverId/leaderboards/leaguesMakes a league between servers: name, metric (a road metric), period (week, month, year, all), aggregate (total or average of members), optional emoji. Its code (for other servers to join with) is shown to its host. Manage Server.
POST /v1/messaging/servers/:serverId/leaderboards/leagues/joinJoins a league with its code, as this server (up to 20 servers a league). Manage Server.
GET /v1/messaging/servers/:serverId/leaderboards/leagues/:leagueIdA league's standings: each server's score from its taking-part members, with names and icons; never anyone in them.
DELETE /v1/messaging/servers/:serverId/leaderboards/leagues/:leagueIdLeaves a league; its host leaving ends it. Manage Server.