Skip to content
This repository
branch: develop
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 134 lines (126 sloc) 2.769 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
---
layout: page
weight: 0
title: Whitelabel
navigation:
   show: true
---
<p>With the whitelabel API calls you will be able to retrieve whitelabel settings related to your account.</p>
<hr/>
{% anchor h2 %}
List
{% endanchor %}
<table class="table table-bordered table-striped">
  <tr>
    <th>Parameter</th>
    <th>Required</th>
    <th>Requirements</th>
  </tr>
  <tr>
    <td>list</td>
    <td>Yes</td>
    <td>Must be set to
      <em>list</em>
    </td>
  </tr>
  <tr>
    <td>method</td>
    <td>Yes</td>
    <td>Must be set to
      <em>whitelabel</em>
    </td>
  </tr>
</table>
{% apiexample get POST https://api.sendgrid.com/apiv2/reseller.manage api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=whitelabel&task=list %}
  {% response json %}
[
  {
    "mail_domain": "email.sendgrid.com",
    "url_domain": "email.sendgrid.com"
  },
  {
    "mail_domain": "email.example.com",
    "url_domain": "email.example.com"
  }
]
  {% endresponse %}
  {% response xml %}
<?xml version="1.0" encoding="ISO-8859-1"?>

<whitelabels>
   <whitelabel>
      <mail_domain>email.sendgrid.com</mail_domain>
      <url_domain>email.sendgrid.com</url_domain>
   </whitelabel>
   <whitelabel>
      <mail_domain>email.example.com</mail_domain>
      <url_domain>email.example.com</url_domain>
   </whitelabel>
</whitelabels>
  {% endresponse %}
{% endapiexample %}

<hr/>

{% anchor h2 %}
Append
{% endanchor %}
<table class="table table-bordered table-striped">
  <tr>
    <th>Parameter</th>
    <th>Required</th>
    <th>Requirements</th>
  </tr>
  <tr>
    <td>list</td>
    <td>Yes</td>
    <td>Must be set to
      <em>append</em>
    </td>
  </tr>
  <tr>
    <td>user</td>
    <td>Yes</td>
    <td>Subuser must be registered under your account</td>
  </tr>
  <tr>
    <td>mail_domain</td>
    <td>Yes</td>
    <td>Whitelabel mail_domain used to append a
whitelabel record to a subuser</td>
  </tr>
  <tr>
    <td>method</td>
    <td>Yes</td>
    <td>Must be set to
      <em>whitelabel</em>
    </td>
  </tr>
</table>
{% apiexample append POST https://api.sendgrid.com/apiv2/reseller.manage api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=whitelabel&task=append&user=customer@example.com&mail_domain=email.sendgrid.com=m %}
  {% response json %}
{
  "message": "success"
}

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}
  {% endresponse %}
  {% response xml %}
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>success</message>
</result>

<!-- error -->
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>error</message>
   <errors>
      ...
      <error>... error messages ...</error>
      ...
   </errors>
</result>
  {% endresponse %}
{% endapiexample %}
Something went wrong with that request. Please try again.