メインコンテンツへスキップ
POST
Validate Campaign (V5)
You do not need an idempotency key for this endpoint. The validate endpoint is read-only and safe to retry freely.
API_TRIGGERED campaigns: validation covers the components a shell supports, which are basic_details, campaign_content, connector, control_group_details, conversion_goal_details, utm_params, and the two supported delivery_controls flags.Audience and schedule are not validated. A shell stores an All Users audience that you do not configure, and it has no schedule, so the audience and scheduling rules that apply to other delivery types are not evaluated. Unsupported components never reach validation, because MoEngage rejects them with 400 at create or patch time rather than saving them to the draft. Refer to API-triggered campaigns.

Validation Modes

The V5 API applies validation in two modes: Use this endpoint to catch 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 returns valid: 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 at DRAFT_PUBLISH for each channel: Push
  • campaign_content must be present and include content for all platforms listed in basic_details.platforms.
  • template_type must be valid for the target platform (Android, iOS, Web).
  • Platform-specific required fields (for example, title and message for Android basic templates) must be non-empty.
Email
  • connector.connector_type and connector.connector_name must be present and match a connector configured in your workspace.
  • basic_details.from_address must be set and match a verified sender in the configured connector.
  • basic_details.subscription_category must be present for PROMOTIONAL content type.
  • campaign_content must include at least one variation with a non-empty subject and html_content.

Delivery-Type-Specific Rules

The following rules are enforced at DRAFT_PUBLISH based on campaign_delivery_type:

Rate Limits

承認

Authorization
string
header
必須

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). Find it in the MoEngage dashboard at Settings > Account > API keys.
  • Password: Use an API key from Settings > Account > API keys.

Refer to API Key Dashboard for details on creating and managing API keys.

ヘッダー

MOE-APPKEY
string

Your MoEngage Workspace ID (App ID). Optional — Basic Auth already carries the Workspace ID as the username, so this header is not required. Find it in the dashboard at Settings > Account > API keys.

X-MOE-Request-Id
string

Client-supplied trace ID. The server echoes it in the X-MOE-Request-Id response header and in response_id. If you omit it, the server generates one.

パスパラメータ

campaign_id
string
必須

Raw 24-char ObjectId of the campaign to validate. Use the id value returned in the Create Campaign response.

ボディ

application/json
request_id
string

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}}"

レスポンス

Validation result - always returned regardless of whether the campaign passes or fails validation.

response_id
string
type
string
例:

"campaign"

data
object
  • When valid is true, only valid is returned.
  • When valid is false, errors lists one or more field-level issues found during publish-time validation (DRAFT_PUBLISH).