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

# MoEngage Streams Webhook

> This endpoint represents the incoming webhook from MoEngage Streams.
Your server should be configured to accept POST requests with this payload format at your specified endpoint URL.
This is not an API you call, but an event you receive from MoEngage.



## OpenAPI

````yaml /api/data/data.yaml post /webhooks/moengage-streams
openapi: 3.0.3
info:
  title: MoEngage Data APIs
  version: '1.0'
  description: >-
    This is a comprehensive OpenAPI specification for MoEngage's Data APIs,
    including User, Event, and Device management.

    It's designed to power an interactive API playground on your new
    documentation site.
servers:
  - url: https://api-0{dc}.moengage.com/v1
    description: MoEngage Core API Server
    variables:
      dc:
        default: '1'
        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. 
        enum:
          - '1'
          - '2'
          - '3'
          - '4'
          - '5'
          - '6'
security:
  - Authentication: []
tags:
  - name: User
    description: Operations for creating, updating, retrieving, and managing user profiles.
  - name: Event
    description: Operations for tracking user events.
  - name: Device
    description: Operations for managing user devices.
  - name: Tracking
    description: Endpoints for tracking attribution and installs.
  - name: Utilities
    description: Utility endpoints for testing connections.
  - name: File Imports
    description: Operations for managing asynchronous file imports.
  - name: Bulk
    description: Operations for importing users and events in bulk.
  - name: Webhooks
    description: Incoming webhook specifications from MoEngage.
paths:
  /webhooks/moengage-streams:
    post:
      tags:
        - Webhooks
      summary: MoEngage Streams Webhook
      description: >-
        This endpoint represents the incoming webhook from MoEngage Streams.

        Your server should be configured to accept POST requests with this
        payload format at your specified endpoint URL.

        This is not an API you call, but an event you receive from MoEngage.
      requestBody:
        description: Payload sent from MoEngage Streams when an event occurs.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StreamsWebhookPayload'
      responses:
        '200':
          description: OK. Acknowledges successful receipt of the event data.
        '202':
          description: Accepted for processing.
        '204':
          description: No Content. Successful receipt acknowledged.
      security: []
components:
  schemas:
    StreamsWebhookPayload:
      type: object
      properties:
        app_name:
          type: string
        source:
          type: string
          example: MOENGAGE
        moe_request_id:
          type: string
          format: uuid
        events:
          type: array
          items:
            type: object
            properties:
              event_name:
                type: string
              event_code:
                type: string
              event_uuid:
                type: string
                format: uuid
              event_time:
                type: integer
                format: int64
                description: Epoch time in seconds
              event_type:
                type: string
                enum:
                  - CAMPAIGN_EVENT
                  - USER_ACTION_EVENT
              event_source:
                type: string
                example: MOENGAGE
              uid:
                type: string
                description: MoEngage customer_id
              event_attributes:
                type: object
                additionalProperties: true
              user_attributes:
                type: object
                additionalProperties: true
              device_attributes:
                type: object
                additionalProperties: true
  securitySchemes:
    Authentication:
      type: http
      scheme: basic
      description: >
        This authentication parameter, used for access control, must be passed
        along with the request. The API request will be authenticated through
        Basic Authentication. Basic Authentication sends a Base64-encoded string
        containing your username and password with every API request. It encodes
        a 'username:password' string in Base64 and appends the encoded string
        with 'Basic '. This string is included in the authorization header as
        shown below:


        `{"Authorization: Basic Base64_ENCODED_WORKSPACEID_APIKEY=="}`


        The username and password details can be obtained from the MoEngage
        Dashboard. If you're using the API for the first time, follow these
        steps:

        1. Navigate to Settings -> Account -> APIs.

        2. Copy the following details:
           * **Username:** Under Workspace ID (earlier app id), click the copy icon to copy the username.
           * **Password:** In the **API keys** section, click the copy icon in the **Data** tile to copy the API key.

        Use these details to authenticate the API requests.

````