Get notifications
/user/notificationsGet and read all user notifications.
This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -notifications.read
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.
You can also find a list of permissions in our documentation.
Query method
GEThttps://api.stableproxy.com/v2/user/notifications
Query parameters
| Identifier | Regulations | Example |
|---|---|---|
| mark-as-readNot necessarily | nullableex-boolean | false |
| searchNot necessarily | nullablestring | 191 |
| per-pageNot necessarily | nullableinteger | 13 |
| pageNot necessarily | nullableinteger | 17 |
| sort-byNot necessarily | nullablestringapp\_validators\_ex_in_rule | "" |
| sort-orderNot necessarily | nullablestringin:asc, desc | "asc" |
Code examples
1const baseUrl = "https://api.stableproxy.com/v2";2const response = await fetch(baseUrl + "/user/notifications", {3 method: "GET",4 headers: {5 "Authorization": "API-Token [YOUR TOKEN]",6 "Content-Type": "application/json"7 }8});9const data = await response.json();Examples of answers
Success response200application/json
{
"data": {
"current_page": 1,
"data": [
{
"id": "68389bca-8817-4612-99d3-443f8106f989",
"data": {
"title": "Допис від підтримки",
"message": "Hi there! How can I assist you today?",
"action": {
"title": "Відкрити",
"url": "http://localhost:3000/support/4ygkv920vq"
},
"allowed_targets": [
"database",
"telegram",
"mail",
"push"
],
"type": "general",
"attachments": [],
"created_at": "2024-11-12 10:46:35",
"updated_at": "2024-11-12 10:46:35",
"notifiable_id": 1,
"notifiable_type": "App\\Models\\User"
},
"read_at": "2024-11-12T08:49:53.000000Z",
"created_at": "2024-11-12T08:46:35.000000Z",
"updated_at": "2024-11-12T08:49:53.000000Z",
"user_id": 1
}
],
"first_page_url": "http://api.stableproxy.com/v2/user/notifications?page=1",
"from": 1,
"last_page": 106,
"last_page_url": "http://api.stableproxy.com/v2/user/notifications?page=106",
"next_page_url": "http://api.stableproxy.com/v2/user/notifications?page=2",
"path": "http://api.stableproxy.com/v2/user/notifications",
"per_page": 20,
"prev_page_url": null,
"to": 20,
"total": 2108
},
"good": true,
"timestamp": 1731401393,
"cause": {
"type": "user",
"user_id": 1,
"token_id": 302,
"token_sign": "8491affc7321d0925064c90eeeee53d2"
}
}