Skip to content

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

NameInTypeRequiredDescription
unreadquerybooleanno
beforequeryintegerno
limitqueryintegerno

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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

FieldTypeRequiredDescription
idsinteger[]noDefault: [].
allbooleannoDefault: false.
json
{
  "ids": [],
  "all": false
}

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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
FieldTypeDescription
enabledboolean
rulesTheftRule[]
ignorestring[]
json
{
  "enabled": false,
  "rules": [],
  "ignore": []
}

Errors: 401 Unauthorized

bash
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

FieldTypeRequiredDescription
enabledbooleannoDefault: false.
rulesTheftRule[]noDefault: [].
ignorestring[]noDefault: [].
json
{
  "enabled": false,
  "rules": [],
  "ignore": []
}

Response 200 Successful Response · TheftSettings

Response fields
FieldTypeDescription
enabledboolean
rulesTheftRule[]
ignorestring[]
json
{
  "enabled": false,
  "rules": [],
  "ignore": []
}

Errors: 401 Unauthorized

bash
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

NameInTypeRequiredDescription
msg_idpathintegeryes

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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

bash
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

NameInTypeRequiredDescription
threadpathstringyes
afterqueryintegerno

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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

NameInTypeRequiredDescription
threadpathstringyes

Request body application/json · MessageIn

FieldTypeRequiredDescription
textstringyes
json
{
  "text": "string"
}

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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

NameInTypeRequiredDescription
threadpathstringyes

Request body multipart/form-data · Body_send_media_api_messages__thread__media_post

FieldTypeRequiredDescription
filestringyes
textstringno

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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

NameInTypeRequiredDescription
threadpathstringyes
msg_idpathintegeryes

Request body application/json · MessageEdit

FieldTypeRequiredDescription
textstringyes
json
{
  "text": "string"
}

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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

NameInTypeRequiredDescription
threadpathstringyes
msg_idpathintegeryes

Response 200 Successful Response

Errors: 401 Unauthorized

bash
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

bash
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

NameInTypeRequiredDescription
usernamepathstringyes

Request body application/json · WarningIn

FieldTypeRequiredDescription
textstringno
json
{
  "text": ""
}

Response 200 Successful Response

Errors: 401 Unauthorized

bash
curl -X PUT 'https://YOUR-PANEL/api/user/<username>/warning' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"text": ""}'

Alexen v2.3.14 · 204 API endpoints