Menu

Domain Authentication

An authenticated domain allows you to remove the “via” or “sent on behalf of” message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will get 2 TXT records and 1 MX record.

Domain Authentication was formerly called "Domain Whitelabel".

For more information, please see How to set up domain authentication.

Validate a domain authentication.

Validate a domain authentication.

POST /whitelabel/domains/{id}/validate

This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.

Authentication

  • API Key

Headers

Authorization
string
default: Bearer <<YOUR_API_KEY_HERE>>
required
on-behalf-of
string
default: The subuser's username. This header generates the API call as if the subuser account was making the call.

Path Parameters

id
integer

ID of the domain to validate.

default: None
required

Responses

object
id
integer

The ID of the authenticated domain.

valid
boolean

Indicates if this is a valid authenticated domain.

validation_results
object

The individual DNS records that are checked when validating, including the reason for any invalid DNS records.

mail_cname
object

The CNAME record for the authenticated domain.

valid
boolean

Indicates if this DNS record is valid.

reason
string or null

The reason this record is invalid.

dkim1
object

A DNS record for this authenticated domain.

valid
boolean

Indicates if the DNS record is valid.

reason
string or null
dkim2
object

A DNS record for this authenticated domain.

valid
boolean

Indicates if the DNS record is valid.

reason
string or null
spf
object

The SPF record for the authenticated domain.

valid
boolean

Indicates if the SPF record is valid.

reason
string or null
object
errors
array[object]
message
string

A message explaining the reason for the error.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the SendGrid tag on Stack Overflow.

Thank you for your feedback!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more