Module: Resend::Domains::Claims
- Defined in:
- lib/resend/domains/claims.rb
Overview
Domain Claims API wrapper
Class Method Summary collapse
-
.create(params) ⇒ Object
Start a claim for a domain that another Resend account has already verified.
-
.get(domain_id = "") ⇒ Object
Retrieve the latest claim for the placeholder domain created by the claim.
-
.verify(domain_id = "") ⇒ Object
Trigger asynchronous DNS verification and ownership transfer for a domain claim.
Class Method Details
.create(params) ⇒ Object
Start a claim for a domain that another Resend account has already verified. The domain is recreated under your account with fresh DKIM keys, so the previous account's DNS records cannot be reused. Returns a TXT record to add to your DNS to prove ownership. Uses the same request body as creating a domain.
24 25 26 27 |
# File 'lib/resend/domains/claims.rb', line 24 def create(params) path = "domains/claim" Resend::Request.new(path, params, "post").perform end |
.get(domain_id = "") ⇒ Object
Retrieve the latest claim for the placeholder domain created by the claim.
https://resend.com/docs/api-reference/domains/get-domain-claim
35 36 37 38 |
# File 'lib/resend/domains/claims.rb', line 35 def get(domain_id = "") path = "domains/#{domain_id}/claim" Resend::Request.new(path, {}, "get").perform end |
.verify(domain_id = "") ⇒ Object
Trigger asynchronous DNS verification and ownership transfer for a domain claim.
The claim stays 'pending' while verification runs; poll get for status. Once
'completed', the transferred domain has new DKIM records that must be added to
DNS and verified via Resend::Domains.verify.
https://resend.com/docs/api-reference/domains/verify-domain-claim
49 50 51 52 |
# File 'lib/resend/domains/claims.rb', line 49 def verify(domain_id = "") path = "domains/#{domain_id}/claim/verify" Resend::Request.new(path, {}, "post").perform end |