Reschedule a scheduled email message
Moves an existing scheduled email to a new future send time. Only the delivery time (scheduled_at) changes; the message ID, content, recipients, tags, and metadata remain unchanged. Returns 409 Conflict if the message is no longer scheduled or its scheduled-send worker has already started processing it. This route emits no dedicated rescheduled event.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.emailMessages.updateSchedule('email_id', {
scheduled_at: 'scheduled_at',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.email_messages.update_schedule(
email_id="email_id",
scheduled_at="scheduled_at",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.EmailMessages.UpdateSchedule(
context.TODO(),
"email_id",
telnyx.EmailMessageUpdateScheduleParams{
ScheduledAt: "scheduled_at",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.emailMessages.EmailMessageUpdateScheduleParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
EmailMessageUpdateScheduleParams params = EmailMessageUpdateScheduleParams.builder()
.scheduledAt("scheduled_at")
.build();
var response = client.emailMessages().updateSchedule("email_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email_messages.update_schedule("email_id", scheduled_at: "scheduled_at")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->emailMessages->updateSchedule(
'email_id',
scheduled_at: 'scheduled_at',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-messages update-schedule \
--api-key 'My API Key' \
--email-id email_id \
--scheduled-at scheduled_atcurl --request PATCH \
--url https://api.telnyx.com/v2/email_messages/{email_id}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_at": "2099-08-07T14:30:00Z"
}
'{
"data": {
"record_type": "email_message",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"from": {
"email": "<string>",
"name": "<string>"
},
"to": [
{
"email": "<string>",
"name": "<string>"
}
],
"cc": [
{
"email": "<string>",
"name": "<string>"
}
],
"bcc": [
{
"email": "<string>",
"name": "<string>"
}
],
"reply_to": "<string>",
"subject": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_variables": {},
"tags": [],
"metadata": {},
"attachments": [
{
"url": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"filename": "<string>",
"content_type": "<string>",
"disposition": "attachment",
"content_id": "<string>"
}
],
"events": [
{
"type": "queued",
"occurred_at": "2023-11-07T05:31:56Z",
"payload": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"text_body": "<string>",
"html_body": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"inline_css": true,
"sandbox": true,
"recipient_statuses": {
"delivered": 998,
"bounced": 2
},
"suppressed": [
{
"to": "jsmith@example.com",
"reason": "<string>",
"scope": "<string>",
"override_allowed": true
}
]
}
}{
"errors": [
{
"code": "10006",
"title": "Not authorized",
"detail": "Invalid API key",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10006"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested resource was not found"
}
]
}{
"errors": [
{
"code": "10001",
"title": "<string>",
"detail": "<string>",
"source": {},
"meta": {}
}
],
"suppressed": [
{
"to": "jsmith@example.com",
"reason": "<string>",
"scope": "<string>",
"override_allowed": true
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "scheduled_at must be in the future",
"source": {
"pointer": "/data/attributes/scheduled_at"
}
}
]
}Authorizations
Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.
Path Parameters
Email message UUID.
Body
Provide a future delivery time. The timestamp in this example is illustrative; replace it with a value that is in the future when making a request.
Only the delivery time is mutable; any other request fields are ignored.
New ISO 8601 delivery time. Must be strictly in the future.
Response
Scheduled email rescheduled. The response matches the single-message GET representation.
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.emailMessages.updateSchedule('email_id', {
scheduled_at: 'scheduled_at',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.email_messages.update_schedule(
email_id="email_id",
scheduled_at="scheduled_at",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.EmailMessages.UpdateSchedule(
context.TODO(),
"email_id",
telnyx.EmailMessageUpdateScheduleParams{
ScheduledAt: "scheduled_at",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.emailMessages.EmailMessageUpdateScheduleParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
EmailMessageUpdateScheduleParams params = EmailMessageUpdateScheduleParams.builder()
.scheduledAt("scheduled_at")
.build();
var response = client.emailMessages().updateSchedule("email_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email_messages.update_schedule("email_id", scheduled_at: "scheduled_at")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->emailMessages->updateSchedule(
'email_id',
scheduled_at: 'scheduled_at',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-messages update-schedule \
--api-key 'My API Key' \
--email-id email_id \
--scheduled-at scheduled_atcurl --request PATCH \
--url https://api.telnyx.com/v2/email_messages/{email_id}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_at": "2099-08-07T14:30:00Z"
}
'{
"data": {
"record_type": "email_message",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"from": {
"email": "<string>",
"name": "<string>"
},
"to": [
{
"email": "<string>",
"name": "<string>"
}
],
"cc": [
{
"email": "<string>",
"name": "<string>"
}
],
"bcc": [
{
"email": "<string>",
"name": "<string>"
}
],
"reply_to": "<string>",
"subject": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_variables": {},
"tags": [],
"metadata": {},
"attachments": [
{
"url": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"filename": "<string>",
"content_type": "<string>",
"disposition": "attachment",
"content_id": "<string>"
}
],
"events": [
{
"type": "queued",
"occurred_at": "2023-11-07T05:31:56Z",
"payload": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"text_body": "<string>",
"html_body": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"inline_css": true,
"sandbox": true,
"recipient_statuses": {
"delivered": 998,
"bounced": 2
},
"suppressed": [
{
"to": "jsmith@example.com",
"reason": "<string>",
"scope": "<string>",
"override_allowed": true
}
]
}
}{
"errors": [
{
"code": "10006",
"title": "Not authorized",
"detail": "Invalid API key",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10006"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested resource was not found"
}
]
}{
"errors": [
{
"code": "10001",
"title": "<string>",
"detail": "<string>",
"source": {},
"meta": {}
}
],
"suppressed": [
{
"to": "jsmith@example.com",
"reason": "<string>",
"scope": "<string>",
"override_allowed": true
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "scheduled_at must be in the future",
"source": {
"pointer": "/data/attributes/scheduled_at"
}
}
]
}