Get Current Settings

Parameter Required Requirements Description
task Yes Must be set to get Retrieve Parse settings
user Yes Customer must be registered under your account The customer who we will update
method Yes Must be set to parse Allows you to access parse functionality

XML Call

POST https://api.sendgrid.com/api/distributor.manage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=parse&task=get&method=parse&user=customer@example.com

Response: Success

1
<parse><entry><hostname>www.example.com</hostname><url>www.mydomain.com/parse.php</url><spam_check>1</spam_check></entry></parse

Response: Empty

1
<parse></parse

JSON Call

POST https://api.sendgrid.com/api/distributor.manage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=get&method=parse&user=customer@example.com

Response: Success

1
"parse":[{"hostname":"www.example.com","url":"www.mydomain.com\/parse.php","spam_check":1}]

Response: Empty


Create New Entry

Parameter Required Requirements Description
task Yes Must be set to set Set Parse settings
hostname Yes No more than 255 characters Hostname we will use with your email
url Yes The parse destination
user Yes Customer must be registered under your account The customer who we will update
method Yes Must be set to parse Allows you to access parse functionality

XML Call

POST https://api.sendgrid.com/api/distributor.manage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com&url=www.mydomain.com/parse.php&spam_check=1&method=parse&task=set&method=parse&user=customer@example.com

Response: Success

1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>

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

Response: Error

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>error</message>
   <errors>
      ...
      <error>... error messages ...</error>
      ...
   </errors>
</result>

JSON Call

POST https://api.sendgrid.com/api/distributor.manage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com&url=www.mydomain.com/parse.php&spam_check=1&method=parse&task=set&method=parse&user=customer@example.com

Response

1
2
3
{
  "message": "success"
}

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Edit Entry

Parameter Required Requirements Description
task Yes Must be set to update Set Parse settings
hostname Yes No more than 255 characters Hostname entry you want to update
url Yes The parse destination
user Yes Customer must be registered under your account The customer who we will update
method Yes Must be set to parse Allows you to access parse functionality

XML Call

POST https://api.sendgrid.com/api/distributor.manage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com&url=www.mydomain.com/parse.php&spam_check=1&method=parse&task=update&user=customer@example.com

Response: Success

1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>

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

Response: Error

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>error</message>
   <errors>
      ...
      <error>... error messages ...</error>
      ...
   </errors>
</result>

JSON Call

POST https://api.sendgrid.com/api/distributor.manage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com&url=www.mydomain.com/parse.php&spam_check=1&method=parse&task=parse&user=customer@example.com

Response

1
2
3
{
  "message": "success"
}

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Delete Entry

Parameter Required Requirements Description
task Yes Must be set to delete Set Parse settings
user Yes Customer must be registered under your account The customer who we will update
hostname Yes Must be the hostname you wish to delete. The host name you will remove for your customer
method Yes Must be set to parse Allows you to access parse functionality

XML Call

POST https://api.sendgrid.com/api/distributor.manage.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com&task=delete&method=parse&user=customer@example.com

Response: Success

1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>

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

Response: Error

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>error</message>
   <errors>
      ...
      <error>... error messages ...</error>
      ...
   </errors>
</result>

JSON Call

POST https://api.sendgrid.com/api/distributor.manage.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com&task=delete&method=parse&user=customer@example.com

Response

1
2
3
{
  "message": "success"
}

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}