# Getting started

## Getting an API token

To interact with the API, you need to request a generate an authentication token. To do this, make a POST request to the [Authenticate](/api/authenticate.md#authenticate) endpoint with your username and password in the request body.

{% hint style="info" %}
**Note** that API tokens are only valid for 24 hours after time of generation.
{% endhint %}

## Using the API token

The token generated in [#getting-an-api-token](#getting-an-api-token "mention") can then be sent in the `api-token` header of a request to a protected endpoint such as [Users](/api/users.md#user).


---

# 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.manymiles.app/getting-started.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.
