Retrieve Notification Settings
Retrieves the current notification settings of the platform.
HTTP Request
GET/api/settings/notifications
Authorization
Authorization
- Required: Yes
- Permission: Staff or Admin
- Authentication: Token authentication
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Retrieve notification settings
4response = requests.get('http://www.example.com/api/settings/notifications',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())1# Retrieve notification settings
2curl "http://www.example.com/api/settings/notifications" -H "Authorization: Token <your_api_key>"Status Codes
| Code | Description |
|---|---|
| 200 | Request logs retrieved successfully |
| 400 | Bad request — invalid query parameters |
| 401 | Unauthorized — authentication required |
| 403 | Forbidden — insufficient permissions |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| notifications_sms_notifier | Integer | ID of the SMS notifier to use (nullable) - `PATCH` request body must include this field |
| notifications_sms_notifier_data | Object | SMS notifier details with `id` and `name` fields - `GET` request will return this field |
| notifications_email_notifier | Integer | ID of the email notifier to use (nullable) - `PATCH` request body must include this field |
| notifications_email_notifier_data | Object | Email notifier details with `id` and `name` fields - `GET` request will return this field |
| notifications_otp_code_len | Integer | Length of OTP codes (default: 5) |
| notifications_otp_ttl | Integer | OTP code time-to-live in seconds (default: 120) |
Notifier Data Object Structure
Both notifications_sms_notifier_data and notifications_email_notifier_data contain:
| Field | Type | Description |
|---|---|---|
| id | Integer | Notifier ID |
| name | String | Notifier display name |