> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-partner-guide.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Transactional Alert

> This API is used to trigger a transactional message/alert to the user via one or more configured channels.

#### Rate Limit

The default rate limit is 10K RPM.


## OpenAPI

````yaml /api/inform/inform.yaml post /alerts/send
openapi: 3.0.3
info:
  title: MoEngage Inform API
  version: '1.0'
  description: >-
    API for MoEngage Inform, a unified messaging infrastructure for building and
    managing transactional alerts across multiple channels like SMS, Email, and
    Push.
servers:
  - url: https://api-{dc}.moengage.com/v1.0
    description: Live Alerts Endpoint
    variables:
      dc:
        default: '01'
        description: >-
          The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center
          (DC). MoEngage hosts each customer in a different DC. You can find
          your DC number and replace the value of ‘dc’ in the URL by referring
          to the DC and API endpoint mapping
          [here](https://help.moengage.com/hc/en-us/articles/360057030512-Data-Centers-in-MoEngage).
          Your MoEngage Data Center (DC) can be 1, 2, 3, 4,5, 6.
  - url: https://sandbox-api-{dc}.moengage.com/v1.0
    description: Test/Sandbox Alerts Endpoint
    variables:
      dc:
        default: '01'
        description: >-
          The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center
          (DC). MoEngage hosts each customer in a different DC. You can find
          your DC number and replace the value of ‘dc’ in the URL by referring
          to the DC and API endpoint mapping
          [here](https://help.moengage.com/hc/en-us/articles/360057030512-Data-Centers-in-MoEngage).
          Your MoEngage Data Center (DC) can be 1, 2, 3, 4,5, 6. 
security: []
tags:
  - name: Transactional Alerts
    description: Send transactional alerts using pre-configured templates.
paths:
  /alerts/send:
    post:
      tags:
        - Transactional Alerts
      summary: Send Transactional Alert
      description: >-
        This API is used to trigger a transactional message/alert to the user
        via one or more configured channels.
      requestBody:
        required: true
        description: >-
          The payload containing the alert identifier, transaction details, and
          recipient information for each channel.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InformRequest'
            examples:
              singleChannelWithoutPersonalization:
                summary: Single Channel (SMS) without Personalization
                value:
                  alert_id: 636b77e6e2cf83277195fb60
                  alert_reference_name: Demo_ID
                  user_id: USER_12345
                  transaction_id: TXN_ABCDEF123
                  payloads:
                    SMS:
                      recipient: '1234567890'
              multichannelWithoutPersonalization:
                summary: Multichannel Without Personalization
                value:
                  alert_id: 636b77e6e2cf83277195fb60
                  alert_reference_name: Demo_ID
                  user_id: USER_ID
                  transaction_id: YOUR_TRANSACTION_ID_VAL_HERE
                  payloads:
                    PUSH:
                      recipient: <push-token>
                    EMAIL:
                      recipient: john.doe@moengage.com
              singleChannelWithPersonalization:
                summary: Single Channel With Personalization (SMS)
                value:
                  alert_id: 636b77e6e2cf83277195fb60
                  alert_reference_name: Demo_ID
                  user_id: USER_ID
                  transaction_id: YOUR_TRANSACTION_ID_VAL_HERE
                  payloads:
                    SMS:
                      recipient: '123456789'
                      personalized_attributes:
                        firstname: YOUR_firstname_ATTRIBUTE_VAL_HERE
                        orderid: YOUR_orderid_ATTRIBUTE_VAL_HERE
                        deliverydate: YOUR_deliverydate_ATTRIBUTE_VAL_HERE
                        deliveryslot_starttime: YOUR_deliveryslot_starttime_ATTRIBUTE_VAL_HERE
                        deliveryslot_endtime: YOUR_deliveryslot_endtime_ATTRIBUTE_VAL_HERE
              multiChannelWithPersonalization:
                summary: Multi-Channel with Personalization
                value:
                  alert_id: 636b77e6e2cf83277195fb60
                  alert_reference_name: Demo_ID
                  user_id: USER_12345
                  transaction_id: TXN_987654321
                  payloads:
                    PUSH:
                      recipient: <push-token>
                      personalized_attributes:
                        firstname: John
                        orderid: ORD_554433
                    EMAIL:
                      recipient: john.doe@moengage.com
                      personalized_attributes:
                        firstname: John
                        orderid: ORD_554433
      responses:
        '200':
          description: >
            Request has been received and processed. The response body contains
            the status for the overall request and for each individual channel.


            **Note**: Reach out to your Customer Success Manager to enable
            sending the channel level details as part of your API response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InformSuccessResponse'
        '400':
          description: >-
            Bad Request. Invalid payload format, incorrect JSON, or invalid
            Alert ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InformErrorResponse'
              example:
                message: Invalid Alert ID
                err_code: BAD_REQUEST
                status_code: 120002
        '401':
          description: Unauthorized. Invalid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InformErrorResponse'
              example:
                message: Invalid App Key or Basic Auth
                err_code: UNAUTHORIZED
                status_code: 120001
        '409':
          description: >-
            Duplicate Request. A request with the same transaction_id was
            received recently.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InformErrorResponse'
              example:
                message: Duplicate Transaction ID detected
                err_code: DUPLICATE_REQUEST
                status_code: 120009
        '429':
          description: Rate Limit Reached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InformErrorResponse'
              example:
                message: Too many requests
                err_code: RATE_LIMIT_EXCEEDED
                status_code: 120029
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InformErrorResponse'
              example:
                message: Internal Server Error
                err_code: INTERNAL_ERROR
                status_code: 120500
      security:
        - basicAuth: []
          moeAppKey: []
components:
  schemas:
    InformRequest:
      type: object
      required:
        - transaction_id
        - payloads
      properties:
        alert_id:
          type: string
          description: >-
            This field uniquely identifies the Alert to be sent to the user. For
            the staging endpoint, use the test alert id and for the live
            endpoint, use the alert id. For more information, refer to [Live and
            Test Alerts](#live-vs-test-environments).
        alert_reference_name:
          type: string
          description: >-
            This field is used to identify the Alert using your reference Name
            and can be used to identify the alert as an alternative to Alert ID.
        user_id:
          type: string
          description: >-
            This is the unique user identifier information you maintain. This
            information should be passed in the request to facilitate the
            mapping of the channel events back to the user profile to which this
            user_id is associated in MoEngage.
        transaction_id:
          type: string
          description: >-
            This is the unique identifier denoting the transaction for which the
            Alert is being sent to the user. This information is maintained by
            the brand and is passed in the request. The maximum length allowed
            for this field is 50 characters.
        payloads:
          type: object
          description: >-
            The payload contains the following channel-level information for all
            the configured channels.
          properties:
            SMS:
              $ref: '#/components/schemas/PayloadChannel'
            EMAIL:
              $ref: '#/components/schemas/PayloadChannel'
            PUSH:
              $ref: '#/components/schemas/PayloadChannel'
    InformSuccessResponse:
      type: object
      properties:
        message:
          type: string
          example: Successfully Received
        request_id:
          type: string
        SMS:
          $ref: '#/components/schemas/ChannelStatus'
        EMAIL:
          $ref: '#/components/schemas/ChannelStatus'
        PUSH:
          $ref: '#/components/schemas/ChannelStatus'
    InformErrorResponse:
      type: object
      properties:
        message:
          type: string
        err_code:
          type: string
        status_code:
          type: integer
    PayloadChannel:
      type: object
      required:
        - recipient
      properties:
        recipient:
          type: string
          description: >-
            The target for the notification. This should be a mobile number for
            SMS, an email address for EMAIL, or a push token for PUSH.
        personalized_attributes:
          type: object
          additionalProperties: true
          description: Key-value map for personalization.
        sender_attributes:
          type: array
          items:
            type: string
          description: A list of API attributes for evaluating which sender to use.
        personalized_attachments:
          type: object
          additionalProperties:
            type: string
            format: byte
            description: >-
              A map where keys are attachment identifiers (defined in the
              template) and values are Base64-encoded strings of the attachment
              content.
    ChannelStatus:
      type: object
      properties:
        message:
          type: string
        err_code:
          type: string
        status_code:
          type: integer
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >
        Authentication is done via Basic Auth. This requires a base64-encoded
        string of your credentials in the format 'username:password'.


        - **Username**: Use your MoEngage workspace ID (also known as the App
        ID). You can find it in the MoEngage dashboard at **Settings** >
        **Account** > **APIs** > **Workspace ID (earlier app id)**.

        - **Password**: Use your API Key, which you can find within the
        **Inform** tile.


        **Note**: After you generate and save the Inform API Key (SECRET KEY),
        DO NOT generate a new key unless there is a security breach. After you
        generate a different key and save it, API calls using the older key
        won't work.


        For more information on authentication and getting your credentials,
        refer
        [here](https://www.moengage.com/docs/api/introduction#getting-your-credentials).
    moeAppKey:
      type: apiKey
      in: header
      name: MOE-APPKEY
      description: >-
        This is the Workspace ID of your MoEngage account that must be passed
        with the request. You can find it in the MoEngage dashboard at
        **Settings** > **Account** > **APIs** > **Workspace ID (earlier app
        id)**.

````