Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Domain Authentication


(warning)

This documentation is for the SendGrid Web API v2

To access all the latest features and upcoming developments, please see our v3 API.

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


_10
[
_10
{
_10
"mail_domain": "em.domain1.com",
_10
"url_domain": "em.domain1.com"
_10
},
_10
{
_10
"mail_domain": "em.domain2.com",
_10
"url_domain": "em.domain2.com"
_10
}
_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

_10
{
_10
"message": "success"
_10
}


Rate this page: