openapi: 3.0.0
info:
  title: MoEngage - Business Events API
  description: >-
    Business Events include product launches, new episode releases for an OTT
    series, travel delays (flight delays), price drops in E-Commerce platforms,
    and so on. The Business Event APIs help you create Business Events, trigger
    them and search for them in MoEngage.
  version: 1.0.0
servers:
  - url: https://api-{{0x}}.moengage.com
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
paths:
  /v1.0/business_event:
    post:
      tags:
        - General
      summary: Create Business Events API
      description: >-
        Create Business Event API allows you to create Business Events in
        MoEngage. You can use these events to execute campaigns every time the
        event is triggered. For example, you can create business events when new
        episodes are available in an OTT series when there is a flight delay or
        price drop on a cart item. You can create event-triggered campaigns for
        these events in MoEngage to notify users about new episodes being
        available in an OTT series, flight delays, or price drops in an item
        they’ve viewed/wished for/added to the cart.


        **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:


        *   Invalid data type

        *   Created by is missing

        *   Event name is missing

        *   You have already created maximum number of events per db
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                event_name: NAME_OF_THE_EVENT
                event_attributes:
                  - attribute_name: NAME_OF_THE_ATTRIBUTE_1
                    attribute_data_type: DATA_TYPE
                  - attribute_name: NAME_OF_THE_ATTRIBUTE_2
                    attribute_data_type: DATA_TYPE
                  - attribute_name: NAME_OF_THE_ATTRIBUTE_3
                    attribute_data_type: DATA_TYPE
                created_by: user@moengage.com
      security:
        - basicAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1.0/business_event/trigger:
    post:
      tags:
        - General
      summary: Trigger Business Event API
      description: >-
        Trigger Business Event API allows you to trigger a business event in
        MoEngage. You can set up campaigns that are executed when these events
        are triggered.


        **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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                event_name: NAME_OF_THE_EVENT
                event_attributes:
                  attribute_name_1: VALUE_OF_THE_ATTRIBUTE_IN_DEFINED_DATATYPE
                  attribute_name_2: VALUE_OF_THE_ATTRIBUTE_IN_DEFINED_DATATYPE
                  attribute_name_3: VALUE_OF_THE_ATTRIBUTE_IN_DEFINED_DATATYPE
                triggered_by: user@moengage.com
      security:
        - basicAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1.0/business_event/search:
    post:
      tags:
        - General
      summary: Search Business Event API
      description: >-
        Search Business Event API allows you to search for business events by
        specifying their event IDs.


        **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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                event_ids/event_names:
                  - BUSINESS_EVENT_ID/BUSINESS_EVENT_NAME
      security:
        - basicAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
