# API Docs

## Get status information

<mark style="color:blue;">`GET`</mark> `http://localhost:3000/`

Get status information about the availability of the bot. Can be used to monitor uptime.

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

```
{
    "message": "WekanChatBot up and running",
    "success": true
}
```

{% endtab %}
{% endtabs %}

### Wekan

[Wekan Webhook Data](https://github.com/wekan/wekan/wiki/Webhook-data) documentation for further information.

## Recieve webhook

<mark style="color:green;">`POST`</mark> `http://localhost:3000/wekan`

This path is used as outgoing webhook in wekan. Depending on settings chat users are notified. See wekan webhook data documentation (see above).

#### Headers

| Name          | Type   | Description                                               |
| ------------- | ------ | --------------------------------------------------------- |
| x-wekan-token | string | The token provided by wekan while setting up the webhook. |

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

```
```

{% endtab %}

{% tab title="403 The provided token was invalid or undefined." %}

```
{
  "message": "Invalid or non existent token",
  "success": false
}
```

{% endtab %}
{% endtabs %}

### Synology Chat

## Incoming URL for messages sent to the bot

<mark style="color:green;">`POST`</mark> `http://localhost:3000/synology/bot`

URL used for Synology Outgoing Bot URL

#### Request Body

| Name  | Type   | Description                  |
| ----- | ------ | ---------------------------- |
| text  | string | The text sent by the user.   |
| token | string | The synology chat bot token. |

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

```
```

{% endtab %}
{% endtabs %}
