> ## Documentation Index
> Fetch the complete documentation index at: https://enzohealth-12c99f25.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

Some API endpoints are protected, and therefore require that you authenticate using an API token.

## Generating a Token via POST Request

To generate a token programmatically, use the following POST request:

```sh theme={null}
curl -v -X POST 'https://app.enzo.health/api/auth/rest' \
-H 'Content-Type: application/json' \
-d '{"email":"your@email.com", "password":"YOUR_PASSWORD", "fcmToken":"FIREBASE_TOKEN", "appVersion":"0.0.1", "deviceType":"IOS"}'
```

The request body accepts the following parameters:

* `email` (required): Your email address
* `password` (required): Your password
* `fcmToken` (optional): Firebase Cloud Messaging token
* `appVersion` (optional): Current version of the app
* `deviceType` (optional): Device type, valid options are "IOS", "ANDROID", "WEB"

## Use your token

You can authenticate by adding an `Authorization` header to all your HTTP calls. The Authorization header is formatted as such: `Authorization: <token>` (replace `<token>` with your token previously generated).

Example:

```sh theme={null}
curl -L -X GET 'https://app.enzo.health/api/workflows/:workflowId/results' \
-H 'Accept: application/json' \
-H 'Authorization: yourToken'
```
