> For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt.

# Alerts

Email and Telegram messages when a proxy or node needs you: proxy offline / back online, node offline / back online,
failed IP rotation, SIM recharge due, SMS send limit reached, bandwidth 80% used / limit reached.
Each login has its own settings (the panel page is **Account → Alerts**). Dongle alerts go to the account owner and
to the reseller sub-user the proxy is assigned to; node and SIM-recharge alerts go to the owner only.
The same alert for the same proxy is sent at most once per 15 minutes (online/offline), 6 hours (limits) or once a
day (SIM recharge).

All times in the API are UTC (ISO 8601). Your `timezone` only changes how the panel and the alert texts show times,
and when SIM reminders go out (about 09:00 your time).

## Get alert settings


`GET /alerts/settings`

**Ability:** `read`



**curl**

```bash
curl 'https://proxykite.com/api/v1/alerts/settings' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json'
```


**Python**

```python
import os
import requests

r = requests.get(
    "https://proxykite.com/api/v1/alerts/settings",
    headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
    timeout=30,
)
print(r.status_code, r.json())
```


**Node.js**

```js
const res = await fetch('https://proxykite.com/api/v1/alerts/settings', {
  headers: {
    Authorization: `Bearer ${process.env.HYP_TOKEN}`,
    Accept: 'application/json',
  },
  signal: AbortSignal.timeout(30000),
});
console.log(res.status, await res.json());
```


**PHP**

```php
<?php
$ch = curl_init('https://proxykite.com/api/v1/alerts/settings');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('HYP_TOKEN'),
        'Accept: application/json',
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
var_dump($status, json_decode($body, true));
```



**Response `200`**

```json
{"data": {
  "timezone": "Asia/Kolkata",
  "email": {"enabled": true, "address": "ops@example.com", "verified": false, "sending_to": "you@example.com"},
  "telegram": {"available": true, "enabled": true, "chat_id": "123456789"},
  "events": {"dongle_offline": true, "dongle_online": true, "dongle_stalled": true, "dongle_no_internet": true, "node_offline": true, "node_online": true,
             "rotation_failed": false, "recharge_due": true, "sms_limit_reached": true,
             "bandwidth_warning": true, "bandwidth_limit_reached": true,
             "uplink_backup": true, "uplink_primary": true, "uplink_none": true},
  "offline_after_minutes": 5
}}
```

- `email.address`: where you asked alerts to go; `sending_to`: where they go **now** (your login email until a new
  address is confirmed with the link we mail to it).
- `telegram.available`: `false` while the panel has no Telegram bot configured.

## Change alert settings


`PATCH /alerts/settings`

**Ability:** `manage` · Send only what you change. Answers with the full settings object (as above).

| Field                   |                                                                                                               |
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| `timezone`              | IANA name, e.g. `Europe/London`                                                                               |
| `email.enabled`         | bool                                                                                                          |
| `email.address`         | email, or `null` / `""` = your login email. A new address gets a confirmation link and is used once confirmed |
| `telegram.enabled`      | bool (needs a `chat_id`)                                                                                      |
| `telegram.chat_id`      | your chat id (digits; groups start with `-100`) or `@channelname`; `null` clears it                           |
| `events`                | object of event type → bool; types not sent keep their value                                                  |
| `offline_after_minutes` | 1–1440: how long a proxy/node must be offline before the alert                                                |



**curl**

```bash
curl -X PATCH 'https://proxykite.com/api/v1/alerts/settings' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"telegram":{"enabled":true,"chat_id":"123456789"},"events":{"rotation_failed":false}}'
```


**Python**

```python
import os
import requests

r = requests.patch(
    "https://proxykite.com/api/v1/alerts/settings",
    headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
    json={"telegram": {"enabled": True, "chat_id": "123456789"}, "events": {"rotation_failed": False}},
    timeout=30,
)
print(r.status_code, r.json())
```


**Node.js**

```js
const res = await fetch('https://proxykite.com/api/v1/alerts/settings', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.HYP_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"telegram":{"enabled":true,"chat_id":"123456789"},"events":{"rotation_failed":false}}),
  signal: AbortSignal.timeout(30000),
});
console.log(res.status, await res.json());
```


**PHP**

```php
<?php
$ch = curl_init('https://proxykite.com/api/v1/alerts/settings');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('HYP_TOKEN'),
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"telegram":{"enabled":true,"chat_id":"123456789"},"events":{"rotation_failed":false}}',
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
var_dump($status, json_decode($body, true));
```



**Finding your Telegram chat id:** open a chat with our bot and send `/start` (the bot replies with your id when the
panel's bot webhook is on; otherwise message `@userinfobot`, which replies with your id). You must `/start` our bot
once or it is not allowed to write to you. For a group, add the bot to the group and use the group's id.

## Alert history


`GET /alerts`

**Ability:** `read` · Your last alerts, newest first (kept 90 days).

| Query   |                   |
| ------- | ----------------- |
| `limit` | 1–100, default 50 |



**curl**

```bash
curl 'https://proxykite.com/api/v1/alerts?limit=20' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json'
```


**Python**

```python
import os
import requests

r = requests.get(
    "https://proxykite.com/api/v1/alerts?limit=20",
    headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
    timeout=30,
)
print(r.status_code, r.json())
```


**Node.js**

```js
const res = await fetch('https://proxykite.com/api/v1/alerts?limit=20', {
  headers: {
    Authorization: `Bearer ${process.env.HYP_TOKEN}`,
    Accept: 'application/json',
  },
  signal: AbortSignal.timeout(30000),
});
console.log(res.status, await res.json());
```


**PHP**

```php
<?php
$ch = curl_init('https://proxykite.com/api/v1/alerts?limit=20');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('HYP_TOKEN'),
        'Accept: application/json',
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
var_dump($status, json_decode($body, true));
```



**Response `200`**

```json
{"data": [
  {"id": 812, "type": "recharge_due", "title": "SIM recharge due in 3 days, Shop A",
   "body": "Shop A (port 30000, node rack-1): next recharge date Tue 13 Oct 2026.\n…",
   "status": "sent", "channels": {"email": "sent", "telegram": "sent"},
   "proxy_id": 7, "node_id": 1, "created_at": "2026-10-10T03:31:02+00:00", "sent_at": "2026-10-10T03:31:04+00:00"}
]}
```

`status`: `queued`, `sent`, `partial` (one channel failed), `failed`, or `no_channel` (every channel is switched off,
logged only). `type` is one of the event types above, or `test`.

## Related

- SIM number and recharge date of a proxy: `sim` in [Proxies](https://proxykite.com/docs/api/proxies.md#sim-card-and-recharge-date).
- [Webhooks](https://proxykite.com/docs/guide/webhooks.md): the machine-to-machine way to react to the same changes.
