Skip to main content
POST
/
v5
/
campaigns
/
{campaign_id}
/
validate
Validate Campaign
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 'X-MOE-Request-Id: <x-moe-request-id>' \
  --data '
{
  "request_id": "{{request_id}}"
}
'
{
  "response_id": "abc-501",
  "type": "campaign",
  "data": {
    "valid": true
  }
}
You do not need an idempotency key for this endpoint.

Rate Limits

Rate Limit NameRate Limit
Validate campaign per secondThe total number of validate campaign requests per second per client allowed is 10.
Validate campaign per minuteThe total number of validate campaign requests per minute per client allowed is 100.
Validate campaign per hourThe total number of validate campaign requests per hour per client allowed is 6000.

Authorizations

Authorization
string
header
required

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 SettingsAccountAPI 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

X-MOE-Tenant-ID
string

Workspace tenant ID. Set this to the workspace (App) ID from Settings > Account > APIs > Workspace ID.

This header is optional. When omitted, the API resolves the workspace from the Basic Auth credentials in the Authorization header.

In the V1 Campaigns API, the workspace ID was passed via the MOE-APPKEY request header. In V5, this header is renamed to X-MOE-Tenant-ID.

X-MOE-Request-Id
string
required

Correlates with response_id. Supply this header or request_id in the body; if both are set, they must match.

Path Parameters

campaign_id
string
required

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

Body

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.

Example:

"{{request_id}}"

Response

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

response_id
string
type
string
Example:

"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).