This is an Early Access feature. To enable it for your account, please contact your MoEngage Customer Success Manager (CSM) or the Support team.
Overview
API keys are typically used as an authentication or authorization mechanism. They are unique identifiers associated with access to API resources. API keys help ensure the security and accountability of API access, allowing you to manage and monitor usage effectively. The multi-API key feature is currently supported for the following API groups:- Segmentation APIs and Inform are available only with Basic Auth.
- Creation of new API keys for Push APIs is not currently supported. Push APIs work only with Basic Auth (Legacy) keys migrated to this dashboard.
- Generate a new key while the existing key is still available: With multi-key support, the existing key remains active until the new key becomes functional. This allows you to rotate keys for security purposes without causing downtime. For example, if your team needs time to integrate a new key, the old key continues to work during that period. After the new key is integrated, you can archive the old one.
- Use different keys for different teams: You can create separate keys for different internal teams or external vendors, each scoped to the APIs they need. This provides granular access control and improves security across your organization.
Authentication Types
MoEngage supports two authentication types for API keys:- Basic Auth: The standard authentication method using an API key and secret. Suitable for server-to-server integrations where token expiration is not a requirement.
- OAuth 2.0: A token-based authentication method that issues short-lived access tokens. The token expiry time is customizable, and the backend validates access tokens automatically.
Create a Key
- After the multi-API key feature is enabled, the existing API keys in the API dashboard are migrated to your new API key dashboard as legacy keys.
- You can view the legacy key (autogenerated previously when the workspace was created and migrated to this new dashboard) details and continue to use them. However, archiving, editing, and regenerating legacy keys is not supported.
- MoEngage recommends creating and using new keys, as legacy keys will be deprecated in the future.
1
Open the API Keys Page
On the left navigation menu in the MoEngage dashboard, go to Settings > Account > API keys.
2
Start a New Key
Click + Create new key.

3
Open the Key Details Form
In the Create new key dialog, enter the key details.
4
Name the Key
Enter a name in the Key name box. The key name must not exceed 100 characters.
5
Choose an Authentication Type
Under Authentication Type, select the method you want to use, then set the options for that method:
- Basic Auth
- OAuth 2.0
Under Select APIs for access, select the API groups you want to access using this key:
- Data APIs
- Segmentation APIs
- Campaigns
- Inform
- Offerings
- Decision Policy
- Dashboard & Analyze

6
Scope the API Access
Click next to a group to expand it and select individual APIs. Use Select all or De-select all to manage selections across all groups.
7
Save the New Key
Click Create key. The key is then listed under Active API keys.
View Active Keys
On the API Keys page, the Active API keys table shows the following columns:
You can search for keys using the search bar. The count of active keys is displayed above the table.
Legacy keys are listed with the auth type Basic Auth (Legacy). You can view and continue to use these keys, but you cannot edit, regenerate, or archive them.
Manage Keys
On the API Keys page, click for a key to see the following options:
View Key Details
1
Open the Key Actions Menu
On the API Keys page, click for the key you want to view.
2
Open the Details Panel
Click View key details. The fields in the details panel depend on the authentication type of the key:
- Basic Auth
- OAuth 2.0

Edit Key Details
1
Open the Key Actions Menu
On the API Keys page, click for the key you want to edit.
2
Open the Edit Dialog
Click Edit key details.
3
Update the Fields
In the Edit key details dialog, edit the available fields:
- Basic Auth
- OAuth 2.0
4
Save Your Changes
Click Save. The Save button remains disabled until you make a change.
View Archived Keys
- On the API Keys page, click View archived keys.
- The archived keys list opens with the following columns: Key name, Auth type, Archived on, and Key.

Audit Logs

- Click to filter audit logs based on Team(s), Action, Actor, and Date time Range.
- Type a value in the Search logs by search bar to fetch the relevant audit logs.
- Click Export audit logs to receive the audit log report by email. The email includes a download link for the report.
- Create is displayed when an API key is created successfully.
- Update is displayed when:
- A key name is updated.
- The API selection for a key is updated.
- A key is regenerated.
- Delete is displayed when a key is archived.
FAQs
What are legacy keys?
What are legacy keys?
Legacy keys are API keys created automatically when the workspace was created and migrated from the older API keys dashboard to this one. You cannot edit, regenerate, or archive them.
What is access token expiration in OAuth 2.0?
What is access token expiration in OAuth 2.0?
OAuth 2.0 access token expiration is a security feature that limits how long an access token can be used to call protected APIs before it becomes invalid.An access token acts as a temporary digital pass. Instead of sharing your password with every app or service, the authorization server gives you a short-lived token. When that token reaches its expiration time, the API rejects any further requests and returns an
HTTP 401 Unauthorized error.Why does access token expiration matter?
Why does access token expiration matter?
- Better security: If an attacker steals a short-lived token, they have only a brief window to exploit it before it stops working.
- Resource control: Expiration prevents unused or abandoned tokens from filling up the authorization server’s database.
- Standard lifespan: You can set the access token expiration anywhere from 5 to 60 minutes.
How does MoEngage handle expired tokens?
How does MoEngage handle expired tokens?
MoEngage issues a companion refresh token alongside the access token. Your app uses this longer-lived refresh token in the background to request a fresh access token, without forcing the user to log in again.
