# Tokens

## Get Tokens

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/tokens`

This endpoint allows you to get your API tokens.

#### Headers

| Name          | Type   | Description             |
| ------------- | ------ | ----------------------- |
| Authorization | string | Your main bearer token. |

{% tabs %}
{% tab title="200 API tokens successfully retrieved." %}

```
{
    "data": [
        {
            "expires": 1654870020,
            "scopes": [
                "api"
            ],
            "createdAt": 1623334020,
            "referenceId": "20c96eaf-4e40-44ae-b697-650e0ae64d5e"
        }
    ]
}
```

{% endtab %}

{% tab title="404 Could not find any tokens." %}

```
{
    "data": []
}
```

{% endtab %}
{% endtabs %}

## Create Token

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/tokens`

Create API tokens for your account. Make a note of the token that is returned since you cannot access this again. \
\
**Currently you can only create tokens within the Vaultoro dashboard.**

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Your main bearer token |

#### Request Body

| Name    | Type   | Description                                               |
| ------- | ------ | --------------------------------------------------------- |
| expires | number | The unix epoch time at which the token expires.           |
| scope   | string | The scope in which the token works in, 'read' or 'write'. |
| captcha | string | The value of the captcha on the Vaultoro dashboard.       |

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

```
{
    "data": {
        "expires": 1595535601,
        "referenceId": "fe22dc78-f266-4584-9071-95bbffd08429",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
    }
}
```

{% endtab %}
{% endtabs %}

## Delete Token

<mark style="color:red;">`DELETE`</mark> `https://api.vaultoro.com/v1/tokens/:referenceId`

Delete any of your API tokens.

#### Path Parameters

| Name        | Type   | Description                                     |
| ----------- | ------ | ----------------------------------------------- |
| referenceId | string | The referenceId of the token you want to delete |

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Your main bearer token |

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

```
{"data":{"success":true}}
```

{% 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://api-docs.vaultoro.com/tokens.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.
