Skip to main content

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

ParameterTypeRequiredDescription
sms_notifier_idIntegerYesUnique ID of the sms notifier
idIntegerYesUnique ID of the sms notifier pattern

Request Body

FieldTypeRequiredDescription
statusStringNoStatus of the sms pattern (choices: `created`, `pending`, `approved`, `rejected`)
nameStringNoName of the sms notifier pattern
codeStringNoCode of the sms notifier pattern
descriptionStringNoExtra description about the sms notifier pattern
bodyStringNoText body of the sms notifier pattern with possible required placeholders

Example Requests

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

Response Fields

FieldTypeDescription
idIntegerUnique ID of the sms pattern.
statusStringStatus of the sms pattern (choices: `created`, `pending`, `approved`, `rejected`)
nameStringName of the sms pattern (unique over the specific notifier)
codeStringCode of the sms pattern
descriptionStringExtra descriptions about the sms pattern (nullable)
bodyStringText body of the sms pattern
created_atString (ISO 8601)Timestamp when the sms pattern was created.
updated_atString (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"
}