Skip to main content
The API Firewall gives you control over which IP addresses can send requests to your MoEngage APIs. Even if an API key is compromised or stolen, the API Firewall rejects requests from any IP address that is not on your whitelist. Each rule whitelists one or more API categories, so you can restrict access to specific parts of your API surface, without affecting categories you haven’t configured.
The API Firewall applies to the following API categories: Data, Segmentation, Campaigns, Partner Integration, and Content. Every rule must whitelist at least one category.

How It Works

By default, the API Firewall is inactive. Until you publish a rule that covers a category, MoEngage accepts requests to that category’s APIs from any IP address. Enforcement is per category — publishing a rule protects only the categories that rule covers, and leaves every other category open. Each rule has two independent properties: the categories it whitelists, and its publish status. Only published rules affect traffic — saving a rule never enforces it by itself.

API Categories

The API Firewall organizes API endpoints into five fixed categories. You can’t rename this list or add to it. When you create or edit a rule, select every category the rule should whitelist.

Data

Segmentation

Campaigns

The Send Push Notification and Send Transactional Alert APIs are not supported by the API Firewall. IP whitelisting rules aren’t enforced on these two APIs.

Partner Integration

Content

Use Cases

  • Protect workspaces with large teams: Organizations with many API users can restrict access to whitelisted server IP addresses. Even if a team member leaves and takes an API key, requests from unauthorized IP addresses are rejected.
  • Protect against exposed credentials: When an API key is exposed in a public repository, the API Firewall rejects requests from IP addresses not on your whitelist, even when valid credentials are presented.
  • Isolate non-production environments: Create workspace-specific whitelist rules for internal automation networks or QA testing tools in staging workspaces, keeping test traffic separate from production data.
  • Scope protection to specific categories: Enforce IP restrictions on a single sensitive category, such as Partner Integration or Segmentation, while leaving other categories not enforced during a phased rollout or migration.
  1. On the left navigation menu in the MoEngage dashboard, click Settings > Account > Security.
  2. On the Security page, select the API firewall tab.
  3. On the API firewall page, select Enable API Firewall. The Add API Firewall Rule dialog box opens.
Navigation to API Firewall
You must be an Admin for your MoEngage workspace to add API Firewall rules. For more information, refer to Access Roles.

Create and Publish API Firewall Rules

Before configuring rules, obtain a complete list of static IP addresses and CIDR blocks used by your servers from your DevOps or Security team.

Add New API Firewall Rule

  1. In the Add API firewall rule dialog box, enter the following details:
    • Rule name: Enter a descriptive name (for example, “Internal Corporate Network” or “AWS Production Server”).
    • Whitelist categories: Select one or more API categories this rule whitelists — Data, Segmentation, Campaigns, Partner Integration, or Content. You must select at least one category.
    • Condition: Select the IP address type from the drop-down menu:
    • Value: Enter the IP address, CIDR range, or start and end IP addresses in the format shown in the example.
First rule for this categoryThis warning appears inline as soon as you select a category that has no other rules — published or unpublished — covering it. It alerts you that publishing this rule will enforce IP restrictions for that category within approximately 15 minutes, blocking all IPs except those in your whitelist, and advises verifying your current IP and all server IPs are included to prevent accidental lockout. It updates live as you change your category selection, so you see the consequence before you save.First rule warning banner when selecting a category with no existing rules
  1. Select Add rule. After you save your first rule, MoEngage redirects you to the API firewall list page. To add more rules, select + Add rule on the top right of the list page.
Add New API Firewall Rule
Rule saved as UnpublishedYour saved rule is recorded but not yet enforced. No traffic is currently restricted for the categories it covers. Add all required server IPs before publishing to ensure uninterrupted access for your authorized systems. Once published, MoEngage accepts requests to the categories this rule covers exclusively from whitelisted IP addresses and returns a 403 error for all others.

Publish Rules

Publishing a rule makes it active and enforces the IP restriction for every category it covers. You can publish all rules at once or publish a subset of rules selectively.
  1. Select the checkbox next to each unpublished rule you want to activate.
  2. Select Publish at the bottom of the screen.
  3. In the confirmation dialog box, review the notice — including any first rule for category warnings — and then select Publish to confirm.
