import { Resend } from 'resend';

const resend = new Resend('re_123456789');

resend.domains.update({
  id: 'b8617ad3-b712-41d9-81a0-f7c3d879314e',
  openTracking: false,
  clickTracking: true,
  tls: 'enforced',
});
{
  "object": "domain",
  "id": "b8617ad3-b712-41d9-81a0-f7c3d879314e"
}

Path Parameters

domain_id
string
required

The Domain ID.

Body Parameters

click_tracking
boolean

Track clicks within the body of each HTML email.

open_tracking
boolean

Track the open rate of each email.

tls
string
default: "opportunistic"
  • opportunistic: Opportunistic TLS means that it always attempts to make a secure connection to the receiving mail server. If it can’t establish a secure connection, it sends the message unencrypted.

  • enforced: Enforced TLS on the other hand, requires that the email communication must use TLS no matter what. If the receiving server does not support TLS, the email will not be sent.

import { Resend } from 'resend';

const resend = new Resend('re_123456789');

resend.domains.update({
  id: 'b8617ad3-b712-41d9-81a0-f7c3d879314e',
  openTracking: false,
  clickTracking: true,
  tls: 'enforced',
});
{
  "object": "domain",
  "id": "b8617ad3-b712-41d9-81a0-f7c3d879314e"
}