Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

653 lines (524 sloc) 14.934 kb
layout weight title seo navigation
page
0
Monitor Records
robots
NOINDEX, FOLLOW
show
true

Receive a sample of an outgoing message by a specific customer.

The first step is to create a Monitor Record. Once the monitor record has been created, a reseller can append a monitor record to a customer. Multiple customer can be appended to a single monitor record.


{% anchor h2 %} Create Monitor Record {% endanchor %}

Obtain a complete list of all customer.

Parameter Required Requirements Description
task Yes Must be set to create Create a monitor record
name Yes Name must be unique. Can't be more than 255 characters The unique name to identify this monitor record
email Yes Must be in email format The email destination to send the email sample to
frequency Yes Customer must be registered under your account The frequency of emails to be sent out
method Yes Must be set to monitor Allows you to access monitor functionality

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=create&name=myMonitor&email=example@example.com&frequency=1000 {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock %} result>success {% endcodeblock %}

Response: Error

{% codeblock lang:xml %} <?xml version="1.0" encoding="ISO-8859-1"?>

error ... error messages ...

{% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=create&name=myMonitor&email=example@example.com&frequency=1000 {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock lang:json %} { "message": "success" } {% endcodeblock %}

Response: Error

{% codeblock lang:json %} { "message": "error", "errors": [ "...error messages..." ] } {% endcodeblock %}


{% anchor h2 %} Edit Monitor Record {% endanchor %}

Make modifications to an existing Monitor record.

Parameter Required Requirements Description
task Yes Must be set to edit The task required to edit a monitor
name Yes The name of the previous monitor record The monitor record we are going to edit
new_name No New name must be unique and can't be more than 255 characters The new monitor record name
new_email No Must be in email format The new email destination to send the email sample to
new_frequency No Must be an integer and greater than 0 The new frequency of emails to be sent out
method Yes Must be set to monitor Allows you to access monitor functionality

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=edit&name=myMonitor&new_name=updatedMonitor&new_email=example@example.com&new_frequency=5 {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock %} result>success {% endcodeblock %}

Response: Error

{% codeblock lang:xml %} <?xml version="1.0" encoding="ISO-8859-1"?>

error ... error messages ...

{% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=edit&name=myMonitor&new_name=updatedMonitor&new_email=example@example.com&new_frequency=5 {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock lang:json %} { "message": "success" } {% endcodeblock %}

Response: Error

{% codeblock lang:json %} { "message": "error", "errors": [ "...error messages..." ] } {% endcodeblock %}


{% anchor h2 %} Delete Monitor Record {% endanchor %}

Deleting a monitor record will remove it from SendGrid's system. Make sure no users are currently using the monitor record when removing, or removal will fail.

Parameter Required Requirements Description
task Yes Must be set to delete The task required to remove a monitor
name Yes Must be a monitor record to remove The unique name to identify this monitor record
method Yes Must be set to monitor Allows you to access monitor functionality

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=delete&name=recordToDelet {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock %} result>success {% endcodeblock %}

Response: Error

{% codeblock lang:xml %} <?xml version="1.0" encoding="ISO-8859-1"?>

error ... error messages ...

{% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=delete&name=recordToDelet {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock lang:json %} { "message": "success" } {% endcodeblock %}

Response: Error

{% codeblock lang:json %} { "message": "error", "errors": [ "...error messages..." ] } {% endcodeblock %}


{% anchor h2 %} List All Monitor Records {% endanchor %}

List all available monitor records a reseller has.

Parameter Required Requirements Description
task Yes Must be set to list The task required to list all monitor records
method Yes Must be set to monitor Allows you to access monitor functionality

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=lis {% endrequestdata %}

{% endrequestblock %}

Response

{% codeblock %} monitors>sampleNameAexample@example.com1000sampleNameBexample@example.com10000user1@example.comuser2@example.com</monitors {% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=lis {% endrequestdata %}

{% endrequestblock %}

Response

{% codeblock %} {"name":"sampleNameA","email":"example@example.com","frequency":"1000","users":[]},{"name":"sampleNameB","email":"example@example.com","frequency":"10000","users":["user1@example.com","user2@example.com"]} {% endcodeblock %}


{% anchor h2 %} Append A Customer To A Monitor Record {% endanchor %}

Append a monitor record to a existing record onto a customer.

Parameter Required Requirements Description
task Yes Must be set to append The task required to append a monitor record to a customer
user Yes Customer must be registered under your account The user we will append a monitor record to
name No Must be a valid monitor record The name of the monitor record we will be appending
method Yes Must be set to monitor Allows you to access monitor functionality

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=append&name=myMonitor&user=customer@example.com {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock %} result>success {% endcodeblock %}

Response: Error

{% codeblock lang:xml %} <?xml version="1.0" encoding="ISO-8859-1"?>

error ... error messages ...

{% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=append&name=myMonitor&user=customer@example.com {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock lang:json %} { "message": "success" } {% endcodeblock %}

Response: Error

{% codeblock lang:json %} { "message": "error", "errors": [ "...error messages..." ] } {% endcodeblock %}


{% anchor h2 %} Detach A Monitor Record From A Customer {% endanchor %}

Detach a customer from a monitor record.

Parameter Required Requirements Description
task Yes Must be set to detach The task required to detach a monitor record to a customer
user Yes Customer must be registered under your account The customer we will detach the monitor record from
method Yes Must be set to monitor Allows you to access monitor functionality

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=detach&user=customer@example.com {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock %} result>success {% endcodeblock %}

Response: Error

{% codeblock lang:xml %} <?xml version="1.0" encoding="ISO-8859-1"?>

error ... error messages ...

{% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.manage.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=monitor&task=detach&user=customer@example.com {% endrequestdata %}

{% endrequestblock %}

Response: Success

{% codeblock lang:json %} { "message": "success" } {% endcodeblock %}

Response: Error

{% codeblock lang:json %} { "message": "error", "errors": [ "...error messages..." ] } {% endcodeblock %}

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