# Authentication

Abyssale uses **API Key Authentication**: Your API key is passed along with every API call, allowing Abyssale to identify your company account and access your data.

## How to get an API Key?

{% hint style="warning" %}
Access to the API key requires at least an **Admin** role.
{% endhint %}

1. Go to [app.abyssale.com](https://app.abyssale.com/) & log in
2. Click `Workspace settings` on the left menu
3. Click `API Key` on the left menu
4. Click the green `Create new API key` button.
5. Once done, your API key will be available *(with a small delay of 30seconds)* & you can copy it *(by clicking on the copy icon button on the right part)*.

<figure><img src="/files/CdlgpUFT40VjXcSGkDMY" alt=""><figcaption><p>Workspace settings</p></figcaption></figure>

<figure><img src="/files/xSJi3gv5JT0xY6CtaG8r" alt=""><figcaption><p>Create new API key</p></figcaption></figure>

**All of your Abyssale requests must contain a `x-api-key` header with your API Key**

## How to test your authentication?

Just call the `GET /ready` route with the header mentioned below, as follows:

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

```
curl -i -H "x-api-key: {YOUR-API-KEY}" https://api.abyssale.com/ready # HTTP/2 200
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const axios = require('axios');

axios.get("https://api.abyssale.com/ready", {headers: {"x-api-key": "{YOUR-API-KEY}"}}).then(response => {
    console.log(response.status) // 200
})
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

r = requests.get("https://api.abyssale.com/ready", headers={"x-api-key": "{YOUR-API-KEY}"}, timeout=30)
r.status_code # 200
```

{% endtab %}
{% endtabs %}

If the status code received is a **200**, everything is OK.


---

# 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.abyssale.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.
