Bulk Import

Overview

Use the Bulk Import API to send, to MoEngage, in batch multiple user, device, and event requests using a single API request. You can send a batch request of a maximum of 100 kB in a single API call.

Endpoints

Data Center New Endpoint
Data Center 1 https://api-01.moengage.com/v1/transition/
Data Center 2 https://api-02.moengage.com/v1/transition/
Data Center 3 https://api-03.moengage.com/v1/transition/

For more information about MoEngage data centers, refer to Data Centers in MoEngage.

Syntax

Text

POST https://api-01.moengage.com/v1/transition/<APP ID>
POST https://api-02.moengage.com/v1/transition/<APP ID>
POST https://api-03.moengage.com/v1/transition/<APP ID>

Request Body

A sample API request is as follows:

JSON
{
	"type": "transition",
	"elements": [{
			"type": "customer",
			"customer_id": "john@example.com",
			"attributes": {
				"name": "John",
				"platforms": [{
					"platform": "ANDROID",
					"active": "true"
				}]
			}
		},
		{
			"type": "device",
			"customer_id": "john@example.com",
			"device_id": "96bd03b6-defc-4203-83d3-dc1c73080232",
			"attributes": {
				"brand": "Apple",
				"platform": "iOS",
				"push_id": "irBMohQPf_k2QrwP8iRzK3A/0CdLEzAoVGdF65HhH_I"
			}
		},
		{
			"type": "event",
			"customer_id": "john@example.com",
			"device_id": "96bd03b6-defc-4203-83d3-dc1c73080232",
			"actions": [{
					"action": "Added to Cart",
					"attributes": {
						"product": "Mobile",
						"color": "white",
						"Brand": "Apple"
					},
					"platform": "iOS",
					"app_version": "1.2.3",
					"current_time": "2020-05-31T16:33:35Z",
					"user_timezone_offset": 19800
				},
				{
					"action": "Purchase",
					"attributes": {
						"product": "MacBook Air",
						"Brand": "Apple"
					},
					"platform": "iOS",
					"app_version": "1.2.3",
					"current_time": 1590404615,
					"user_timezone_offset": 19800
				}
			]
		}
	]
}

Request Body Fields

Key Datatype Required Description
type String Yes This is used to identify the type of request.
element List Yes List of data points (events, customers and devices) to track.
 

API Validation for Bulk API

All bulk API requests return a 200 response code. Debugging should be done on the user profile on the dashboard.
Was this article helpful?
0 out of 0 found this helpful