Create Push Content

POST {{apiPath}}/environments/{{envID}}/templates/{{templateName}}/contents

The POST /environments/{{envID}}/templates/{{templateName}}/contents operation can be used to create a new customized push content resource associated with the template specified in the request URL.

Note that the email's body should weigh no more than 100 KB, the subject should contain no more than 256 characters and the variables restrictions should apply. Additionally, noreply@pingidentity.com is used as 'From' by default.

Important: Before you create or update a custom content, you should always do a GET Read One Template on the notification template to determine its supported variables.

Prerequisites

PropertyTypeRequired?
bodyStringRequired
deliveryMethodStringRequired
localeStringRequired
titleStringOptional
variantStringOptional

See the Notifications templates property data models for full property descriptions.

Request Body

{"locale"=>"en", "title"=>"Test", "variant"=>"variant_C", "body"=>" Your OTP is ${otp}", "deliveryMethod"=>"Push", "pushCategory"=>"APPROVE_AND_OPEN_APP"}

RESPONSES

status: Created

{"_links":{"self":{"href":"https://api.pingone.eu/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/templates/transaction/contents/92738bfa-9a86-438e-97fd-4a90eeca99ce"},"template":{"href":"https://api.pingone.eu/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/templates/transaction"},"environment":{"href":"https://api.pingone.eu/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"id":"92738bfa-9a86-438e-97fd-4a90eeca99ce","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"createdAt":"2022-08-25T14:07:39.425Z","updatedAt":"2022-08-25T14:07:39.425Z","locale":"en","variant":"variant_C","template":{"id":"transaction"},"title":"Test","body":" Your OTP is ${otp}","pushCategory":"APPROVE_AND_OPEN_APP","deliveryMethod":"Push","default":false}