Skip to content

Latest commit

 

History

History
97 lines (76 loc) · 2.45 KB

File metadata and controls

97 lines (76 loc) · 2.45 KB
layout page
weight 0
title Parse Webhook Settings
navigation
show
true

With the Parse Webhook you can parse the content and attachments of emails. The Web API endpoints allow you to setup, get, and delete your Parse Webhooks settings.

{% anchor h2 %} get {% endanchor %}

Retrieve settings already configured for parsing incoming email.

{% apiexample get GET https://api.sendgrid.com/api/parse.get api_user=your_sendgrid_username&api_key=your_sendgrid_password %} {% response json %} { "parse": [ { "hostname": "www.example.com", "url": "www.mydomain.com/parse.php", "spam_check": 1 } ] } {% endresponse %} {% response xml %} www.example.com www.mydomain.com/parse.php <spam_check>1</spam_check>

{% endresponse %} {% endapiexample %}


{% anchor h2 %} set {% endanchor %}

Specify the hostname and url for parsing incoming emails.

{% parameters set %} {% parameter 'hostname' 'Yes' 'alphanumeric' 'The hostname (domain or subdomain) for which you would like to configure a Parse Webhook callback URL.' %} {% parameter 'url' 'Yes' 'alphanumeric' 'The callback URL to which Parse Webhook payloads will be POSTed.' %} {% parameter 'spam_check' 'No' '0 or 1' 'If enabled, messages will POST, and will have added fields of spam_report and spam_score' %} {% endparameters %}

{% apiexample set POST https://api.sendgrid.com/api/parse.set api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com&url=www.mydomain.com/parse.php&spam_check=1 %} {% response json %} { "message": "success" } {% endresponse %} {% response xml %} success

{% endresponse %} {% endapiexample %}


{% anchor h2 %} Delete Entry {% endanchor %}

Delete the existing settings for parsing incoming emails.

{% parameters set %} {% parameter 'hostname' 'Yes' 'alphanumeric' 'The hostname (domain or subdomain) for which you would like to delete Parse Webhook settings.' %} {% endparameters %}

{% apiexample delete POST https://api.sendgrid.com/api/parse.delete api_user=your_sendgrid_username&api_key=your_sendgrid_password&hostname=www.example.com %} {% response json %} { "message": "success" } {% endresponse %} {% response xml %} success

{% endresponse %} {% endapiexample %}