Emma API Documentation

Emma Event API

Access to the Event API is available only to Emma Essentials, Emma for Teams and Emma Corporate customers.

The Emma Event API is used to automate and personalize emails that are triggered by audience activities in other platforms. While it is often used to power automated workflows triggered by activities like purchases and event registration and attendance, the Event API can receive events and data of any type from any service.

You can post events to Emma using the endpoint below. Workflows that are triggered by events shared to this endpoint can be configured in the Automation workflow builder. For more information about the event API and its capabilities, visit our Resource Center.

POST https://events.e2ma.net/v1/#account_id/events

This endpoint allows you to post any type of valid JSON to Emma. In order for an event to power an automated workflow, the following conditions must be met:

  • Must include a valid email address as a value with a key of "email"
  • Email address must belong to a contact who is currently in “Active” status within your audience
  • Automated workflow must be configured to match key/value pairs contained within JSON post (more information here).
  • JSON payload must not exceed 256KB (262,035 bytes)
  • Sample Request [showhide]
    POST /events.e2ma.net/v1/100/events/
    
    {
      “event_name”: “order-completed”
        "id": 1028374857,
        "email": “cody.devos@myemma.com”,
        "closed_at": null,
        "created_at": "2016-04-12T11:00:00-09:00",
    "total_price": “145.53”,
          "total_discounts": “14.70",
          "order_number": 1001,
        "discount_codes": [
          {
            "code": “TEN16”,
            "amount": “10.00",
            "type": "percentage"
          }
        ],
       "line_items": [
          {
            "id": 998327818,
            "variant_id": 59284621,
            "title": “Slim Short Sleeve Linen Shirt”,
            "quantity": 1,
            "price": “68.00",
            "sku": “SLSSLNSHRT”,
            "variant_title": “white”,
            “size”: medium,
            "product_id": 632910392,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": “Slim Short Sleeve Linen Shirt - White“,
                    ],
            "tax_lines": [
              {
                "title": "State Tax",
                "price": “6.12”,
                "rate": 0.09
              }
    {
            "id": 789327523,
            "variant_id": 89137513,
            "title": “Slim Mens Chino”,
            "quantity": 1,
            "price": “79.00",
            "sku": “SLMNCHNO”,
            "variant_title": “green”,
            “size”: 32W32L,
            "product_id": 948517351,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": “Slim Short Sleeve Linen Shirt - White“,
                    ],
            "tax_lines": [
              {
                "title": "State Tax",
                "price": “7.11”,
                "rate": 0.09
              }
            ]
          },
      "shipping_lines": [
          {
            "id": 0928273492,
            "title": "Free Shipping",
            "price": "0.00",
            "code": "Free Shipping",
            "source": "shopify",
            "phone": null,
            "carrier_identifier": null,
            "tax_lines": [
            ]
          }
        ],
    
    

    Sample Response [showhide]
    POST /events.e2ma.net/v1/100/events/
    {"success":true}
    

    Related Topics

    Interested in Emma?

    Emma's email marketing makes communicating simple and stylish. Get started today.