Skip to main content
Email headers are typically hidden from the end user but are crucial for deliverability. They include information about the sender, receiver, timestamp, and more. Resend SDKs already include all the necessary headers for you, but you can also add your own custom headers. This can be useful for advanced use cases:
  • Prevent threading on Gmail with the X-Entity-Ref-ID header (Example)
  • Include a shortcut for users to unsubscribe with the List-Unsubscribe header
  • Add missing identification headers such as the User-Agent header when sending direct HTTP requests to the Resend API

Add custom headers

Add custom headers to your emails in the headers object:

Avoid 403 error code 1010 with the User-Agent header

If you’re using a Resend SDK or tools like curl, the required User-Agent header is already included automatically. However, direct HTTP requests made without an SDK may require you to add a User-Agent header to avoid a 403 error with error code 1010 (Access denied): Example with Node.js fetch: