Get Current Settings

Parameter Required Requirements Description
task Yes Must be set to get Retrieve Parse settings
user Yes Subuser must be registered under your account The subuser who we will update
Parameter Value Requirements Description

Call

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  "parse": [
    {
      "hostname": "www.example.com",
      "url": "www.mydomain.com/parse.php",
      "spam_check": 1
    }
  ]
}
  <h3>Response: Empty</h3>
{
  "parse": [

  ]
}

Call

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

Response

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

<parse>
   <entry>
      <hostname>www.example.com</hostname>
      <url>www.mydomain.com/parse.php</url>
      <spam_check>1</spam_check>
   </entry>
</parse>
  <h3>Response: Empty</h3>
<?xml version="1.0" encoding="ISO-8859-1"?>

<parse/>

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 Subuser must be registered under your account The subuser who we will update
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/customer.parse.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&task=set&user=example@example.com

Response

1
2
3
4
5
6
7
8
9
10
11
{
  "message": "success"
}

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/customer.parse.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&task=set&user=example@example.com

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?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>

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 Subuser must be registered under your account The subuser who we will update
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/customer.parse.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&task=update&user=example@example.com

Response

1
2
3
4
5
6
7
8
9
10
11
{
  "message": "success"
}

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/customer.parse.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&task=update&user=example@example.com

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?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>

Delete Entry

Parameter Required Requirements Description
task Yes Must be set to delete Set Parse settings
user Yes Subuser must be registered under your account The subuser who we will update
hostname Yes Must be the hostname you wish to delete. The host name you will remove for your subuser
Parameter Value Requirements Description

Call

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

Response

1
2
3
4
5
6
7
8
9
10
11
{
  "message": "success"
}

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?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>