> For the complete documentation index, see [llms.txt](https://cosmo.atomatrix.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cosmo.atomatrix.gg/api/overview.md).

# Overview

## 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](/addons/creating-an-addon.md) 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.

## Endpoints

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

{% content-ref url="/pages/nU2eTpHxakoZxjxX3L0H" %}
[Endpoints](/api/endpoints.md)
{% endcontent-ref %}

## Errors

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

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