Bots
These API endpoints are related to bots on IBL
bots/@allGet All Bots
Gets approved and certified bots, filtered and sorted. Returns a set of paginated IndexBot objects
Query Parameters
pagestring
The page number
sortstring
Sort order: new (default; newest first, with boosted listings on top), trending (net votes in the last 7 days, only bots with at least one vote in that window), votes (most votes this cycle) or servers (highest server count).
tagstring
Only bots with this tag (case-insensitive).
certifiedstring
true to only return certified bots.
Success
bots/@randomGet Random Bots
Returns a list of bots from the database in random order
Success
bots/@indexGet Bots Index
Gets the index of the bot-side of the list. Returns a ListIndexBot object
Success
bots/{id}Get Bot
Gets a bot by id
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Path Parameters
idRequiredstring
The bots ID
Query Parameters
targetstring
The target page of the request if any.
If target is 'page', then unique clicks will be counted based on a SHA-256 hashed IP
If target is 'invite', then the invite will be counted as a click
Officially recognized targets:
- page -> bot page view
- settings -> bot settings page view
- stats -> bot stats page view
- invite -> bot invite view
includestring
What extra fields to include, comma-seperated.long => bot long description
team_includesstring
If the bot is team-owned, what entities of the team to include
Success
bots/{id}Delete Bot
Deletes a bot from the list. This is irreversible. You must have 'Delete Bots' in the team if the bot is in a team. Returns 204 on success.
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Path Parameters
idRequiredstring
Bot ID
Success
bots/{client_id}/metaGet Bot Metadata
Gets the metadata of a bot such as whether it is already in the database/bot id checks
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Path Parameters
client_idRequiredstring
The client ID
Query Parameters
fallback_bot_idstring
The fallback bot ID to use if japi.rest is offline
Success
bots/{id}/seoGet Bot SEO Info
Gets the minimal SEO information about a bot for embed/search purposes. Used by v4 website for meta tags
Path Parameters
idRequiredstring
The bots ID
Success
bots/statsPost Bot Stats
This endpoint posts the stats of a bot. status is optional and self-reports the bot's presence (online/idle/dnd/offline) — post it periodically to keep it fresh, it will otherwise keep showing the last value posted.
Authorization
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Request Body
application/jsonRequiredserversinteger
The server count
0Maximum: 18446744073709552000shard_listarray<integer>
The shard list
shardsinteger
The shard count
0Maximum: 18446744073709552000statusstring
"online" | "idle" | "dnd" | "offline"usersinteger
The user count (not used in webpage)
0Maximum: 18446744073709552000Success
botsAdd Bot
Adds a bot to the database. Returns 204 on success
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Request Body
application/jsonRequiredbot_idstring
client_idstring
extra_linksarray<object>
invitestring
librarystring
longstring
nsfwboolean
prefixstring
shortstring
staff_notestring | null
tagsarray<string>
team_ownerstring
Success
bots/{id}/settingsUpdate Bot Settings
Updates a bots settings. You must have 'Edit Bot Settings' in the team if the bot is in a team. Returns 204 on success
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Request Body
application/jsonRequiredcaptcha_opt_outboolean
extra_linksarray<object>
invitestring
librarystring
longstring
nsfwboolean
prefixstring
shortstring
tagsarray<string>
Path Parameters
idRequiredstring
Bot ID
Success
bots/{id}/commandsGet Bot Commands
Gets the commands a bot's owner/team has documented for it.
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Path Parameters
idRequiredstring
Bot ID
Success
bots/{id}/commandsUpdate Bot Commands
Replaces the whole list of documented commands for a bot. You must have 'Edit Bot Settings' in the team if the bot is in a team.
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Request Body
application/jsonRequiredcommandsarray<object>
Path Parameters
idRequiredstring
Bot ID
Success
bots/{id}/changelogsGet Bot Changelogs
Gets the changelog/announcement entries a bot's owner/team has posted.
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Path Parameters
idRequiredstring
Bot ID
Success
bots/{id}/changelogsCreate Bot Changelog
Posts a new changelog/announcement entry for a bot. You must have 'Edit Bot Settings' in the team if the bot is in a team.
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Request Body
application/jsonRequiredcontentstring
titlestring
versionstring
Path Parameters
idRequiredstring
Bot ID
Success
bots/{id}/changelogs/{changelog_id}Delete Bot Changelog
Removes a changelog/announcement entry. You must have 'Edit Bot Settings' in the team if the bot is in a team.
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Path Parameters
idRequiredstring
Bot ID
changelog_idRequiredstring
Changelog entry ID
Success
users/{uid}/bots/{bid}/teamsPatch Bot Team
Transfers a bot to another team.
Semantically equivalent to:
- Remove bot in question from list
- Readd bot to list with same data
- Transfer bot ownership to team
The below are the requirements for this due to the above:
- The user must have the "Delete Bots" permission in the team they are transferring the bot from
- The user must have the "Add New Bots" permission in the team they are transferring the bot to
The bots ownership will be transferred to the new team.
Returns a 204 on success
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Request Body
application/jsonRequiredteam_idstring
The team ID to add the bot to
Path Parameters
uidRequiredstring
User ID
bidRequiredstring
Bot ID
Success