{
"error": {
"code": "400 Bad Request",
"message": "request_id key is mandatory field",
"target": "request_id",
"details": [
{
"target": "request_id",
"message": "request_id key is mandatory field"
}
],
"request_id": "11"
}
}{
"error": {
"code": "401 Authentication error",
"message": "Authentication required",
"details": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": "Invalid APP_SECRET_KEY is provided."
}
]
}
],
"request_id": ""
}
}{
"error": {
"code": "500 Internal Server Error",
"message": "Something went wrong. Please contact Moengage team",
"target": "string",
"details": [
{
"message": "Expecting value: line 1 column 1 (char 0)",
"target": ""
}
]
}
}Change Campaign Status
Updates the status of campaigns to stop, pause, or resume them.
{
"error": {
"code": "400 Bad Request",
"message": "request_id key is mandatory field",
"target": "request_id",
"details": [
{
"target": "request_id",
"message": "request_id key is mandatory field"
}
],
"request_id": "11"
}
}{
"error": {
"code": "401 Authentication error",
"message": "Authentication required",
"details": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": "Invalid APP_SECRET_KEY is provided."
}
]
}
],
"request_id": ""
}
}{
"error": {
"code": "500 Internal Server Error",
"message": "Something went wrong. Please contact Moengage team",
"target": "string",
"details": [
{
"message": "Expecting value: line 1 column 1 (char 0)",
"target": ""
}
]
}
}- STOP: Stop a scheduled One-time campaign
- PAUSE: Pause a running Periodic or Event-triggered campaign
- RESUME: Resume a paused Periodic or Event-triggered campaign
- Email: Pause and resume Periodic or Event-triggered campaigns
- Push: Pause and resume the following campaign types:
- Periodic
- Event-triggered
- Device-triggered
- Location-triggered
- You can only change the status of campaigns created via the API (not Dashboard-created campaigns)
- Maximum 10 campaign IDs can be processed per request
- STOP action only works for scheduled One-time campaigns
- Once a One-time campaign moves to Active state, it cannot be stopped
- STOP: Only for scheduled One-time campaigns
- PAUSE: Only for Periodic and Event-triggered campaigns
- RESUME: Only for paused Periodic and Event-triggered campaigns
- Periodic campaigns do NOT support STOP action
Authorizations
Authentication is done via Basic Auth. The username is your Workspace ID (earlier APP ID) and the password is your API Key. The value is a base64 encoding of 'username:password'.
How to obtain credentials:
- Navigate to Settings → Account → APIs in the MoEngage Dashboard
- Username: Copy the Workspace ID (earlier app id)
- Password: Copy the API key from the Campaign report/Business events/Custom templates tile
Headers
This is the workspace ID (earlier APP ID) of your MoEngage workspace.
You can find your MoEngage Workspace ID in the MoEngage Dashboard: Settings → Account → APIs → Workspace ID (earlier app id)
Body
Campaign status change request with action and campaign IDs.
Request to change the status of one or more campaigns.
A unique identifier for this status change request.
"status_change_12345"
The action to perform on the campaign(s).
- STOP: Stop a scheduled One-time campaign (cannot be used for Periodic campaigns)
- PAUSE: Pause a running Periodic or Event-triggered campaign
- RESUME: Resume a paused Periodic or Event-triggered campaign
STOP, PAUSE, RESUME Array of campaign IDs whose status you want to change.
Maximum: 10 campaign IDs per request
1 - 10 elements["camp_abc123", "camp_def456"]
Response
Campaign status changed successfully. No content returned.
For a successful 200 response, the API does not return any content.
Was this page helpful?