Run a Campaign

Use this endpoint to conduct a campaign in Engage.

Note: A campaign can only be run via API if it is in Published status.

Endpoint and Methods

POST /_rest/v2/campaigns/:id/action

Parameters

  • Campaign Id

Body

Required field:

  • action

Sample Request

Copy
{
“action”: “run”
}

Sample Responses

Code 200 Response

Response code 200 returns a boolean value of true indicating that the campaign is running or has run.

Copy
true

Code 401 Response

Response code 401 returns an error that the authorization token is invalid.

Copy
{
"message": "string",
"status": 401
}

Code 404 Response

Response code 404 returns a message that the campaign id is incorrect.

 

Code 422 Response

Response code 422 returns a message that the action field is missing, empty, or invalid.

Copy
{
"message": "The 'action' parameter is required",
"status": 422
}

Code 500 Response

Response code 500 returns an error when trying to run the campaign, or the campaign is not published yet and in Draft status.

Copy
{
"message": "Something went wrong when trying to run the campaign",
"status": 500
}