openapi: 3.0.0
info:
  title: MoEngage - Custom templates API
  description: >-
    Link to documentation  


    Push -
    [https://developers.moengage.com/hc/en-us/articles/14801954091156-Overview](https://developers.moengage.com/hc/en-us/articles/14801954091156-OverviewSMS)


    SMS -
    [https://developers.moengage.com/hc/en-us/articles/14579504140052-Overview](https://developers.moengage.com/hc/en-us/articles/14579504140052-Overview)
  version: 1.0.0
servers:
  - url: https://api-{{0x}}.moengage.com
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
paths:
  /v1.0/custom-templates/push:
    post:
      tags:
        - General
      summary: Create Custom Push Template API
      description: >-
        The Create Custom Push Template  API can be used to create a custom push
        template in MoEngage. The Basic Notification and Stylized Basic template
        types are supported for this API


        **Base URL**


        | Data Center | Replace {{OX}} with |

        | --- | --- |

        | DATA_CENTER_1 | 01 |

        | DATA_CENTER_2 | 02 |

        | DATA_CENTER_3 | 03 |


        _**Where to find reports settings in the Dashboard?**_


        - Reports settings are available at **\*Settings > Analytic > REPORT
        Settings **\*
            

        _**Where to find App ID and SECRET-KEY in the Dashboard?**_


        - APP ID (DATA API ID) and SECRET KEY(API SECRET) are available at
        _**Settings > APIs > TRANSACTION PUSH/REPORTS SETTINGS**_.
            

        _**few of the failures can be**_


        401 - Invalid APP ID/ SECRET KEY


        400 - Any of the following reasons:


        - Duplicate - template_id and template_version

        - Body is missing for ANDROID.

        - Incorrect App Id

        - title value is invalid.

        - You have already created maximum allowed template allowed for client
            

        API Documentation
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: >-
                "{\n    \"ANDROID\": {\n        \"basic_details\":
                {\n            \"app_name_color_code\":
                \"APP_NAME_COLOR_CODE\",\n           
                \"notification_control_color\": \"Light/Dark\",\n           
                \"background_color_code\": \"BG_COLOR_CODE\",\n           
                \"title\": \"TITLE_OF_ANDROID_TEMPLATE\",\n           
                \"message\": \"MESSAGE_OF_ANDROID_TEMPLATE\",\n           
                \"summary\": \"SUMMARY\",\n            \"image_url\":
                \"IMAGE_URL\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n            \"key_value_pairs\":
                [{\n                \"key\": \"KEY\",\n               
                \"value\": \" VALUE\"\n            }]\n        },\n       
                \"buttons\": [\n            {\n                \"btn_name\":
                \"NAME_OF_THE_BUTTON\",\n                \"click_action_type\":
                \"NAVIGATE_TO_A_SCREEN/DEEPLINKING/RICH_LANDING/CALL/SHARE/COPY/SET_USER_ATTRIBUTE/TRACK_EVENT/CUSTOM_ACTION/SNOOZE/REMIND_LATER\",\n               
                \"click_action_name\":
                \"VALID_CLICK_ACTION_NAME_HERE\",\n               
                \"click_action_value\": \"CLICK_ACTION_URL_HERE\"\n           
                }\n        ],\n        \"advanced\": {\n           
                \"coupon_code\": \"COUPON_CODE\",\n           
                \"icon_type_in_notification\": \"appicon/url\",\n           
                \"large_icon_url\": \"LARGE_ICON_URL_HERE IF
                icon_type_in_notification is url\",\n           
                \"auto_dismiss_notification\": true,\n           
                \"dismissal_time_multiplier\":
                \"days/hours/minutes\",\n            \"dismissal_time_value\":
                1,\n            \"make_notification_sticky\": true,\n           
                \"dismiss_button_text\": \"DISMISS_BUTTON_TEXT_HERE\"\n       
                },\n        \"template_backup\": {\n            \"title\":
                \"TITLE_OF_ANDROID_BACKUP_TEMPLATE\",\n            \"message\":
                \"MESSAGE_OF_ANDROID_BACKUP_TEMPLATE\",\n           
                \"summary\": \"SUMMARY\",\n            \"image_url\":
                \"IMAGE_URL\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n            \"key_value_pairs\":
                [{\n                \"key\": \"KEY\",\n               
                \"value\": \" VALUE\"\n            }]\n        }\n    },\n   
                \"IOS\": {\n        \"basic_details\": {\n           
                \"background_color_code\": \"BG_COLOR_CODE\",\n           
                \"title\": \"TITLE_OF_IOS_TEMPLATE\",\n            \"subtitle\":
                \"SUBTITLE_OF_IOS_TEMPLATE\",\n            \"message\":
                \"MESSAGE_OF_IOS_TEMPLATE\",\n            \"rich_media_value\":
                \"RICH_MEDIA_URL_HERE\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n           
                \"allow_bg_refresh\":true\n        },\n        \"buttons\":
                [\n            {\n                \"button_category\":
                \"CATEGORY_OF_BUTTON\"\n            }\n        ],\n       
                \"advanced\": {\n            \"coupon_code\":
                \"COUPON_CODE\",\n            \"sound_file\":
                \"SOUND_FILE\",\n            \"enable_ios_badge\": true\n       
                },\n        \"template_backup\": {\n            \"title\":
                \"TITLE_OF_IOS_TEMPLATE\",\n            \"subtitle\":
                \"SUBTITLE_OF_IOS_TEMPLATE\",\n            \"message\":
                \"MESSAGE_OF_IOS_TEMPLATE\",\n            \"rich_media_value\":
                \"RICH_MEDIA_URL_HERE\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n           
                \"allow_bg_refresh\":true\n        }\n    },\n    \"meta_info\":
                {\n        \"platform\": [\n           
                \"ANDROID\",\n            \"IOS\"\n        ],\n       
                \"template_style\": \"BASIC/STYLIZED\",\n       
                \"template_id\": 1234567890,\n        \"template_name\":
                \"NAME_OF_THE_TEMPLATE\",\n        \"template_version\":
                \"VERSION_OF_THE_TEMPLATE\",\n        \"created_by\":
                \"USER_CREATED\"\n    }\n}"
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic Base64_ENCODED_APP_ID_APP_SECRET_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - General
      summary: Update Custom Push Template API
      description: >-
        This API can be used to update a push template by specifying its
        external template id. You can specify whether the updated version of the
        template can be used in active campaigns in the request.  


        **Base URL**


        | Data Center | Replace {{OX}} with |

        | --- | --- |

        | DATA_CENTER_1 | 01 |

        | DATA_CENTER_2 | 02 |

        | DATA_CENTER_3 | 03 |


        _**Where to find reports settings in the Dashboard?**_


        - Reports settings are available at _\\Settings > Analytic > REPORT
        Settings **\\_
            

        _**Where to find App ID and SECRET-KEY in the Dashboard?**_


        - APP ID (DATA API ID) and SECRET KEY(API SECRET) are available at
        _**Settings > APIs > TRANSACTION PUSH/REPORTS SETTINGS**_.
            

        _**few of the failures can be**_


        401 - Invalid APP ID/ SECRET KEY


        400 - Any of the following reasons:


        - Duplicate - template_id and template_version

        - Body is missing for ANDROID.

        - Incorrect App Id

        - title value is invalid.

        - You have already created maximum allowed template allowed for client
            

        API Documentation
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: >-
                "{\n    \"external_template_id\":
                \"ID_OF_TEMPLATE_TO_BE_UPDATED\",\n    \"update_campaigns\":
                false,\n    \"ANDROID\": {\n        \"basic_details\":
                {\n            \"app_name_color_code\":
                \"APP_NAME_COLOR_CODE\",\n           
                \"notification_control_color\": \"Light/Dark\",\n           
                \"background_color_code\": \"BG_COLOR_CODE\",\n           
                \"title\": \"TITLE_OF_ANDROID_TEMPLATE\",\n           
                \"message\": \"MESSAGE_OF_ANDROID_TEMPLATE\",\n           
                \"summary\": \"SUMMARY\",\n            \"image_url\":
                \"IMAGE_URL\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n            \"key_value_pairs\":
                [{\n                \"key\": \"KEY\",\n               
                \"value\": \" VALUE\"\n            }]\n        },\n       
                \"buttons\": [\n            {\n                \"btn_name\":
                \"NAME_OF_THE_BUTTON\",\n                \"click_action_type\":
                \"NAVIGATE_TO_A_SCREEN/DEEPLINKING/RICH_LANDING/CALL/SHARE/COPY/SET_USER_ATTRIBUTE/TRACK_EVENT/CUSTOM_ACTION/SNOOZE/REMIND_LATER\",\n               
                \"click_action_name\":
                \"VALID_CLICK_ACTION_NAME_HERE\",\n               
                \"click_action_value\": \"CLICK_ACTION_URL_HERE\"\n           
                }\n        ],\n        \"advanced\": {\n           
                \"coupon_code\": \"COUPON_CODE\",\n           
                \"icon_type_in_notification\": \"appicon/url\",\n           
                \"large_icon_url\": \"LARGE_ICON_URL_HERE IF
                icon_type_in_notification is url\",\n           
                \"auto_dismiss_notification\": true,\n           
                \"dismissal_time_multiplier\":
                \"days/hours/minutes\",\n            \"dismissal_time_value\":
                1,\n            \"make_notification_sticky\": true,\n           
                \"dismiss_button_text\": \"DISMISS_BUTTON_TEXT_HERE\"\n       
                },\n        \"template_backup\": {\n            \"title\":
                \"TITLE_OF_ANDROID_BACKUP_TEMPLATE\",\n            \"message\":
                \"MESSAGE_OF_ANDROID_BACKUP_TEMPLATE\",\n           
                \"summary\": \"SUMMARY\",\n            \"image_url\":
                \"IMAGE_URL\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n            \"key_value_pairs\":
                [{\n                \"key\": \"KEY\",\n               
                \"value\": \" VALUE\"\n            }]\n        }\n    },\n   
                \"IOS\": {\n        \"basic_details\": {\n           
                \"background_color_code\": \"BG_COLOR_CODE\",\n           
                \"title\": \"TITLE_OF_IOS_TEMPLATE\",\n            \"subtitle\":
                \"SUBTITLE_OF_IOS_TEMPLATE\",\n            \"message\":
                \"MESSAGE_OF_IOS_TEMPLATE\",\n            \"rich_media_value\":
                \"RICH_MEDIA_URL_HERE\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n           
                \"allow_bg_refresh\":true\n        },\n        \"buttons\":
                [\n            {\n                \"button_category\":
                \"CATEGORY_OF_BUTTON\"\n            }\n        ],\n       
                \"advanced\": {\n            \"coupon_code\":
                \"COUPON_CODE\",\n            \"sound_file\":
                \"SOUND_FILE\",\n            \"enable_ios_badge\": true\n       
                },\n        \"template_backup\": {\n            \"title\":
                \"TITLE_OF_IOS_TEMPLATE\",\n            \"subtitle\":
                \"SUBTITLE_OF_IOS_TEMPLATE\",\n            \"message\":
                \"MESSAGE_OF_IOS_TEMPLATE\",\n            \"rich_media_value\":
                \"RICH_MEDIA_URL_HERE\",\n            \"default_click_action\":
                \"DEEPLINKING/RICH_LANDING/NAVIGATE_TO_A_SCREEN\",\n           
                \"default_click_action_value\":
                \"CLICK_ACTION_URL_HERE\",\n           
                \"allow_bg_refresh\":true\n        }\n    },\n    \"meta_info\":
                {\n        \"platform\": [\n           
                \"ANDROID\",\n            \"IOS\"\n        ],\n       
                \"template_style\": \"BASIC/STYLIZED\",\n       
                \"template_name\": \"NAME_OF_THE_TEMPLATE\",\n       
                \"updated_by\": \"USER_UPDATED\"\n    }\n}"
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic Base64_ENCODED_APP_ID_APP_SECRET_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1.0/custom-templates/push/search:
    post:
      tags:
        - General
      summary: Search Custom Push Template API
      description: >-
        The Search Push Template API can be used to look up the push templates
        created in your MoEngage account.  


        **Base URL**


        | Data Center | Replace {{OX}} with |

        | --- | --- |

        | DATA_CENTER_1 | 01 |

        | DATA_CENTER_2 | 02 |

        | DATA_CENTER_3 | 03 |


        _**Where to find reports settings in the Dashboard?**_


        - Reports settings are available at _\\Settings > Analytic > REPORT
        Settings **\\_
            

        _**Where to find App ID and SECRET-KEY in the Dashboard?**_


        - APP ID (DATA API ID) and SECRET KEY(API SECRET) are available at
        _**Settings > APIs > TRANSACTION PUSH/REPORTS SETTINGS**_.
            

        _**few of the failures can be**_


        401 - Invalid APP ID/ SECRET KEY


        400 - Any of the following reasons:


        - Duplicate - template_id and template_version

        - Body is missing for ANDROID.

        - Incorrect App Id

        - title value is invalid.

        - You have already created maximum allowed template allowed for client
            

        API Documentation
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: >-
                "{\n    \"page\": 1,\n    \"entries\": 10,\n   
                \"template_name\": \"NAME_OF_THE_TEMPLATE(PARTIAL
                SEARCH)/ID_OF_TEMPLATE\",\n    \"platform\": [\"ANDROID\",
                \"IOS\"],\n    \"template_source\": [\"API\",\"MOENGAGE\"],\n   
                \"template_style\": [\"BASIC\", \"STYLIZED\"],\n   
                \"template_type\": [\"CUSTOM\", \"PRE_BUILT\"],\n   
                \"created_by\": [\"user1@moengage.com\",
                \"user2@moengage.com\"],\n    \"updated_by\":
                [\"user1@moengage.com\", \"user2@moengage.com\"],\n   
                \"sort_params\":
                [{\"template_name/last_modified_date/last_modified_by\":
                \"ASCENDING/DESCENDING\"}],\n    \"template_ids\":
                [{\"external_template_id\": \"ID_OF_TEMPLATE\", \"version\":
                1}]\n}"
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic Base64_ENCODED_APP_ID_APP_SECRET_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1.0/custom-templates/sms:
    post:
      tags:
        - General
      summary: Create Custom SMS Template API
      description: >-
        The Create SMS Template API can be used to create an SMS template in
        MoEngage. This API helps you upload templates created outside the
        MoEngage ecosystem to MoEngage and use them for campaign creation.  


        **Base URL**


        | Data Center | Replace {{OX}} with |

        | --- | --- |

        | DATA_CENTER_1 | 01 |

        | DATA_CENTER_2 | 02 |

        | DATA_CENTER_3 | 03 |


        _**Where to find reports settings in the Dashboard?**_


        - Reports settings are available at _\\Settings > Analytic > REPORT
        Settings **\\_
            

        _**Where to find App ID and SECRET-KEY in the Dashboard?**_


        - APP ID (DATA API ID) and SECRET KEY(API SECRET) are available at
        _**Settings > APIs > TRANSACTION PUSH/REPORTS SETTINGS**_.
            

        _**few of the failures can be**_


        401 - Invalid APP ID/ SECRET KEY


        400 - Any of the following reasons:


        - Duplicate - template_id and template_version

        - Body is missing for ANDROID.

        - Incorrect App Id

        - title value is invalid.

        - You have already created maximum allowed template allowed for client
            

        API Documentation
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: >-
                "{\n    \"basic_details\": {\n        \"message\":
                \"MESSAGE\",\n        \"sms_template_id\":
                \"SMS_TEMPLATE_ID\"\n    },\n    \"meta_info\": {\n       
                \"template_id\": 1234567890,\n        \"template_name\":
                \"NAME_OF_THE_TEMPLATE\",\n        \"template_version\":
                \"VERSION_OF_THE_TEMPLATE\",\n        \"created_by\":
                \"USER_CREATED\"\n    }\n}"
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic Base64_ENCODED_APP_ID_APP_SECRET_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - General
      summary: Update Custom SMS Template API
      description: >-
        This API can be used to update an sms template by specifying its
        external template id. You can specify whether the updated version of the
        template can be used in active campaigns in the request.  


        **Base URL**


        | Data Center | Replace {{OX}} with |

        | --- | --- |

        | DATA_CENTER_1 | 01 |

        | DATA_CENTER_2 | 02 |

        | DATA_CENTER_3 | 03 |


        _**Where to find reports settings in the Dashboard?**_


        - Reports settings are available at _\\Settings > Analytic > REPORT
        Settings **\\_
            

        _**Where to find App ID and SECRET-KEY in the Dashboard?**_


        - APP ID (DATA API ID) and SECRET KEY(API SECRET) are available at
        _**Settings > APIs > TRANSACTION PUSH/REPORTS SETTINGS**_.
            

        _**few of the failures can be**_


        401 - Invalid APP ID/ SECRET KEY


        400 - Any of the following reasons:


        - Duplicate - template_id and template_version

        - Body is missing for ANDROID.

        - Incorrect App Id

        - title value is invalid.

        - You have already created maximum allowed template allowed for client
            

        API Documentation
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: >-
                "{\n    \"external_template_id\":
                \"ID_OF_TEMPLATE_TO_BE_UPDATED\",\n    \"update_campaigns\":
                false,\n    \"basic_details\": {\n        \"message\":
                \"MESSAGE\",\n        \"sms_template_id\":
                \"SMS_TEMPLATE_ID\"\n    },\n    \"meta_info\": {\n       
                \"template_name\": \"NAME_OF_THE_TEMPLATE\",\n       
                \"updated_by\": \"USER_UPDATED\"\n    }\n}"
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic Base64_ENCODED_APP_ID_APP_SECRET_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1.0/custom-templates/sms/search:
    post:
      tags:
        - General
      summary: Search Custom SMS Template API
      description: >-
        The Search SMS Template API can be used to look up the SMS templates
        created in your MoEngage account.  


        **Base URL**


        | Data Center | Replace {{OX}} with |

        | --- | --- |

        | DATA_CENTER_1 | 01 |

        | DATA_CENTER_2 | 02 |

        | DATA_CENTER_3 | 03 |


        _**Where to find reports settings in the Dashboard?**_


        - Reports settings are available at _\\Settings > Analytic > REPORT
        Settings **\\_
            

        _**Where to find App ID and SECRET-KEY in the Dashboard?**_


        - APP ID (DATA API ID) and SECRET KEY(API SECRET) are available at
        _**Settings > APIs > TRANSACTION PUSH/REPORTS SETTINGS**_.
            

        _**few of the failures can be**_


        401 - Invalid APP ID/ SECRET KEY


        400 - Any of the following reasons:


        - Duplicate - template_id and template_version

        - Body is missing for ANDROID.

        - Incorrect App Id

        - title value is invalid.

        - You have already created maximum allowed template allowed for client
            

        API Documentation
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: >-
                "{\n    \"page\": 1,\n    \"entries\": 10,\n   
                \"template_name\": \"NAME_OF_THE_TEMPLATE(PARTIAL
                SEARCH)/ID_OF_TEMPLATE\",\n    \"template_source\":
                [\"API\",\"MOENGAGE\"],\n    \"template_type\": [\"CUSTOM\",
                \"PRE_BUILT\"],\n    \"created_by\": [\"user1@moengage.com\",
                \"user2@moengage.com\"],\n    \"updated_by\":
                [\"user1@moengage.com\", \"user2@moengage.com\"],\n   
                \"sort_params\":
                [{\"template_name/last_modified_date/last_modified_by\":
                \"ASCENDING/DESCENDING\"}],\n    \"template_ids\":
                [{\"external_template_id\": \"ID_OF_TEMPLATE\", \"version\":
                1}]\n}"
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic Base64_ENCODED_APP_ID_APP_SECRET_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
