Reschedule a batch
Move every still-scheduled email in the batch to a new scheduled_at. Content stays immutable; already-sent or already-canceled members are skipped, not errored. An unknown or empty batch is a no-op (rescheduled_count 0), not a 404.
curl --request PATCH \
--url https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_at": "2026-08-22T09:00:00+02:00"
}
'import requests
url = "https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}"
payload = { "scheduled_at": "2026-08-22T09:00:00+02:00" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scheduled_at: '2026-08-22T09:00:00+02:00'})
};
fetch('https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scheduled_at' => '2026-08-22T09:00:00+02:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}"
payload := strings.NewReader("{\n \"scheduled_at\": \"2026-08-22T09:00:00+02:00\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scheduled_at\": \"2026-08-22T09:00:00+02:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduled_at\": \"2026-08-22T09:00:00+02:00\"\n}"
response = http.request(request)
puts response.read_body{
"object": "scheduled_email.batch",
"batch_id": "campaign-x",
"rescheduled_count": 40,
"scheduled_at": "2026-08-22T07:00:00Z"
}{
"name": "missing_user_agent",
"message": "A User-Agent header is required.",
"statusCode": 400
}{
"name": "invalid_api_key",
"message": "API key is invalid.",
"statusCode": 403
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "invalid_idempotent_request",
"message": "This Idempotency-Key was already used with a different payload.",
"statusCode": 409
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "rate_limit_exceeded",
"message": "Too many requests. Please slow down.",
"statusCode": 429
}{
"name": "application_error",
"message": "An unexpected error occurred.",
"statusCode": 500
}Authorizations
An API key created in the dashboard, sent as Authorization: Bearer mk_....
Headers
A unique key making this write retry-safe. A repeat request with the same key and a byte-identical body returns the original response instead of executing again (24-hour window). Max 256 characters. See Idempotency.
256Path Parameters
The batch grouping label shared by the scheduled emails to act on.
64Body
The body for a reschedule (single or batch). Only timing may change; no content field is accepted.
Response
The batch reschedule result.
The result of a batch cancel or reschedule. canceled_count is present for a cancel; rescheduled_count and scheduled_at for a reschedule.
Always scheduled_email.batch.
"scheduled_email.batch"The batch that was acted on.
Number of emails canceled (batch cancel only).
Number of emails rescheduled (batch reschedule only).
The new send time applied to the batch (batch reschedule only), in UTC.
curl --request PATCH \
--url https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_at": "2026-08-22T09:00:00+02:00"
}
'import requests
url = "https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}"
payload = { "scheduled_at": "2026-08-22T09:00:00+02:00" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scheduled_at: '2026-08-22T09:00:00+02:00'})
};
fetch('https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scheduled_at' => '2026-08-22T09:00:00+02:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}"
payload := strings.NewReader("{\n \"scheduled_at\": \"2026-08-22T09:00:00+02:00\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scheduled_at\": \"2026-08-22T09:00:00+02:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailkube.com/mta/v1/scheduled-emails/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduled_at\": \"2026-08-22T09:00:00+02:00\"\n}"
response = http.request(request)
puts response.read_body{
"object": "scheduled_email.batch",
"batch_id": "campaign-x",
"rescheduled_count": 40,
"scheduled_at": "2026-08-22T07:00:00Z"
}{
"name": "missing_user_agent",
"message": "A User-Agent header is required.",
"statusCode": 400
}{
"name": "invalid_api_key",
"message": "API key is invalid.",
"statusCode": 403
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "invalid_idempotent_request",
"message": "This Idempotency-Key was already used with a different payload.",
"statusCode": 409
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "validation_error",
"message": "<string>",
"statusCode": 123
}{
"name": "rate_limit_exceeded",
"message": "Too many requests. Please slow down.",
"statusCode": 429
}{
"name": "application_error",
"message": "An unexpected error occurred.",
"statusCode": 500
}