Customizing notifications using the API
About this task
Application developers can use the API operations to customize notifications.
You can maintain different content for each template, delivery-method, and locale combination. When sending a notification, the system uses the language closest to the user’s locale, as configured on the user resource. Although adding multiple contents per template and delivery-method (distinguished by locale) is not currently supported in the PingOne admin console, you can add it through the API and then view and edit using the UI.
Steps
-
Use the access token generated through the worker app and the following
POST
operation:POST https://api.pingone.com/v1/environments/{{envId}}/templates/{{templateName}}/contents
The
templateName
can bedevice_pairing
,strong_authentication
, ortransaction
.Example:
POST https://api.pingone.com/v1/environments/{{envId}}/templates/{{templateName}}/contents { "locale":"fr", "subject":"OTP pour ${user.username}", "body":"${user.username}, votre OTP: ${otp}", "deliveryMethod":"Email" }
For details, see POST: CREATE Email Content and POST: CREATE Text Message Content in the API reference.