# Generate an API key

## Create a new app to generate an API key

By now you've created an org and have successfully logged in as an administrator. Before you can begin making API requests, you will need to first generate an API key.

{% hint style="info" %}
**Note:** For our examples in this guide, we are completing each step in a development environment.
{% endhint %}

To generate an API key, complete the following steps after logging in to your org:

1. Select **Settings** > **Apps** on the left-hand menu.
2. Click **New App**. The Create App screen is displayed.
3. Enter a name for the new app in the Label field.
4. (Optional) Check **Sessions** to create a session-based app.
5. (Optional) Uncheck **CSRF Protection**. If this is checked, you will need to send the `medable-csrf-token` header with each authenticated request.
6. Click **Create App**. The API key appears in the API Key column.

{% hint style="info" %}
**Tip:** CSRF protection is not necessary for this example, but we highly recommend enabling it for production web apps.
{% endhint %}

In our example, we created a new app called NewHealth App with the API key `mwidxhb8ShcqmV1B9iOYJh`.

![Create App](/files/-Mj66TtRCmLZavo5tpyF)


---

# 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.medable.com/getting-started/cortex-user-guide/gen-api-key.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.
