Skip to main content

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

FieldTypeRequiredDescription
nameStringYesName of the sms notifier
backendStringYesBackend name of the sms notifier (choices: `ippanel`, `melipayamak`)
settingsJsonFieldNoExtra 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 token with a string value
  • It may contain a key named number with a string value of more than 4 digits

Ippanel

  • It should contain a key named token with a string value
  • It should contain a key named from_number with a string value of an iraninan mobile number starting with +98

Example Requests

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())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the sms notifier.
nameStringName of the sms notifier
backendStringName of the sms notifier backend
settingsJsonFieldJson key-value settings required for each notifier
created_atString (ISO 8601)Timestamp when the sms notifier was created.
updated_atString (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
  • settings field if provided should contain valid keys required by the backend providers