Update Click/Open Tracking via API

Manage the entire lifecycle of your domains programmatically.

Bu KinoshitaBu Kinoshita

Many teams use Resend to empower their customers to send emails with their own domains. They can add domains, retrieve, verify, list, and delete them using the Resend API. However, until now, the only way to update click and open tracking settings for a domain was through the Resend dashboard.

Today, we're excited to announce that you can now update click and open tracking settings for a domain using the Resend API.

Updating Domains via API

You can use the various Resend SDKs, including Python, Ruby, PHP, Go, and Java to update click/open tracking.

Here's an example using the Node.js SDK:

import { Resend } from 'resend';
const resend = new Resend('re_123456789');
await resend.domains.update({
id: 'b8617ad3-b712-41d9-81a0-f7c3d879314e',
openTracking: false,
clickTracking: true,

You can also use the REST API directly.

The endpoint is available at PATCH /domains/:domain_id, and it accepts both click_tracking and open_tracking parameters.

curl -X PATCH 'https://api.resend.com/domains/b8617ad3-b712-41d9-81a0-f7c3d879314e' \
-H 'Authorization: Bearer re_123456789' \
-H 'Content-Type: application/json' \
-d $'{
"open_tracking": false,
"click_tracking": true

Check the Resend OpenAPI spec or the Postman collection for additional details.

Get started

Go to the documentation to learn more about managing domains via the API.