curl --request POST \
--url https://api-{dc}.moengage.com/v1.0/business_event/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"event_ids": [
"6447b078712cd8c650074840"
]
}
'{
"data": [
{
"db_name": "Sample_App",
"event_id": "647597767459c85d7d6d6dfd",
"event_name": "NewMovies",
"event_attributes": [
{
"attribute_name": "MovieName",
"attribute_data_type": "array"
},
{
"attribute_name": "rating",
"attribute_data_type": "string"
}
],
"created_at": "2023-05-29T18:36:52.390000",
"total_trigger": 0,
"users_in_segment": 0,
"usage_count": 0,
"created_by": "john.doe@moengage.com",
"last_received_time": "2023-05-30T06:28:06.498000",
"_id": "64a54500633fda13b6681163"
}
]
}{
"error": {
"code": "400 Bad Request",
"message": "Additional fields are not allowed document schema for class BusinessEventSearchRequest:event_name",
"details": [
{
"code": "InvalidValue",
"target": "event_name",
"message": "Additional fields are not allowed document schema for class BusinessEventSearchRequest:event_name"
}
],
"request_id": "64a54e62633fda13b6681431"
}
}{
"error": {
"code": "401 Authentication error",
"message": "Authentication required",
"details": [
{
"code": "InvalidValue",
"target": "Authorization",
"message": {
"code": "MissingValue",
"target": "Authorization",
"message": "APP_ID and APP_SECRET_KEY is missing in Authorization Header."
}
}
],
"request_id": "64a54e0e633fda13b6681430"
}
}{
"status": "error",
"data": {
"code": 429,
"title": "rate limiter exception",
"description": "Exceeded rate limit for this app"
}
}{
"title": "Internal Server Error",
"message": "An unexpected error was encountered while processing this request. Please contact MoEngage Team"
}Search Business Events
This API searches for business events by specifying their event IDs.
curl --request POST \
--url https://api-{dc}.moengage.com/v1.0/business_event/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"event_ids": [
"6447b078712cd8c650074840"
]
}
'{
"data": [
{
"db_name": "Sample_App",
"event_id": "647597767459c85d7d6d6dfd",
"event_name": "NewMovies",
"event_attributes": [
{
"attribute_name": "MovieName",
"attribute_data_type": "array"
},
{
"attribute_name": "rating",
"attribute_data_type": "string"
}
],
"created_at": "2023-05-29T18:36:52.390000",
"total_trigger": 0,
"users_in_segment": 0,
"usage_count": 0,
"created_by": "john.doe@moengage.com",
"last_received_time": "2023-05-30T06:28:06.498000",
"_id": "64a54500633fda13b6681163"
}
]
}{
"error": {
"code": "400 Bad Request",
"message": "Additional fields are not allowed document schema for class BusinessEventSearchRequest:event_name",
"details": [
{
"code": "InvalidValue",
"target": "event_name",
"message": "Additional fields are not allowed document schema for class BusinessEventSearchRequest:event_name"
}
],
"request_id": "64a54e62633fda13b6681431"
}
}{
"error": {
"code": "401 Authentication error",
"message": "Authentication required",
"details": [
{
"code": "InvalidValue",
"target": "Authorization",
"message": {
"code": "MissingValue",
"target": "Authorization",
"message": "APP_ID and APP_SECRET_KEY is missing in Authorization Header."
}
}
],
"request_id": "64a54e0e633fda13b6681430"
}
}{
"status": "error",
"data": {
"code": 429,
"title": "rate limiter exception",
"description": "Exceeded rate limit for this app"
}
}{
"title": "Internal Server Error",
"message": "An unexpected error was encountered while processing this request. Please contact MoEngage Team"
}Rate Limit
The rate limit is 100 RPM.Authorizations
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 Campaign report/Business events/Custom templates/Catalog API/Inform Report tile.
For more information on authentication and getting your credentials, refer here.
Body
Search criteria. At least one of event_ids or event_names should be provided.
This field contains the list of event ids associated with the business events that need to be fetched.
Structure: "event_ids": ["event_id1","event_id2","event_id3"]
event_id: The event id is the unique identifier for a business event and is generated by MoEngage at the time of business event creation. You must store and use this value while looking up a business event using the search API.
["6447b078712cd8c650074840"]
This field contains the list of event names associated with the business events that need to be fetched.
Structure: "event_names": ["event_name1","event_name2","event_name3"]
event_name: The event name is the name associated with the Business Event that is provided during the creation of the event.
["NewMovies"]
Response
This response is returned when the request is processed successfully.
Show child attributes
Show child attributes
Was this page helpful?