What it is
Setting up a Send an API Request block used to mean finding the right address, method, headers and body yourself. API Templates do that part for you. Pick a template, answer a few questions in a fill-in form, and the request is written into your block. Every field accepts variables, so answers can come from command options, the member who ran the command or anything else your command knows.
293 templates built in
The Templates browser in the Request Builder comes with 293 ready-made requests:
- Discord API: 215 requests, such as sending a message, giving a role or banning a user, with a Most used list at the top. These use your bot's token automatically, so there is nothing to set up.
- Popular APIs: 78 more across AI (ChatGPT, Claude, Gemini and others), Gaming (Roblox, Fortnite, Hypixel, ER:LC and more), Fun, Data, Automation and Tools, including weather.
Each template shows whether it needs a key. If a key is missing, the template says so and offers a button like Add OpenAI key, which stores it in Secrets so it never sits inside the request. Click the star on any template to pin it under Favourites.
Use a template
- Add a Send an API Request block and click Open Request Builder.
- On a new request, pick Start from a template. On an existing one, click Templates in the top right.
- Search (try "chatgpt", "gif", "ban" or "roblox") or browse the groups.
- Fill in the form and click Use this template.
{option_username}Save and share your own
Built a request you want to reuse? Click Save as template, give it a Name, and choose which values to Ask each time and which stay Always the same. Each question becomes a field in the fill-in form. Your templates live in Your library and work in any command on any of your bots.
To share one, click Share on it and send the code. It starts with API_ and works just like command share codes: the other person clicks Import code, pastes it, and the template lands in their library.
Ready-made blocks from block search
Type something like "roblox" or "chatgpt" into the builder's block search and an API Templates section offers matching requests. Click one, answer any questions, and a Send an API Request block is added already set up, or pick Browse all templates to see the whole list.
Good to know
- You can save up to 200 templates of your own.
- Everything in a template is copied to whoever imports it. Keep keys in Secrets and your templates stay safe to share; BotGhost warns you before sharing a template that looks like it contains an API key.
- Prefer a cleaner builder? Builder Settings has switches for API Templates, Built-in API Catalogs and API Suggestions in Block Search.
- Existing API requests are unchanged. Templates only fill in a request when you pick one.
Full list of changes
- NewAPI Templates: 293 ready-made requests in the Request Builder, 215 for the Discord API and 78 for services like ChatGPT, Roblox and weather
- NewSave as template turns your own request into a fill-in form in Your library, ready on all your bots
- NewShare a template with an
API_code, and bring one in with Import code - NewAPI Templates in the builder's block search: pick one, answer any questions, and a Send an API Request block is added already set up
- NewFavourites on templates, and a button like Add OpenAI key when a template needs a key
- NewSwitches in Builder Settings for API Templates, Built-in API Catalogs and API Suggestions in Block Search
- NewSafely insert variables into a JSON body option in the Request Builder, so quotes and new lines typed by users no longer break AI prompts and other JSON requests
