Skip to content

Schedule send

Specify a date and time when the campaign should be sent.

HTTP method: POST

https://api.sender.net/v2/campaigns/{id}/schedule


ParameterTypeDescription
idstring requiredCampaign ID
schedule_timedate_format:Y-m-d H:i:s requiredThe value must be a valid date in the format (Y-m-d H:i:s).

const url = new URL("https://api.sender.net/v2/campaigns/{id}/schedule");
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let bodyContent = {
"schedule_time": "2022-05-29 08:22:41"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(bodyContent)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Example Response
{
"success": true,
"message": "Success scheduled"
}