Menu

Expand
Rate this page:

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.

Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings.

Validate a domain authentication.

POST /v3/whitelabel/domains/{id}/validate

Base url: https://api.sendgrid.com

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.

required
        
        
        

        Validate a domain authentication.

        Rate this page:

        Need some help?

        We all do sometimes. Get help now from the Twilio SendGrid Support Team.

        Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.

              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

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

              Thanks for your feedback!

              thanks-feedback-gif