Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/moengage-test-campaigns-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no email required.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Moengage Test Campaigns API
version: '2025-11-20'
contact:
name: MoEngage Developer Team
email: support@moengage.com
url: https://developers.moengage.com
description: 'Operations tagged Test Campaigns across 2 of this provider''s published API definitions: moengage-campaign-draft-openapi.yml, moengage-campaigns-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-{dc}.moengage.com/
description: MoEngage Campaigns API Server
variables:
dc:
default: '01'
description: Data center (DC) segment in the hostname. Replace `OX` with your workspace DC (01–06 or 101). See [Data centers](/api/introduction#data-centers).
- url: https://api-{dc}.moengage.com/core-services/v1
description: MoEngage Campaigns API Server
variables:
dc:
default: '01'
description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
security:
- BasicAuth: []
tags:
- name: Test Campaigns
paths:
/v5/campaigns/test:
post:
operationId: test_campaign_v5
summary: Test Campaign (V5)
description: 'Sends a test Push or Email message to specific users or device identifiers before publishing the campaign.
'
x-mint:
content: 'The endpoint supports two modes:
**Inline mode**
- Send `channel` and `campaign_content` in the request.
- For **EMAIL** campaigns, also include `basic_details` and `connector`.
- Nothing is stored on the server.
**Draft mode**
- Send `draft_id` to load content from a saved **DRAFT**.
- By default, the server sends one test per platform, locale, and variation.
- To narrow the send, use `test_campaign_meta.platform`, `locale_name`, or `variation`.
#### Rate Limits
| Rate Limit Name | Rate Limit |
| :--- | :--- |
| Test campaign per second | The total number of test campaign requests per second per client allowed is 10. |
| Test campaign per minute | The total number of test campaign requests per minute per client allowed is 100. |
| Test campaign per hour | The total number of test campaign requests per hour per client allowed is 6000. |
'
tags:
- Test Campaigns
parameters:
- $ref: '#/components/parameters/MOE-APPKEY'
- $ref: '#/components/parameters/X-MOE-Request-Id'
- $ref: '#/components/parameters/Idempotency-Key-Required'
requestBody:
description: 'Test campaign configuration including content and target test users.
**Note:** Use the tabs below to select your campaign type. The schema will adapt based on the selected channel.'
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TestV5Request'
examples:
push_inline:
summary: Push - Inline
value:
request_id: '{{request_id}}'
channel: PUSH
basic_details:
name: '{{campaign_name}}'
platforms:
- ANDROID
campaign_content:
content:
push:
android:
template_type: BASIC
basic_details:
title: '{{title}}'
message: '{{message}}'
notification_channel: '{{notification_channel}}'
test_campaign_meta:
identifier: USER_ATTRIBUTE_UNIQUE_ID
identifier_values:
- '{{identifier_value}}'
email_inline:
summary: Email - Inline
value:
request_id: '{{request_id}}'
channel: EMAIL
basic_details:
name: '{{campaign_name}}'
content_type: PROMOTIONAL
user_attribute_identifier: Email (Standard)
subscription_category: '{{subscription_category}}'
connector:
connector_type: '{{connector_type}}'
connector_name: '{{connector_name}}'
campaign_content:
content:
email:
subject: '{{email_subject}}'
sender_name: '{{sender_name}}'
preview_text: '{{preview_text}}'
from_address: '{{from_email}}'
reply_to_address: '{{reply_to_address}}'
html_content: '{{html_body}}'
email_editor: Froala Editor
test_campaign_meta:
identifier: EMAIL
identifier_values:
- '{{recipient_email}}'
push_draft:
summary: Push - Draft mode
value:
request_id: '{{request_id}}'
channel: PUSH
draft_id: '{{campaign_id}}'
test_campaign_meta:
identifier: USER_ATTRIBUTE_UNIQUE_ID
identifier_values:
- '{{identifier_value}}'
platform: ANDROID
email_draft:
summary: Email - Draft mode
value:
request_id: '{{request_id}}'
channel: EMAIL
draft_id: '{{campaign_id}}'
test_campaign_meta:
identifier: EMAIL
identifier_values:
- '{{recipient_email}}'
responses:
'200':
description: Test send result
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/V5SuccessEnvelope'
- type: object
properties:
data:
$ref: '#/components/schemas/TestCampaignResultData'
examples:
push_sent:
summary: Push test sent successfully
value:
response_id: abc-701
type: campaign
data:
data:
ANDROID_default_variation_1:
status: SENT
message: Test campaign processed
email_sent:
summary: Email test sent successfully
value:
response_id: abc-702
type: campaign
data:
data:
EMAIL_default_variation_1:
status: SENT
message: Test campaign processed
push_failed:
summary: Push test with one failed send
value:
response_id: abc-702
type: campaign
data:
data:
ANDROID_default_variation_1:
status: FAILED
failure_reason: Invalid push token
message: Test campaign processed
'400':
$ref: '#/components/responses/V5ValidationError'
'401':
$ref: '#/components/responses/V5Unauthorized'
'409':
description: Conflict - the `Idempotency-Key` was already used with a different request body, or a test send is already in progress for this key. Retry with a new `Idempotency-Key`.
content:
application/json:
schema:
$ref: '#/components/schemas/V5ErrorEnvelope'
example:
response_id: abc-701
error:
code: BAD_REQUEST
message: Idempotency-Key reused with a different request body.
details: []
'500':
$ref: '#/components/responses/V5InternalError'
servers:
- url: https://api-{dc}.moengage.com/
description: MoEngage Campaigns API Server
variables:
dc:
default: '01'
description: Data center (DC) segment in the hostname. Replace `OX` with your workspace DC (01–06 or 101). See [Data centers](/api/introduction#data-centers).
/campaigns/test:
post:
operationId: test_campaign
summary: Test Campaign
description: 'This API sends a test Push or Email campaign to specific users or identifiers before launching it to your entire audience. You can only test campaigns created via the API, not campaigns created through the MoEngage dashboard.
'
x-mint:
content: "#### Rate Limits\n\n| Rate Limit Name | Rate Limit |\n| :--- | :--- |\n| Test campaign per second | The total number of test campaign requests per second per client allowed is 10. |\n| Test campaign per minute | The total number of test campaign requests per minute per client allowed is 100. |\n| Test campaign per hour | The total number of test campaign requests per hour per client allowed is 6000. | \n\n<Note>\n **Notes**\n * Breaching the limits will reject the request.\n * Per hour and per day limits will consider the calculation based on the last hour and last 24 hrs respectively.\n</Note>\n"
tags:
- Test Campaigns
parameters:
- $ref: '#/components/parameters/MOE-APPKEY_2'
requestBody:
description: 'Test campaign configuration including content and target test users.
**Note:** Use the tabs below to select your campaign type. The schema will adapt based on the selected channel.'
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignTestRequest'
examples:
push_test_basic:
summary: Push - Test with User ID
value:
request_id: test_push_123
channel: PUSH
basic_details:
name: Flash Sale Push Test
platforms:
- ANDROID
- IOS
platform_specific_details:
android:
push_amp_plus_enabled: true
ios:
send_to_all_eligible_device: true
exclude_provisional_push_devices: false
send_to_only_provisional_push_enabled_devices: false
campaign_content:
content:
push:
android:
template_type: BASIC
basic_details:
notification_channel: general
title: 'Test: Flash Sale!'
message: Testing message content
default_click_action: DEEPLINKING
default_click_action_value: https://example.com/sale
ios:
template_type: BASIC
basic_details:
title: 'Test: Flash Sale!'
message: Testing message content
default_click_action: DEEPLINKING
default_click_action_value: https://example.com/sale
test_campaign_meta:
identifier: USER_ATTRIBUTE_UNIQUE_ID
identifier_values:
- user_12345
email_test_with_personalization:
summary: Email - Test with Personalization
value:
request_id: test_email_456
channel: EMAIL
basic_details:
name: Newsletter Test
content_type: PROMOTIONAL
subscription_category: marketing
user_attribute_identifier: MOE_EMAIL_ID
connector:
connector_type: SENDGRID
connector_name: default
campaign_content:
content:
email:
subject: 'Test: Weekly Newsletter'
preview_text: Testing email content
sender_name: MoEngage Store
from_address: noreply@example.com
reply_to_address: support@example.com
html_content: <!DOCTYPE html><html><body><p>Hi {{UserAttribute['First Name']}},</p><p>Testing personalized content</p></body></html>
personalization_details:
user_attributes:
First Name: John
Last Name: Doe
event_attributes:
Campaign Name: Test Campaign
test_campaign_meta:
identifier: EMAIL
identifier_values:
- john.doe@example.com
- jane.smith@example.com
email_test_locale_variation:
summary: Email - Test with Locale & Variation
value:
request_id: test_email_locale
channel: EMAIL
basic_details:
name: Multi-locale Test
content_type: PROMOTIONAL
subscription_category: marketing
user_attribute_identifier: MOE_EMAIL_ID
connector:
connector_type: SENDGRID
connector_name: default
campaign_content:
locales:
- en-US
- es-ES
- default
content:
en-US:
variation_1:
email:
subject: Test EN
sender_name: Store
from_address: noreply@example.com
reply_to_address: support@example.com
html_content: <html><body>English content</body></html>
test_campaign_meta:
identifier: ID
identifier_values:
- user_001
locale_name: en-US
variation: variation_1
responses:
'200':
description: Test campaign sent successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TestCampaignSuccessResponse'
examples:
success:
summary: Successful Test
value:
data:
user_12345:
status: success
message: Test campaign created successfully
partial_success:
summary: Partial Success
value:
data:
john.doe@example.com:
status: success
jane.smith@example.com:
status: failed
failure_reason: User not found
message: Test campaign created successfully
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
servers:
- url: https://api-{dc}.moengage.com/core-services/v1
description: MoEngage Campaigns API Server
variables:
dc:
default: '01'
description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
/personalization/preview:
post:
operationId: personalized_preview
summary: Personalized Preview
description: "This API shows a preview of personalized content for a specific user before sending a Push, Email, or SMS campaign. This API retrieves personalized message content with all user/event attributes resolved. Use this API to validate your personalization logic and see exactly how content will appear to specific users before launching campaigns. \n"
x-mint:
content: '
#### Personalization Support
- User attributes
- Event attributes
- Custom templates
- Content blocks
- Content APIs
- Product sets
#### Rate Limit
The rate limit is 10,000 requests per minute.
'
tags:
- Test Campaigns
parameters:
- $ref: '#/components/parameters/MOE-APPKEY_2'
- name: data-compression
in: header
required: false
description: 'Whether to pass the payload in compressed format.
Set to `true` to send compressed payload.
'
schema:
type: boolean
example: false
requestBody:
description: Provide personalization preview request with content and user details.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PersonalizedPreviewRequest'
examples:
user_attribute_preview:
summary: Preview with User Attributes
value:
request_id: preview_req_12345
personalization_details:
channel: EMAIL
user_attributes:
Gender: Female
First Name: Jane
personalization_content:
payload:
email_html: <!DOCTYPE html><html><body><p>Hi {{UserAttribute['First Name']}}, your gender is {{UserAttribute['Gender']}}</p></body></html>
user_details:
identifier: ID
identifier_value: USER_001
event_attribute_preview:
summary: Preview with Event Attributes
value:
request_id: preview_req_event
personalization_details:
event_name: App_Opened
channel: EMAIL
user_attributes:
First Name: John
event_attributes:
App_Version: 1.0.2
personalization_content:
payload:
message: Hi {{UserAttribute['First Name']}}, you're using version {{EventAttribute['App_Version']}}
user_details:
identifier: ID
identifier_value: JOHN012
custom_template_preview:
summary: Preview with Custom Template
value:
request_id: preview_req_template
personalization_details:
channel: PUSH
user_attributes:
First Name: John
event_attributes:
App Version: '34232'
personalization_content:
custom_template_data:
template_id: 5b7d04c6-8ddc-4957-80d9-c67266079609
version: '1'
user_details:
identifier: ID
identifier_value: JOHN012
content_block_preview:
summary: Preview with Content Block
value:
request_id: preview_req_cb
personalization_details:
channel: SMS
user_attributes:
First Name: John Doe
personalization_content:
payload:
content_block: '{{ContentBlock[''simple_text_cb'']}}'
user_details:
identifier: ID
identifier_value: JOHN012
product_set_preview:
summary: Preview with Product Set
value:
request_id: preview_req_products
personalization_details:
channel: SMS
personalization_content:
payload:
product_set: '{% if ProductSet.test_prod%}{% for product in ProductSet.test_prod%}{{product.title}} {% endfor %}{% else %}MOE_NOT_SEND{% endif %}'
user_details:
identifier: ID
identifier_value: JOHN012
responses:
'200':
description: Successfully retrieved personalized content preview
content:
application/json:
schema:
$ref: '#/components/schemas/PersonalizedPreviewResponse'
examples:
user_attribute_result:
summary: Personalized User Attributes
value:
personalized_content:
payload:
email_html: <!DOCTYPE html><html><body><p>Hi Jane, your gender is Female</p></body></html>
event_attribute_result:
summary: Personalized Event Attributes
value:
personalized_content:
payload:
message: Hi John, you're using version 1.0.2
custom_template_result:
summary: Custom Template Result
value:
personalized_content:
payload:
data:
- meta_info:
platform:
- ANDROID
template_id: '12356733'
template_name: test_template
channel: PUSH
product_set_result:
summary: Product Set Result
value:
personalized_content:
payload:
product_set: Brown Banana Chocolate Wine Honey Onion Mango Cookies Bread Toffee
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimitExceeded'
'500':
$ref: '#/components/responses/InternalServerError'
servers:
- url: https://api-{dc}.moengage.com/core-services/v1
description: MoEngage Campaigns API Server
variables:
dc:
default: '01'
description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
components:
schemas:
EmailCampaignContent:
type: object
description: 'Email content, locales, and A/B variations.
For full `POST /v5/campaigns` request examples that include `campaign_content`, refer to `campaign_delivery_type` on `EmailCampaignCreateV5Request`, `VariationDetails`, and the Create Campaign Draft code samples.
For Email content variants, including `html_content` versus `custom_template_id`, CC/BCC, attachments, and editor selection (`Froala Editor` versus `Ace Editor`), refer to [Email content](/api/campaigns/campaign-content-reference#email-content).
'
properties:
locales:
type: array
items:
type: string
description: 'Additional locale names for multi-language campaigns. List only the non-default locales here (for example, `"en-US"`, `"es-ES"`). The `"default"` locale is always implicitly present and must not be included in this array.
'
example:
- en-US
- es-ES
variation_details:
$ref: '#/components/schemas/VariationDetails'
content:
type: object
description: 'The campaign message payload. Two shapes are accepted:
- **Flat shape (no locales or variations):** Pass a flat `email` object directly under `content`.
- **Locale-keyed and variation-keyed shape:** Key by locale name, then by variation name: `content[locale_name][variation_name] = { email: { ... } }`. The `"default"` locale key is always required and serves as the fallback. Additional locale keys must match values listed in `locales`.
For runnable payloads for both shapes, refer to [Content payload structure](/api/campaigns/campaign-content-reference#content-payload-structure).
'
properties:
email:
$ref: '#/components/schemas/EmailContent'
additionalProperties:
type: object
description: Variation-keyed content blocks for a single locale.
additionalProperties:
type: object
properties:
email:
$ref: '#/components/schemas/EmailContent'
KeyValuePair:
type: object
description: A custom key-value pair attached to the push payload.
properties:
key:
type: string
description: The key name.
value:
type: string
description: The value.
V5SuccessEnvelope:
type: object
properties:
response_id:
type: string
type:
type: string
example: campaign
data:
type: object
Geofences:
type: object
description: 'Geofence location details for location-triggered campaigns.
**Required** for LOCATION_TRIGGERED campaigns.
For per-`triggered_at` runnable payloads (`ENTRY`, `EXIT`, `dwell`) and the casing distinction between `ENTRY`/`EXIT` (uppercase) and `dwell` (lowercase), refer to [Geofence targeting](/api/campaigns/audience-scheduling-delivery-reference#geofence-targeting).
'
required:
- name
- latitude
- longitude
- radius
- response_time_value
- response_time_granularity
- triggered_at
properties:
name:
type: string
description: The unique name of the geofence location being targeted.
latitude:
type: string
description: The latitude coordinate for the center of the geofence area.
longitude:
type: string
description: The longitude coordinate for the center of the geofence area.
radius:
type: string
description: The radius in meters from the center point that defines the boundary of the geofence.
dwell_time_value:
type: string
description: 'The numeric value for the time to wait before sending the message after the trigger condition is met.
**Required** when triggered_at is set to "dwell".
'
dwell_time_granularity:
type: string
enum:
- MINUTES
- HOURS
- DAYS
description: 'The time unit for the dwell_time_value.
**Required** when triggered_at is set to "dwell".
'
response_time_value:
type: string
description: The numeric value for the time to wait before sending the message after the trigger condition is met.
response_time_granularity:
type: string
enum:
- MINUTES
- HOURS
- DAYS
description: The time unit for the response_time_value.
triggered_at:
type: string
enum:
- ENTRY
- EXIT
- dwell
description: 'The user action that triggers the campaign (when user enters/exits the geofence).
'
AndroidTimer:
type: object
description: 'Timer configuration for Timer and Timer with Progress Bar templates.
**Required for:** TIMER and TIMER_WITH_PROGRESS_BAR templates
'
properties:
timer_ends_at:
type: string
enum:
- DURATION
- SPECIFIC_TIME_USER_TIMEZONE
- SPECIFIC_TIME_CAMPAIGN_TIMEZONE
description: How the timer's endpoint is determined.
specific_time:
type: string
format: date-time
description: 'The specific time when the timer ends.
**Required** when personalized_value is true.
'
time_period:
type: string
description: 'The time period for the timer.
**Required** when timer_ends_at is SPECIFIC_TIME_USER_TIMEZONE or SPECIFIC_TIME_CAMPAIGN_TIMEZONE.
'
personalized_value:
type: boolean
description: 'Whether the timer duration is personalized per user.
If false, all users get the same duration.
'
duration_hour:
type: string
description: 'The number of hours the timer will run for.
**Required** when personalized_value is false.
'
example: '2'
duration_minute:
type: string
description: 'The number of minutes the timer will run for (in addition to hours).
**Required** when personalized_value is false.
'
example: '30'
AndroidTemplateBackup:
type: object
description: 'Fallback notification content for when the template cannot be rendered.
**Required for:** Stylized Basic, Simple Image Carousel, Image Banner with Text, Timer, and Timer with Progress Bar templates
'
properties:
title:
type: string
description: The title for the fallback notification.
message:
type: string
description: The message body for the fallback notification.
summary:
type: string
description: The summary for the fallback notification.
image_url:
type: string
format: uri
description: The URL of an image for the fallback notification.
default_click_action:
type: string
enum:
- DEEPLINKING
- NAVIGATE_TO_A_SCREEN
- RICH_LANDING
description: The default click action for the fallback notification.
default_click_action_value:
type: string
description: The URL or deep link for the fallback's click action.
key_value_pairs:
type: array
items:
$ref: '#/components/schemas/KeyValuePair'
description: Custom key-value pairs specific to the fallback payload.
PushBasicDetailsV5:
type: object
description: 'Identifying metadata for the Push campaign, including name, team, tags, and platform targeting.
For field-by-field rules, conditional requirements, and platform-specific delivery flags (Android `push_amp_plus_enabled`, iOS provisional-push audience flags), refer to [Push campaign metadata](/api/campaigns/campaign-content-reference#push-campaign-metadata).
'
properties:
name:
type: string
description: The name of the campaign.
example: Summer Sale Push Notification
business_event:
type: string
description: 'The business event to be mapped to the campaign.
**Required** for BUSINESS_EVENT_TRIGGERED campaigns.
'
example: user_signup
tags:
typ
# --- truncated at 32 KB (149 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/moengage/refs/heads/main/openapi/moengage-test-campaigns-api-openapi.yml