falafy
EN
Download free

Public API v1 · @falafy/bot

Build on Falafy

Bots, slash commands, buttons, webhooks and “sign in with Falafy”. All through a versioned public API, with an official TypeScript SDK.

What you can build

  • Bots that join servers with their own role and answer messages and commands.
  • Slash commands (/dice) with typed options, choices and autocomplete, plus user and message menus.
  • Components: buttons and select menus on your app’s messages, and forms (modals).
  • Ephemeral replies (only the invoker sees them) and deferred replies (“thinking…”) with follow-ups for 15 minutes.
  • Webhooks to post CI, monitoring or form notifications in a channel, with embeds.
  • OAuth2 for “sign in with Falafy” on your site (code + PKCE).

How it works

Each application is created in Settings > Developer in the app (or at falafy.com.br/app/dev) and gets a bot user, a token, a client secret and an Ed25519 public key. The REST API lives at https://falafy.com.br/api/v1; events arrive over the WebSocket gateway or, for interactions, as signed HTTP requests to your server.

IDs are UUIDs (version 7, time ordered). Dates are ISO 8601. JSON fields are camelCase.

Where to start

  1. Quickstart: create the app, install it and run a bot in minutes.
  2. API reference: every v1 route.
  3. Gateway and intents: real-time events.
  4. Interactions: commands, components, modals.
  5. Webhooks, OAuth2 and rate limits and errors.

House rules

Bots follow the same permissions as people (the bot’s role plus each channel’s rules), can’t DM anyone who shares no server with them (unless that person authorized the app) and every administrative action lands in the server’s audit log. Tokens and secrets are shown once and stored only as hashes.