- Docs
- Api%2Freference%2Fnotifications%2FUpdateNotificationTemplate
Update a message template
Edit a template. Send only the fields you want to change. A new subject or body is checked before it is saved, so a mistake is caught here rather than on every email that follows. The change applies to what you send from now on; messages already sent keep the wording they went out with. Allow up to a minute for the new wording to be picked up everywhere. Requires the `notifications.templates.update` permission.
The access token returned after a successful sign-in, sent as
Authorization: Bearer <access_token>.
It identifies the person and the organization they are working in, and
it lasts about fifteen minutes. When it runs out, use their refresh
token at POST /auth/refresh-token instead of asking them to sign in
again.
In: header
Path Parameters
Identifier of the template.
Request Body
application/json
The fields to change.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.dual.network/messages/templates/665f1c2d4b1a2c3d4e5f6ad0" \ -H "Content-Type: application/json" \ -d '{ "content": "<p>Hello {{.first_name}}, your ticket {{.ticket}} is ready.</p>", "content_type": "html" }'{}{
"code": 3,
"message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}{
"code": 16,
"message": "no auth provided"
}{
"code": 7,
"message": "forbidden"
}{
"code": 5,
"message": "object not found"
}{
"code": 8,
"message": "too many requests"
}{
"code": 13,
"message": "internal error"
}