curl --request POST \
--url https://api-{dc}.moengage.com/v5/campaigns/{campaign_id}/validate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--header 'X-MOE-Request-Id: <x-moe-request-id>' \
--data '
{
"request_id": "{{request_id}}"
}
'{
"response_id": "abc-501",
"type": "campaign",
"data": {
"valid": true
}
}Runs full publish-time validation (DRAFT_PUBLISH) on a saved draft without mutating it. Returns valid: true if the campaign would pass, or a list of blocking errors if it would not.
All campaign data is read from the saved draft identified by campaign_id in the path. There is no channel-specific payload.
curl --request POST \
--url https://api-{dc}.moengage.com/v5/campaigns/{campaign_id}/validate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--header 'X-MOE-Request-Id: <x-moe-request-id>' \
--data '
{
"request_id": "{{request_id}}"
}
'{
"response_id": "abc-501",
"type": "campaign",
"data": {
"valid": true
}
}Validation Modes
The V5 API applies validation in two modes:| Mode | Triggered by | Strictness |
|---|---|---|
| Lenient | Draft create (POST /v5/campaigns) and component patch (PATCH /v5/campaigns/{id}) | Partial — individual components are validated in isolation as they are written |
Full (DRAFT_PUBLISH) | POST /v5/campaigns/{id}/validate and publish | Strict — all components are validated together as a complete, publish-ready campaign |
DRAFT_PUBLISH failures before triggering a publish.
Validation Failures
All validation failures are blocking. There is no warning or non-blocking tier. A campaign that fails validation returnsvalid: false with a list of field-level errors. Each error identifies the field path and the issue.
Channel-Specific Rules
The following rules are enforced atDRAFT_PUBLISH for each channel:
Push
campaign_contentmust be present and include content for all platforms listed inbasic_details.platforms.template_typemust be valid for the target platform (Android, iOS, Web).- Platform-specific required fields (for example,
titleandmessagefor Android basic templates) must be non-empty.
connector.connector_typeandconnector.connector_namemust be present and match a connector configured in your workspace.basic_details.from_addressmust be set and match a verified sender in the configured connector.basic_details.subscription_categorymust be present forPROMOTIONALcontent type.campaign_contentmust include at least one variation with a non-emptysubjectandhtml_content.
Delivery-Type-Specific Rules
The following rules are enforced atDRAFT_PUBLISH based on campaign_delivery_type:
| Delivery Type | Additional Requirements |
|---|---|
ONE_TIME, PERIODIC | scheduling_details must be present. |
AT_FIXED_TIME scheduling | scheduling_details.timezone must be present. |
PERIODIC | scheduling_details.periodic_details must be present with a valid sending_frequency. |
EVENT_TRIGGERED | trigger_condition must be present with at least one included_filters entry. |
DEVICE_TRIGGERED | trigger_condition must be present. Trigger delay fields (trigger_delay_type, trigger_delay_value, trigger_delay_granularity) must not be set — they are only valid for EVENT_TRIGGERED. |
BUSINESS_EVENT_TRIGGERED | basic_details.business_event must be present. |
LOCATION_TRIGGERED | basic_details.geofences must contain at least one valid geofence entry. |
Rate Limits
| Rate Limit Name | Rate Limit |
|---|---|
| Validate campaign per second | The total number of validate campaign requests per second per client allowed is 10. |
| Validate campaign per minute | The total number of validate campaign requests per minute per client allowed is 100. |
| Validate campaign per hour | The total number of validate campaign requests per hour per client allowed is 6000. |
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: On your MoEngage workspace, navigate to Settings → Account → API keys and click Create new key. The tab lists every API surface (Data, Segmentation, Push, Email, Campaigns, Templates, and more) and exposes per-resource actions. For Campaigns, ensure the View, Create & Manage, and Create, Manage & Publish checkboxes are selected.
For more information on authentication and getting your credentials, refer to Getting your credentials.
Send the value in the Authorization header as Basic followed by Base64-encoding of appkey:apisecret (workspace ID and API key).
Headers
Your MoEngage Workspace ID (App ID). Find it in the dashboard at Settings > Account > APIs > Workspace ID.
Correlates with response_id. Supply this header or request_id in the body; if both are set, they must match.
Path Parameters
Raw 24-char ObjectId of the campaign to validate. Use the id value returned in the Create Campaign response.
Body
Optional string (UUID v4 recommended) used to identify this validation call. Unlike other POST endpoints, this field is not required and does not enforce deduplication - the validate endpoint is read-only and safe to retry freely.
"{{request_id}}"
Response
Validation result - always returned regardless of whether the campaign passes or fails validation.
Was this page helpful?