> For the complete documentation index, see [llms.txt](https://inuva.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://inuva.gitbook.io/home/developers/api.md).

# API

Inuva is not meant to be ran 24/7. It will sleep when it detects 30 minutes of inactivity. For automation this is a dealbreaker so that's why there's an API.

{% hint style="info" %}
For this to work you probably want an `API key`. You can request an API key by sending an email to <laurens@inuva.me> or sending a message in [Discord ](https://discord.gg/A3PBghf5d9)(there will be a user interface for this in the future)
{% endhint %}

### Boot

This wakes the instance up from sleep or boots it when it's in a shut down state.

```bash
curl -H 'Authorization: Bearer <api_key>' -X POST https://inuva.me/api/instance/boot
```

This will return the following

* <mark style="background-color:red;">422: User does not have an instance</mark>
* <mark style="background-color:red;">401: Unauthenticated</mark>
* <mark style="background-color:green;">202: Accepted</mark>

### Reset

This ***tries*** to reset the machine when it's stuck in a bad state. After the reset it will reboot the instance.

```bash
curl -H 'Authorization: Bearer <api_key>' -X POST https://inuva.me/api/instance/reset
```

This will return the following

* <mark style="background-color:red;">422: User does not have an instance</mark>
* <mark style="background-color:red;">401: Unauthenticated</mark>
* <mark style="background-color:green;">202: Accepted</mark>

### Shutdown

This shuts the instance down.

{% hint style="warning" %}
Under normal circumstances you do not have to worry about shutting the machine down. It will hibernate automatically after 30 minutes idle.
{% endhint %}

```bash
curl -H 'Authorization: Bearer <api_key>' -X POST https://inuva.me/api/instance/shutdown
```

This will return the following

* <mark style="background-color:red;">422: User does not have an instance</mark>
* <mark style="background-color:red;">401: Unauthenticated</mark>
* <mark style="background-color:green;">202: Accepted</mark>
