Create SMS Notifier
Creates a new sms notifier
HTTP Request
POST/api/notifications/notifiers/sms
Authorization
Authorization
- Required: Yes
- Permission: Staff with SMSNotifierPermission or Admin
- Permission Code: 2811
- Authentication: Token-based (Authorization: Token <your_api_key>)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | Name of the sms notifier |
| backend | String | Yes | Backend name of the sms notifier (choices: `ippanel`, `melipayamak`) |
| settings | JsonField | No | Extra settings required for the sms notifier (default: empty dict) |
Setting Validation
The settings field if provided should match the following rules:
MeliPayamak
- It should contain a key named
tokenwith a string value - It may contain a key named
numberwith a string value of more than 4 digits
Ippanel
- It should contain a key named
tokenwith a string value - It should contain a key named
from_numberwith a string value of an iraninan mobile number starting with+98
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Create a new sms notifier
4response = requests.post('http://www.example.com/api/notifications/notifiers/sms',
5 json={
6 'name': 'melipayamak_general',
7 'backend': 'melipayamak',
8 },
9 headers={'Authorization': 'Token <your_api_key>'}
10)
11print(response.json())1# Create a new sms notifier
2curl -X POST "http://www.example.com/api/notifications/notifiers/sms" \
3-H "Authorization: Token <your_api_key>" \
4-H "Content-Type: application/json" \
5-d '{
6 "name": "ippanel_one",
7 "backend": "ippanel",
8}'Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the sms notifier. |
| name | String | Name of the sms notifier |
| backend | String | Name of the sms notifier backend |
| settings | JsonField | Json key-value settings required for each notifier |
| created_at | String (ISO 8601) | Timestamp when the sms notifier was created. |
| updated_at | String (ISO 8601) | Timestamp when the sms notifier was last updated. |
Example Response
{
"id": 4,
"name": "melipayamak_general",
"backend": "melipayamak",
"settings": {
"token": "value1",
"key2": "value2"
},
"created_at": "2025-12-28T15:36:45.235667Z",
"updated_at": "2025-12-28T15:36:45.235676Z"
}
NOTES
- Backend should be from the valid choices:
melipayamak,ippanel settingsfield if provided should contain valid keys required by the backend providers