# Managing API Keys

API keys are managed on a per Discord server basis. When you add FiveRoster to your Discord server you'll have the option to generate API keys for your specific use within that server.

The data requested through the API will only be for the corresponding server and the rosters created within. If you attempt to retrieve roster information with an API key that isn't tied to the rosters Discord server then you will receive an error.

### Generating a new API key

To create a new API key, you'll need to head to the server page in FiveRoster and click on the "Settings" tab. From here, you'll see a section titled "API Key Management". Then, click on the "Create API Key" button in the top right to be shown a modal to provide a name for your key and also set an optional expiry.

<figure><img src="/files/YBht5sS6gMQEsuRuf71X" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Your API key is to be kept secret as anyone with it can pull information from your rosters including player information and ranks.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiveroster.com/api-management/managing-api-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
