Skip to main content
The MoEngage Campaigns API allows you to create and manage Push and Email campaigns. Use these endpoints to automate campaign creation, update existing campaigns, control campaign status, and retrieve campaign details.
If this API is not enabled for your account, contact your MoEngage Customer Success Manager (CSM) or the Support team to request enablement.

Endpoints

The Campaigns API is a collection of the following endpoints:
  • Create Campaign: Creates a new Push or Email campaign.
  • Update Campaign: Updates an existing Push or Email campaign in MoEngage.
  • Search Campaigns: Fetches a list of Push, Email, or SMS campaigns with all current fields and status.
  • Test Campaign: Sends a test Push or Email campaign to specific users before launching it.
  • Personalized Preview: Displays personalized content for a specific user before sending a Push, Email, or SMS campaign.
  • Get Campaign Meta: Retrieves campaign details and reachability information for scheduled campaigns.
  • Change Campaign Status: Updates the status of campaigns to stop, pause, or resume them.
  • Get Child Campaigns: Retrieves child campaign execution details for Periodic or Business Event-triggered campaigns.

FAQs

Create Email Campaign

You can use user attributes, event attributes, product sets, content API, and content block for personalizing campaigns. The syntax of the personalization Jinja is the same as supported in the MoEngage dashboard.
MoEngage dedups the campaign using the request ID. If the same request ID is passed twice in 24 hours, the second campaign creation will fail.
Campaigns are displayed under the same delivery type with which the campaigns are created through this API. For example, One-Time, Periodic, and so on.
No, only one of the two is required for creating the campaign. If both are passed, the campaign creation will display an error.
To create a campaign that uses a custom segment, include the segmentation_details in your campaign creation request. Within included_filters, set the filter_type to “custom_segments” and provide the ID of your custom segment.The following code snippet shows how to incorporate a custom segment:
"segmentation_details": {
  "included_filters": {
    "filter_operator": "and",
    "filters": [
      {
        "filter_type": "custom_segments",
        "name": "segment",
        "id": "{{id}}"
      }
    ]
  }
}

Create Push Campaign

Yes. You can create a Push campaign for a single platform such as Android, iOS, or Web. You can also create campaigns for a combination of these platforms.
Use the Search Push Template API and pass a request parameter such as the template name, created by, or any other supported parameter to retrieve the template ID in the response.
Select a template type, such as Stylized Basic, Timer, or any other available option. Then, refer to the template’s requirements and include all fields marked as mandatory for that template type.
To create a campaign that uses a custom segment, include the segmentation_details in your campaign creation request. Within included_filters, set the filter_type to “custom_segments” and provide the ID of your custom segment.The following code snippet shows how to incorporate a custom segment:
"segmentation_details": {
  "included_filters": {
    "filter_operator": "and",
    "filters": [
      {
        "filter_type": "custom_segments",
        "name": "segment",
        "id": "{{id}}"
      }
    ]
  }
}

Update Push Campaign

The template type can be modified for the required platforms, and new content needs to be provided for the updated template type.
The platform can be added or removed during the update of the campaigns. You need to provide content for the new platform added to the campaign.
The updated campaign starts sending out as soon as changes are done, except for Event-triggered campaigns. In Event-triggered campaigns, details are cached and take up to 30 mins to send the updated campaign.

Update Email Campaign

No, you cannot update the segmentation audience after the campaign is in Active state. You can update the segmentation audience if the campaign is in Scheduled state or create a duplicate by stopping the existing campaign to pass new segmentation details.
The updated campaign starts sending out as soon as changes are done except for Event-triggered campaigns. In Event-triggered campaigns, details are cached and take up to 30 mins to send the updated campaign.
You must call the “GET” API by the campaign name, channel, or any other filters to fetch the campaign ID of the desired campaign. For more information, refer to Search Campaigns.

Search Campaigns - Push

Yes. To fetch flow node campaigns, you must pass the include_child_campaigns key value as true.
Use the flow_name and flow_id keys in the response. These keys indicate that the campaign is part of a flow.
The response will include all flow node campaigns, regardless of the flow delivery type, and Engage campaigns with a delivery type of one_time.

Search Campaigns - SMS

Yes. To fetch flow node campaigns, you must pass the include_child_campaigns key value as true.
Use the flow_name and flow_id keys in the response. These keys indicate that the campaign is part of a flow.
No, we currently do not have any filter in the request body for the sender name.
Yes. To fetch archived campaigns, you must pass the include_archived_campaigns key value as true.

Test Push Campaign

Yes, you can send the test campaign to any user by passing identifier as “Email”. The campaign sent will not be personalized.
The values passed under personalization details will be used for all users to whom the test campaign is to be sent and the remaining user attributes values will be picked up from the user profile.

Test Email Campaign

Yes, you can send the test campaign to any user by passing identifier as “Email”. The campaign sent will not be personalized.
The values passed under personalization details will be used for all users to whom the test campaign is to be sent and the remaining user attributes values will be picked up from the user profile.

Get Campaign Meta

No, reachability is an estimated value that may vary over time due to factors such as app installations, uninstalls, or changes in email subscription status.
No, reachability is calculated once daily and cached for 24 hours. Multiple API calls within the same day will return the cached value.

Personalized Preview

Yes, you can use custom templates with the Personalization Preview. The API will personalize the content within the template based on the user identifier provided and return the personalized HTML as a response.
Yes, you can pass event details as input to the API. Ensure the event name matches the one in your workspace.

Change Campaign Status

Periodic campaign only supports Pause and Resume actions of the campaign. You can stop only One-time campaigns.
No, after the One-time campaign moved to the Active state, you cannot stop it.

Postman Collections

We have made it easy for you to test the APIs. Click here to view the Postman collection.