Skip to main content
PATCH
/
domains
/
:domain_id
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await 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

Body Parameters

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.
capabilities
object
Update the domain capabilities for sending and receiving emails. You can specify one or both fields. Omitted fields will keep their current value. At least one capability must remain enabled.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

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