Notifications
Alerts, webhooks and message templates.
13 endpoints
GET /api/alerts
List Alerts
List the signed-in admin's alerts (new users, expiring users, node problems and similar).
Any admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
unread | query | boolean | no | |
before | query | integer | no | |
limit | query | integer | no |
Response 200 Successful Response
Errors: 401 Unauthorized
curl -X GET 'https://YOUR-PANEL/api/alerts' \
-H 'Authorization: Bearer $TOKEN'POST /api/alerts/read
Read Alerts
Mark alerts as read.
Any admin
Request body application/json · ReadBody
| Field | Type | Required | Description |
|---|---|---|---|
ids | integer[] | no | Default: []. |
all | boolean | no | Default: false. |
{
"ids": [],
"all": false
}Response 200 Successful Response
Errors: 401 Unauthorized
curl -X POST 'https://YOUR-PANEL/api/alerts/read' \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"ids": [], "all": false}'GET /api/anti-theft
Read Anti Theft
Read the anti-theft (subscription sharing) detector settings.
Sudo admin only
Response 200 Successful Response · TheftSettings
Response fields
| Field | Type | Description |
|---|---|---|
enabled | boolean | |
rules | TheftRule[] | |
ignore | string[] |
{
"enabled": false,
"rules": [],
"ignore": []
}Errors: 401 Unauthorized
curl -X GET 'https://YOUR-PANEL/api/anti-theft' \
-H 'Authorization: Bearer $TOKEN'PUT /api/anti-theft
Update Anti Theft
Change the anti-theft detector settings.
Sudo admin only
Request body application/json · TheftSettings
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | no | Default: false. |
rules | TheftRule[] | no | Default: []. |
ignore | string[] | no | Default: []. |
{
"enabled": false,
"rules": [],
"ignore": []
}Response 200 Successful Response · TheftSettings
Response fields
| Field | Type | Description |
|---|---|---|
enabled | boolean | |
rules | TheftRule[] | |
ignore | string[] |
{
"enabled": false,
"rules": [],
"ignore": []
}Errors: 401 Unauthorized
curl -X PUT 'https://YOUR-PANEL/api/anti-theft' \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"enabled": false, "rules": [], "ignore": []}'GET /api/messages/media/{msg_id}
Get Media
stream a message attachment (access checked against the message's thread)
Any admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
msg_id | path | integer | yes |
Response 200 Successful Response
Errors: 401 Unauthorized
curl -X GET 'https://YOUR-PANEL/api/messages/media/<msg_id>' \
-H 'Authorization: Bearer $TOKEN'GET /api/messages/threads
Message Threads
sudo: one thread per admin; an admin: its own thread with the sudo admins
Any admin
Response 200 Successful Response
Errors: 401 Unauthorized
curl -X GET 'https://YOUR-PANEL/api/messages/threads' \
-H 'Authorization: Bearer $TOKEN'GET /api/messages/{thread}
Read Messages
Read the messages of a thread between an admin and the sudo admins. after returns only newer messages.
Any admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
thread | path | string | yes | |
after | query | integer | no |
Response 200 Successful Response
Errors: 401 Unauthorized
curl -X GET 'https://YOUR-PANEL/api/messages/<thread>' \
-H 'Authorization: Bearer $TOKEN'POST /api/messages/{thread}
Send Message
Send a message in a thread.
Any admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
thread | path | string | yes |
Request body application/json · MessageIn
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes |
{
"text": "string"
}Response 200 Successful Response
Errors: 401 Unauthorized
curl -X POST 'https://YOUR-PANEL/api/messages/<thread>' \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"text": "string"}'POST /api/messages/{thread}/media
Send Media
attach an image/audio/video (optionally with a caption)
Any admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
thread | path | string | yes |
Request body multipart/form-data · Body_send_media_api_messages__thread__media_post
| Field | Type | Required | Description |
|---|---|---|---|
file | string | yes | |
text | string | no |
Response 200 Successful Response
Errors: 401 Unauthorized
curl -X POST 'https://YOUR-PANEL/api/messages/<thread>/media' \
-H 'Authorization: Bearer $TOKEN'PUT /api/messages/{thread}/{msg_id}
Edit Message
edit the text of your own message
Any admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
thread | path | string | yes | |
msg_id | path | integer | yes |
Request body application/json · MessageEdit
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes |
{
"text": "string"
}Response 200 Successful Response
Errors: 401 Unauthorized
curl -X PUT 'https://YOUR-PANEL/api/messages/<thread>/<msg_id>' \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"text": "string"}'DELETE /api/messages/{thread}/{msg_id}
Delete Message
delete your own message (and its attachment, if any)
Any admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
thread | path | string | yes | |
msg_id | path | integer | yes |
Response 200 Successful Response
Errors: 401 Unauthorized
curl -X DELETE 'https://YOUR-PANEL/api/messages/<thread>/<msg_id>' \
-H 'Authorization: Bearer $TOKEN'GET /api/notify/counts
Notify Counts
Unread alert and message counters for the menu badges.
Any admin
Response 200 Successful Response
Errors: 401 Unauthorized
curl -X GET 'https://YOUR-PANEL/api/notify/counts' \
-H 'Authorization: Bearer $TOKEN'PUT /api/user/{username}/warning
Set User Warning
Set or clear a warning text shown to a user in their subscription page.
Sudo admin only
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
username | path | string | yes |
Request body application/json · WarningIn
| Field | Type | Required | Description |
|---|---|---|---|
text | string | no |
{
"text": ""
}Response 200 Successful Response
Errors: 401 Unauthorized
curl -X PUT 'https://YOUR-PANEL/api/user/<username>/warning' \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"text": ""}'