# Authentication

All calls to the Felt API require authorization using a `Bearer` token in the request header:

```
Authorization: Bearer <API Token>
```

These are tokens associated to your account only, and that you have to manually provide to the application you want to use.

Since these tokens grant access to your account, you must store them securely and treat them as a password to your account.

{% hint style="info" %}
API tokens are scoped to a workspace, meaning that you can only work with resources associated to that workspace only.
{% endhint %}

You can create an API token in the [Developers tab of the Workspace Settings page](https://felt.com/maps/latest/developers):

<figure><img src="/files/sfwubRDKAIdShrjmBZku" alt=""><figcaption><p>Generate as many API tokens as you need</p></figcaption></figure>

<div><figure><img src="/files/yljedkWCSC2stEUNH5bW" alt=""><figcaption><p>Give your API token a unique name</p></figcaption></figure> <figure><img src="/files/FiJ7IB6GfEi6fvw7ri7E" alt=""><figcaption><p>Make sure to copy your token to a secure location</p></figcaption></figure></div>

Be sure to take note of the token before closing the dialog; you won’t have a second chance to view it.

Once you have your API token, you can authenticate your requests to the Felt API by using it as a bearer token in your `Authorization` header:

```
Authorization: Bearer felt_pat_07T+Jmpk...
```

Here's an example showing how to create a new Felt map:

{% tabs %}
{% tab title="curl" %}

```bash
# This looks like:
# FELT_API_TOKEN="felt_pat_ABCDEFUDQPAGGNBmX40YNhkCRvvLI3f8/BCwD/g8"
FELT_API_TOKEN="<YOUR_API_TOKEN>"

curl -L \
  -X POST \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $FELT_API_TOKEN" \
  'https://felt.com/api/v2/maps' \
  -d '{"title": "My newly created map"}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# This looks like:
# api_token = "felt_pat_ABCDEFUDQPAGGNBmX40YNhkCRvvLI3f8/BCwD/g8"
api_token = "<YOUR_API_TOKEN>"

r = requests.post(
  "http://felt.com/api/v2/maps",
  json={"title": "My newly created map"},
  headers={"Authorization": f"Bearer {api_token}"}
)
assert r.ok
print(r.json())
```

{% endtab %}
{% endtabs %}


---

# 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://developers.felt.com/rest-api/authentication.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.
