Update A SMS Notifier Pattern
Update a sms notifier pattern
HTTP Request
PATCH/api/notifications/notifiers/sms/:sms_notifier_id/patterns/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff with SMSPatternPermission or Admin
- Permission Code: 2823
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sms_notifier_id | Integer | Yes | Unique ID of the sms notifier |
| id | Integer | Yes | Unique ID of the sms notifier pattern |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| status | String | No | Status of the sms pattern (choices: `created`, `pending`, `approved`, `rejected`) |
| name | String | No | Name of the sms notifier pattern |
| code | String | No | Code of the sms notifier pattern |
| description | String | No | Extra description about the sms notifier pattern |
| body | String | No | Text body of the sms notifier pattern with possible required placeholders |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Updates sms notifier pattern
4response = requests.post('http://www.example.com/api/notifications/notifiers/sms/1/patterns/9',
5 json={
6 "status": "rejected",
7 "name": "otp-code",
8 "code": "187566",
9 "description": "used for sending otp codes",
10 "body": "Your login otp code is {0}"
11 },
12 headers={'Authorization': 'Token <your_api_key>'}
13)
14print(response.json())1# Updates sms notifier pattern
2curl -X POST "http://www.example.com/api/notifications/notifiers/sms/1/patterns/7" \
3-H "Authorization: Token <your_api_key>" \
4-H "Content-Type: application/json" \
5-d '{
6 "status": "rejected",
7 "name": "otp-code",
8 "code": "187566",
9 "description": "used for sending otp codes",
10 "body": "Your login otp code is {0}"
11}'Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the sms pattern. |
| status | String | Status of the sms pattern (choices: `created`, `pending`, `approved`, `rejected`) |
| name | String | Name of the sms pattern (unique over the specific notifier) |
| code | String | Code of the sms pattern |
| description | String | Extra descriptions about the sms pattern (nullable) |
| body | String | Text body of the sms pattern |
| created_at | String (ISO 8601) | Timestamp when the sms pattern was created. |
| updated_at | String (ISO 8601) | Timestamp when the sms pattern] was last updated. |
Response Example
{
"id": 3,
"status": "approved",
"name": "otp-code-edited",
"code": "18756",
"description": "used for sending otp codes",
"body": "Your login otp code is {0}",
"created_at": "2025-12-28T16:42:35.264559Z",
"updated_at": "2025-12-28T16:51:01.399924Z"
}