This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Pauses a scheduled campaign.
Learn more about market campaign scheduling.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function pauseScheduling(campaignId: string): Promise<void>;
Campaign ID.
import { campaigns } from "wix-email-marketing.v2";
// Sample campaignId = "ea46013c-bbbf-4617-ad5d-9247bc4c0970";
export async function myPauseSchedulingFunction(campaignId) {
try {
const result = campaigns.pauseScheduling(campaignId);
console.log(`Success! Your campaign id: ${campaignId} has been paused.`);
return result;
} catch (error) {
console.error(error);
}
}
/* Promise returns void */
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.