The rule status changes to Published. MoEngage now accepts requests to every category this rule covers only from IP addresses that match a published rule. Requests from all other addresses receive a 403 response.
If you publish only some of your rules, the categories covered exclusively by the remaining unpublished rules stay not enforced. Requests to those categories continue to be accepted from any IP address until you publish the rules that cover them.

View Rule Details and Activity

The API firewall page displays the following information for each rule: API Firewall Rule Details

Manage API Firewall Rules

Edit an Existing Rule

  1. On the API firewall page, click the ellipsis icon on the rule you want to modify.
  2. Click Edit. The Edit API Firewall Rule dialog box opens.
  3. Update the Rule name, Whitelist categories, Condition, or Value as needed.
Edit API Firewall Rule
Warnings during editing
  • First rule for this category: If you add a category that currently has no other rules covering it, the editor shows the same first rule warning described in Add New API Firewall Rule.
  • Last rule for this category: This warning appears only when you’re editing a rule that is currently Published and is the only published rule covering one or more categories — for example, if your edit removes a category from the rule. The warning indicates that publishing this edit will disable firewall protection for those categories.
  1. Select Save. The edited rule is saved as Unpublished — select Publish to enforce your changes.
Publish API Firewall Rules

Filter Rules by Category

You can filter the rules list to show only rules that cover a specific API category. On the API Firewall page, select a category to view all rules whitelisting that category. Filter API Firewall Rules by Category

Unpublish or Delete a Rule

  • To unpublish: Select the active rules using the checkboxes and select Unpublish at the bottom of the screen. A confirmation dialog appears. Select Unpublish to confirm. The rule remains in your list but is no longer enforced.
Unpublish confirmation modalWhen you unpublish a rule, a confirmation modal appears showing the category the rule covers. The modal warns that unpublishing this rule will stop blocking IPs for that category and reminds you that if all rules are unpublished for a category, firewall protection is disabled and all IPs can access that category’s APIs.
  • To delete: Click the ellipsis icon on the rule, select Delete, and confirm the deletion in the dialog box. Deleted rules are removed from the list permanently.
Deleting the last published rule for a categoryIf the rule you’re deleting is Published and is the only published rule covering one or more categories, a confirmation modal opens. The modal lists the affected categories and warns that deleting this rule will disable firewall protection for those categories. It also suggests unpublishing the rule instead if you may need to restore it later.Delete last rule warning modal showing affected categories and unpublish option

FAQs

Publishing a rule enforces every category it covers within approximately 15 minutes. If you have three server IPs across two categories and publish them one at a time, each server without an active rule for its category may receive 403 errors until its rule is published and propagated. Add all rules in Unpublished status first, then select all and publish them together to prevent service interruptions for your authorized systems.
Yes. Select multiple categories in the Whitelist categories field when you create or edit a rule. The rule applies to all selected categories.
No. The API Firewall applies to server-to-server API traffic across its supported categories. It does not affect end-user mobile or web SDK traffic.
MoEngage does not send a dashboard notification when the firewall blocks a request. The blocked system receives a 403 error directly in the API response. The dashboard status column reflects the current published or unpublished state of each rule.
The API Firewall rejects requests from any IP address not covered by an active rule for the relevant category, including your own servers. To prevent accidental lockouts, verify that all authorized server IPs are present in your rules before selecting Publish — the first rule warning in the editor flags categories where this would be the first active rule.
No. The API Firewall evaluates requests using network-layer IP identifiers. Rules must specify single IP addresses or CIDR ranges. Domain names are not supported.
The API Firewall is designed to fail open. If an internal failure occurs, the system allows API traffic through rather than blocking legitimate requests, preserving data collection continuity.

Next Steps

Now that your API Firewall rules are configured, refer to the following resources to strengthen your workspace security further:
  • Audit Logs — Review a complete record of all API Firewall rule changes, including who made each change, when, and from which IP address.
  • Firewall — Restrict MoEngage dashboard login access to approved IP addresses, complementing the API-level protection provided by the API Firewall.
  • SDK Authentication — Secure your mobile and web SDK traffic using JWT-based authentication to validate requests from your app users.
  • Security Best Practices — Explore recommended configurations across authentication, access control, and network security to keep your workspace secure.