Skip to contentSkip to navigationSkip to topbar
On this page

Domain Authentication


(warning)

This documentation is for the SendGrid Web API v2

We will deprecate this version on February 10, 2025. To access all the latest features and upcoming developments, please see our v3 API. For assistance with transitioning, refer to our migration guide.

All Domain Authentication(formerly known as Whitelabel) records that are successfully created on the parent account are available here. These can be attached to one or more subusers. mail_domain and url_domain should be the same in almost all cases.

(information)

Info

Domain authentication records cannot be created via API, only via the web UI. The API is used to create and modify subuser-domain authentication relationships.

(warning)

Warning

Take note that IPs have records in line with domain authentication records, but are not assigned with these commands. Subusers can be assigned to a mismatched reverse DNS record, but should not be. There is no call at this time to note the reverse DNS record on the IP, DNS commands can be used to query these public records.



List

list page anchor
URI ParameterRequiredRequirementsDescription
taskYesMust be set to listTask to list existing domain authentication records on the account
JSONXML

Call

POSThttps://api.sendgrid.com/apiv2/customer.whitelabel.json
POST Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password&task=list

Response

1
[
2
{
3
"mail_domain": "em.domain1.com",
4
"url_domain": "em.domain1.com"
5
},
6
{
7
"mail_domain": "em.domain2.com",
8
"url_domain": "em.domain2.com"
9
}
10
]


Attaching a new domain authentication record to a subuser removes any previously-attached record. This does not affect already-sent messages.

URI ParameterRequiredRequirementsDescription
taskYesMust be set to appendTask to attach subuser to existing domain authentication record
userYesSubuser must be under your accountSubuser whose domain authentication association will be modified
mail_domainYessub.domain.com formatExisting domain authentication record to attach to subuser
JSONXML
POSThttps://api.sendgrid.com/apiv2/customer.whitelabel.json
POST Dataapi_user=your_sendgrid_username&api_key=your_sendgrid_password&task=append&user=subuser_username&mail_domain=em.domain1.com
1
{
2
"message": "success"
3
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.