Your agent can now move a domain to Resend Forge through the MCP server, the CLI, or the API.
In October, we launched Resend Forge, the email infrastructure Resend runs on its own IPs, built for speed and deliverability. Until now, the only way to activate it was from the dashboard.
Today, your agent can activate Resend Forge on a domain. It works through the MCP server, the CLI, and the API, so you can also run it from your own code or scripts.
Connect your agent to the Resend MCP server, then paste this prompt. Replace example.com with your domain.
Activate Resend Forge on my domain example.com.1. Find the domain ID with list-domains.2. Call enable-forge for that domain.3. Show me the Forge CNAME record from the response, and the Receiving MX record if there is one, so I can add them at my DNS provider. Wait until I confirm.4. Call verify-domain with scope ["forge"], then poll get-domain until the Forge CNAME record shows "verified". For a receive-only domain, there is no Forge CNAME, so poll until the Receiving MX record shows "verified".If the API returns forge_unavailable, tell me the reason and stop.
Your agent can't edit your DNS, so you still add the records. Everything else is handled for you.
Activating a domain lets Resend move it to Forge with no code changes on your part.
Sending continues
Sending keeps going through the current records while the Forge record verifies. After the record and DKIM show verified, the domain shows a Ready tag.
Smart migration
To keep your deliverability high, Resend slowly moves your sending over to Forge in the background. Once we've moved all of your sending over, the tag changes to Active once email routes through Forge.
How the domain moves depends on your setup:
MX record with the new value from the API response.Receiving MX record and no Forge CNAME, and custom_return_path is ignored.Call POST /domains/:id/forge. The response is the full domain. For a sending domain, records includes a new Forge CNAME. For a receive-only domain, there is no Forge CNAME, and the response has the new Receiving MX record instead. Calling the endpoint again returns the domain's current state.
Optionally pass custom_return_path to choose the Forge return path label. Leave it out and Resend picks a free label in your DNS.
import { Resend } from 'resend';const resend = new Resend('re_xxxxxxxxx');const { data, error } = await resend.domains.forge.enable({id: 'd91cd9bd-1176-453e-8fc1-35364d380206',});
Create the CNAME at your DNS provider. Your existing records stay in place.
{"record": "SPF","name": "forge","value": "send.forge.rmta.net","type": "CNAME","status": "pending","ttl": "Auto"}
If the domain also receives email, the response includes a Receiving MX record with a new value. Replace your current MX record with it when you're ready to move receiving.
Call POST /domains/:id/verify with scope: ["forge"]. Only the Forge record is checked, and already verified records stay verified.
import { Resend } from 'resend';const resend = new Resend('re_xxxxxxxxx');const { data, error } = await resend.domains.verify('d91cd9bd-1176-453e-8fc1-35364d380206', {scope: ['forge'],});
Poll GET /domains/:id until the Forge record's status is verified. If receiving moved, wait for the Receiving MX record to show verified too.
Forge verification is complete when the Forge CNAME record in records shows verified:
{"record": "SPF","name": "forge","value": "send.forge.rmta.net","type": "CNAME","status": "verified","ttl": "Auto"}
Any domain can activate Forge, including receive-only domains, with no changes to your code, SMTP credentials, or webhooks. A few domains get a forge_unavailable error instead:
We're committed to a headless dashboard so that you can perform every key task programmatically. If you run an agency, a CMS, or otherwise manage DNS records for your customers, you can now activate Resend Forge on each of their domains from your own code.
To learn more, check out the Activate Forge API reference and the Resend Forge documentation.