Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

85 lines (69 sloc) 2.718 kb
layout weight title navigation
page
450
Whitelabel
show
true

All 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.

{% info %} Whitelabel records cannot be created via API, only via the web UI. The API is used to create and modify subuser-whitelabel relationships. {% endinfo %}

{% warning %} Take note that IPs have records in line with Whitelabel records, but are not assigned with these commands. Subusers can be assigned to a mismatched whitelabel and IP, but should not be. There is no call at this time to note the whitelabeled rDNS record on the IP, DNS commands can be used to query these public records. {% endwarning %}


{% anchor h2 %} List {% endanchor %}

{% parameters list %} {% parameter task Yes 'Must be set to list' 'Task to list existing whitelabel records on the account' %} {% endparameters %}

{% apiexample list POST https://api.sendgrid.com/apiv2/customer.whitelabel api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=list %} {% response json %} [ { "mail_domain": "em.domain1.com", "url_domain": "em.domain1.com" }, { "mail_domain": "em.domain2.com", "url_domain": "em.domain2.com" } ] {% endresponse %} {% response xml %} em.domain1.com em.domain1.com em.domain2.com em.domain2.com

{% endresponse %} {% endapiexample %}


{% anchor h2 %} Attach {% endanchor %}

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

{% parameters append %} {% parameter task Yes 'Must be set to append' 'Task to attach subuser to existing whitelabel record' %} {% parameter user Yes 'Subuser must be under your account' 'Subuser to modify whitelabel association of' %} {% parameter mail_domain Yes 'sub.domain.com format' 'Existing whitelabel record to attach to subuser' %} {% endparameters %}

{% apiexample append POST https://api.sendgrid.com/apiv2/customer.whitelabel api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=append&user=subuser_username&mail_domain=em.domain1.com %} {% response json %} { "message": "success" } {% endresponse %} {% response xml %} success

{% endresponse %} {% endapiexample %}

Jump to Line
Something went wrong with that request. Please try again.