Zrzur Developers

Zrzur Bot API

A bot is a Zrzur account that a program controls. It sits in servers like a member, reads and sends messages, answers slash commands, shows buttons and forms, moderates, posts files and can join voice channels. People install it; your code runs on your own computer or server.

These pages are all you need. Start with Start your bot, then build the complete bot.

How a bot works

  1. You create an application in the Developer Portal. It comes with a bot user and a token, the password of the bot.
  2. Someone with Manage Server installs the bot in a server and gives it permissions.
  3. Your program calls the REST API over HTTPS with the token in the x-bot-token header. This is how a bot acts.
  4. Your program keeps one gateway connection open, a WebSocket. This is how a bot hears: commands, button clicks, messages and member changes arrive there as events.

The path from nothing to a finished bot

  1. Start your bot: an application, a token, a first command.
  2. Applications and tokens: every setting of the Developer Portal, and how to install a bot.
  3. Gateway: connect, stay connected, come back after a failure.
  4. Slash commands, Answering interactions and Buttons, menus and forms.
  5. Messages, Roles and permissions, Moderation.
  6. Errors, Rate limits, Keeping tokens safe, Running in production.

Base URLs

ServiceURL
REST APIhttps://api.zrzur.com
Gateway (WebSocket)wss://events.zrzur.com
Fileshttps://cdn.zrzur.com
Voice (LiveKit)wss://voice.zrzur.com

Self-hosted servers use their own addresses. GET / on the API returns them, with the limits of that server. Read these fields (the answer has more; this one is shortened):

{
  "zrzur": "26.0.0",
  "ws": "wss://events.zrzur.com",
  "app": "https://app.zrzur.com",
  "features": {
    "autumn": { "enabled": true, "url": "https://cdn.zrzur.com" },
    "january": { "enabled": true, "url": "https://api.zrzur.com/january" },
    "livekit": {
      "enabled": true,
      "nodes": [{ "name": "fra", "lat": 50.11, "lon": 8.68, "public_url": "wss://voice.zrzur.com" }]
    },
    "webhooks": false,
    "forwarding": false,
    "polls": false,
    "server_events": false,
    "limits": {
      "default": { "message_length": 2000, "message_attachments": 5, "file_upload_size_limits": { "attachments": 20000000 } }
    }
  }
}
FieldWhat it is
zrzurVersion of the server; see the API changelog
wsGateway address
features.autumn.urlFile server: uploads and downloads
features.january.urlMedia proxy for link previews
features.livekit.nodes[].public_urlVoice server
features.limits.defaultLimits of an account, such as message length
features.webhooks, features.forwarding, features.polls, features.server_eventsWhether this installation has webhooks, message forwarding, polls and scheduled events switched on. Where one is false, its routes answer FeatureDisabled (webhook addresses: 404 NotFound)
appWeb app, for links you show people

GET /

Query Node. Fetch the server configuration for this Zrzur instance.

Rate limit: any_dlta, 20 / 10 s

What is not supported

What each status means

Each endpoint in this reference shows one of these marks.

StatusEndpoints
supported101
partial4
unverified52
unsupported33