feat(domains): add the Forge endpoints
LU
18h ago+76+76+01234567890123456789-1-1-0123456789
Adds the Forge domain surface to the spec, matching the folded public-api implementation.
Endpoints
POST /domains/{domain_id}/forge(domains/enable-forge): puts a domain's sending on Forge and returns the DNS record Forge needs. Add the record, call the verify domain endpoint withscope: ["forge"], then poll the retrieve domain endpoint until the Forge record'sstatusisverified. Idempotent: calling it again just returns the current state. Optionalreturn_pathbody field (when omitted, the API picks a label that is free in the domain's DNS) and a documentedIdempotency-Keyheader. Returns the full domain response (Domain). Receive-only domains, dedicated IPs, and legacy DKIM getforge_unavailable(noted in the description; the spec documents only success responses, like its neighbors).POST /domains/{domain_id}/verifygained an optional request body (VerifyDomainOptions):scope, an array of strings whose only value isforge. Scoped, only the Forge record is checked and the other records stay verified; requires Forge to be enabled, otherwiseforge_not_enabled. Omitted, all records are checked, exactly as before.PATCH /domains/{domain_id}(UpdateDomainOptions) gained an optionalforge_return_path: moves the Forge return path while the Forge record is still verifying; a verified record, a legacy-path collision, or a host that already has DNS records getsreturn_path_unavailable. Moving does not start verification: fetch the new record, add DNS, verify withscope: ["forge"].- There is no standalone
PATCH /domains/{domain_id}/forgeorPOST /domains/{domain_id}/forge/verify: those endpoints were removed from the API before shipping.
Schema changes
EnableForgeRequest(return_path: 2-63 chars, pattern^[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$), newVerifyDomainOptions(scope), andforge_return_pathonUpdateDomainOptionswith the same constraints asreturn_path.
Validation
yq eval . resend.yamlparses.npx @redocly/cli lint resend.yaml: valid, 0 errors, 185 warnings (main has 184; the one added warning is theoperation-4xx-responserule every neighboring operation already triggers).
Part of DEV-2470.
The Forge enable endpoint is live in production; the scoped verify and forge_return_path land with the API reshape, which deploys before this ships.
Domain response schemas are unchanged: Forge state is read from the Forge CNAME record in the records array, and verification is explicit via the verify endpoint.