API Access

This section provides guidance on utilizing the Cosmo API. Be advised that in order to access the API, it is necessary to purchase the API Addon from BuiltByBit and follow the instructions for its integration into Cosmo.

3rd Party Addons

Developers are welcome to create resources as add-ons for Cosmo that utilize the API. Be sure to make it clear that the resource is a Cosmo Addon and requires the API Addon to function.

Please refer to this page to view more information on creating an addon.

User API

By default, any user can create an API Key and use the User API. If you'd like to restrict API usage to a certain role (specific level, donators, etc.). You can restrict the API command permissions to those roles by going to Server Settings -> Integrations in your Discord Server and clicking on your bot.

Just be aware that once a user creates an API Key, restricting their access to the command will not revoke their API Key. So it's recommended to give access to a permanent role rather than Server Boosters, Patreon Supporters, etc.


View all the endpoints available in the Cosmo API on the dedicated page:



When any response other than 200 or 201 is returned. The error is described in the message under the error key. Example:

{"error": "This is a description of the error you just received"}

Last updated