v1
latestOpenAPI 3.0.12026-07-2412598.8 KBTemplate
Create Templates
Create Template API lets you create App Push Notification(APN) templates with support for personalized text, rich media(images), and custom key-value pairs. It allows you to define platform-specific content for Android or iOS, set landing actions, and use dynamic placeholders based on user attributes or event data. This API helps streamline the setup of resuable, targeted APN templates.
post/client/template/create
Headers
api-keystring required
Api key for authentication. You must have unique & valid api-key
Content-Typestring required
Specifies the request content type. Must be application/json.
Request body
Example request
{
"data": {
"templates": [
{
"channel_name": "apn",
"custom": {
"os": "android",
"Personalisation": {
"{{Key_Name}}": {
"entity": "attribute",
"attribute_name": "FIRST_NAME",
"category": "user_activity",
"event_name": "Add To Cart",
"payload_param": "price",
"default_value": "10.0"
}
}
},
"content": {
"landing_page_type": "app_homepage",
"landing_page_url": "https://www.example.com/promo?user_id={{user_id}}",
"enable_apn_interactions": true,
"apn_interactions": [
{
"os_type": "ios",
"rich_media": [
{
"media_type": "image",
"media_url": "https://static{user}.remove.bg/sample-gallery/graphics/bird-thumbnail.jpg"
}
]
}
],
"custom_key_values": [
{
"key": "key1",
"value": "value1",
"ostype": "all"
}
]
}
}
]
}
}Response
Example response
{
"request_id": "0195d729-f98e-7723-a8f2-24bad28ea425"
}