summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SendGrid/UnitTest/UnitTest.cs64
-rw-r--r--USAGE.md274
-rw-r--r--examples/accesssettings/accesssettings.cs36
-rw-r--r--examples/apikeys/apikeys.cs36
-rw-r--r--examples/asm/asm.cs98
-rw-r--r--examples/browsers/browsers.cs6
-rw-r--r--examples/campaigns/campaigns.cs66
-rw-r--r--examples/categories/categories.cs18
-rw-r--r--examples/clients/clients.cs12
-rw-r--r--examples/contactdb/contactdb.cs186
-rw-r--r--examples/devices/devices.cs6
-rw-r--r--examples/geo/geo.cs6
-rw-r--r--examples/ips/ips.cs84
-rw-r--r--examples/mail/mail.cs19
-rw-r--r--examples/mailboxproviders/mailboxproviders.cs6
-rw-r--r--examples/mailsettings/mailsettings.cs114
-rw-r--r--examples/partnersettings/partnersettings.cs18
-rw-r--r--examples/scopes/scopes.cs6
-rw-r--r--examples/stats/stats.cs6
-rw-r--r--examples/subusers/subusers.cs84
-rw-r--r--examples/suppression/suppression.cs102
-rw-r--r--examples/templates/templates.cs60
-rw-r--r--examples/trackingsettings/trackingsettings.cs54
-rw-r--r--examples/user/user.cs126
-rw-r--r--examples/whitelabel/whitelabel.cs162
25 files changed, 981 insertions, 668 deletions
diff --git a/SendGrid/UnitTest/UnitTest.cs b/SendGrid/UnitTest/UnitTest.cs
index b7cdaeb..3764c7f 100644
--- a/SendGrid/UnitTest/UnitTest.cs
+++ b/SendGrid/UnitTest/UnitTest.cs
@@ -514,15 +514,15 @@ namespace UnitTest
}
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey, host);
string data = @"{
- 'description': 'A group description',
- 'is_default': false,
- 'name': 'A group name'
+ 'description': 'Suggestions for products our users might like.',
+ 'is_default': true,
+ 'name': 'Product Suggestions'
}";
Dictionary<String, String> headers = new Dictionary<String, String>();
headers.Clear();
- headers.Add("X-Mock", "200");
+ headers.Add("X-Mock", "201");
dynamic response = sg.client.asm.groups.post(requestBody: data, requestHeaders: headers);
- Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
+ Assert.AreEqual(response.StatusCode, HttpStatusCode.Created);
}
[Test]
@@ -536,10 +536,13 @@ namespace UnitTest
host = "http://localhost:4010";
}
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey, host);
+ string queryParams = @"{
+ 'id': 1
+}";
Dictionary<String, String> headers = new Dictionary<String, String>();
headers.Clear();
headers.Add("X-Mock", "200");
- dynamic response = sg.client.asm.groups.get(requestHeaders: headers);
+ dynamic response = sg.client.asm.groups.get(queryParams: queryParams, requestHeaders: headers);
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
@@ -670,6 +673,24 @@ namespace UnitTest
}
[Test]
+ public void test_asm_suppressions_get()
+ {
+ string _apiKey = "SendGrid API Key";
+ string host = "";
+ if( Environment.GetEnvironmentVariable("TRAVIS") == "true" ) {
+ host = Environment.GetEnvironmentVariable("MOCK_HOST");
+ } else {
+ host = "http://localhost:4010";
+ }
+ dynamic sg = new SendGrid.SendGridAPIClient(_apiKey, host);
+ Dictionary<String, String> headers = new Dictionary<String, String>();
+ headers.Clear();
+ headers.Add("X-Mock", "200");
+ dynamic response = sg.client.asm.suppressions.get(requestHeaders: headers);
+ Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
+ }
+
+ [Test]
public void test_asm_suppressions_global_post()
{
string _apiKey = "SendGrid API Key";
@@ -732,6 +753,25 @@ namespace UnitTest
}
[Test]
+ public void test_asm_suppressions__email__get()
+ {
+ string _apiKey = "SendGrid API Key";
+ string host = "";
+ if( Environment.GetEnvironmentVariable("TRAVIS") == "true" ) {
+ host = Environment.GetEnvironmentVariable("MOCK_HOST");
+ } else {
+ host = "http://localhost:4010";
+ }
+ dynamic sg = new SendGrid.SendGridAPIClient(_apiKey, host);
+ var email = "test_url_param";
+ Dictionary<String, String> headers = new Dictionary<String, String>();
+ headers.Clear();
+ headers.Add("X-Mock", "200");
+ dynamic response = sg.client.asm.suppressions._(email).get(requestHeaders: headers);
+ Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
+ }
+
+ [Test]
public void test_browsers_stats_get()
{
string _apiKey = "SendGrid API Key";
@@ -2230,7 +2270,7 @@ namespace UnitTest
'content': [
{
'type': 'text/html',
- 'value': '<html><p>Hello, world!</p><img src=\'cid:ii_139db99fdb5c3704\'></img></html>'
+ 'value': '<html><p>Hello, world!</p><img src=[CID GOES HERE]></img></html>'
}
],
'custom_args': {
@@ -4315,7 +4355,7 @@ namespace UnitTest
Dictionary<String, String> headers = new Dictionary<String, String>();
headers.Clear();
headers.Add("X-Mock", "200");
- dynamic response = sg.client.user.webhooks._("event").settings.patch(requestBody: data, requestHeaders: headers);
+ dynamic response = sg.client.user.webhooks.event.settings.patch(requestBody: data, requestHeaders: headers);
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
@@ -4333,7 +4373,7 @@ namespace UnitTest
Dictionary<String, String> headers = new Dictionary<String, String>();
headers.Clear();
headers.Add("X-Mock", "200");
- dynamic response = sg.client.user.webhooks._("event").settings.get(requestHeaders: headers);
+ dynamic response = sg.client.user.webhooks.event.settings.get(requestHeaders: headers);
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
@@ -4354,7 +4394,7 @@ namespace UnitTest
Dictionary<String, String> headers = new Dictionary<String, String>();
headers.Clear();
headers.Add("X-Mock", "204");
- dynamic response = sg.client.user.webhooks._("event").test.post(requestBody: data, requestHeaders: headers);
+ dynamic response = sg.client.user.webhooks.event.test.post(requestBody: data, requestHeaders: headers);
Assert.AreEqual(response.StatusCode, HttpStatusCode.NoContent);
}
@@ -4470,7 +4510,7 @@ namespace UnitTest
Dictionary<String, String> headers = new Dictionary<String, String>();
headers.Clear();
headers.Add("X-Mock", "200");
- dynamic response = sg.client.whitelabel.domains._("default").get(requestHeaders: headers);
+ dynamic response = sg.client.whitelabel.domains.default.get(requestHeaders: headers);
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
@@ -4822,7 +4862,7 @@ namespace UnitTest
Dictionary<String, String> headers = new Dictionary<String, String>();
headers.Clear();
headers.Add("X-Mock", "200");
- dynamic response = sg.client.whitelabel.links._("default").get(queryParams: queryParams, requestHeaders: headers);
+ dynamic response = sg.client.whitelabel.links.default.get(queryParams: queryParams, requestHeaders: headers);
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
diff --git a/USAGE.md b/USAGE.md
index 0490a4d..c8e0261 100644
--- a/USAGE.md
+++ b/USAGE.md
@@ -51,6 +51,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### GET /access_settings/activity
+
```csharp
string queryParams = @"{
'limit': 1
@@ -74,6 +75,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### POST /access_settings/whitelist
+
```csharp
string data = @"{
'ips': [
@@ -105,6 +107,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### GET /access_settings/whitelist
+
```csharp
dynamic response = sg.client.access_settings.whitelist.get();
Console.WriteLine(response.StatusCode);
@@ -125,6 +128,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### DELETE /access_settings/whitelist
+
```csharp
string data = @"{
'ids': [
@@ -152,6 +156,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### GET /access_settings/whitelist/{rule_id}
+
```csharp
var rule_id = "test_url_param";
dynamic response = sg.client.access_settings.whitelist._(rule_id).get();
@@ -173,6 +178,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### DELETE /access_settings/whitelist/{rule_id}
+
```csharp
var rule_id = "test_url_param";
dynamic response = sg.client.access_settings.whitelist._(rule_id).delete();
@@ -199,6 +205,7 @@ See the [API Key Permissions List](https://sendgrid.com/docs/API_Reference/Web_A
### POST /api_keys
+
```csharp
string data = @"{
'name': 'My API Key',
@@ -223,6 +230,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### GET /api_keys
+
```csharp
dynamic response = sg.client.api_keys.get();
Console.WriteLine(response.StatusCode);
@@ -243,6 +251,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### PUT /api_keys/{api_key_id}
+
```csharp
string data = @"{
'name': 'A New Hope',
@@ -275,6 +284,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### PATCH /api_keys/{api_key_id}
+
```csharp
string data = @"{
'name': 'A New Hope'
@@ -295,6 +305,7 @@ If the API Key ID does not exist an HTTP 404 will be returned.
### GET /api_keys/{api_key_id}
+
```csharp
var api_key_id = "test_url_param";
dynamic response = sg.client.api_keys._(api_key_id).get();
@@ -320,6 +331,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### DELETE /api_keys/{api_key_id}
+
```csharp
var api_key_id = "test_url_param";
dynamic response = sg.client.api_keys._(api_key_id).delete();
@@ -332,9 +344,9 @@ Console.ReadLine();
<a name="asm"></a>
# ASM
-## Create a Group
+## Create a new suppression group
-**This endoint allows you to create a new suppression group.**
+**This endpoint allows you to create a new suppression group.**
Suppression groups, or unsubscribe groups, are specific types or categories of email that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
@@ -344,11 +356,12 @@ Each user can create up to 25 different suppression groups.
### POST /asm/groups
+
```csharp
string data = @"{
- 'description': 'A group description',
- 'is_default': false,
- 'name': 'A group name'
+ 'description': 'Suggestions for products our users might like.',
+ 'is_default': true,
+ 'name': 'Product Suggestions'
}";
dynamic response = sg.client.asm.groups.post(requestBody: data);
Console.WriteLine(response.StatusCode);
@@ -357,20 +370,20 @@ Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
```
-## Retrieve all suppression groups associated with the user.
-
-**This endpoint allows you to retrieve a list of all suppression groups created by this user.**
+## Retrieve information about multiple suppression groups
-Suppression groups, or unsubscribe groups, are specific types or categories of email that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
+**This endpoint allows you to retrieve information about multiple suppression groups.**
-The **name** and **description** of the unsubscribe group will be visible by recipients when they are managing their subscriptions.
-
-Each user can create up to 25 different suppression groups.
+This endpoint will return information for each group ID that you include in your request. To add a group ID to your request, simply append `&id=` followed by the group ID.
### GET /asm/groups
+
```csharp
-dynamic response = sg.client.asm.groups.get();
+string queryParams = @"{
+ 'id': 1
+}";
+dynamic response = sg.client.asm.groups.get(queryParams: queryParams);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
@@ -389,6 +402,7 @@ Each user can create up to 25 different suppression groups.
### PATCH /asm/groups/{group_id}
+
```csharp
string data = @"{
'description': 'Suggestions for items our users might like.',
@@ -415,6 +429,7 @@ Each user can create up to 25 different suppression groups.
### GET /asm/groups/{group_id}
+
```csharp
var group_id = "test_url_param";
dynamic response = sg.client.asm.groups._(group_id).get();
@@ -438,6 +453,7 @@ Each user can create up to 25 different suppression groups.
### DELETE /asm/groups/{group_id}
+
```csharp
var group_id = "test_url_param";
dynamic response = sg.client.asm.groups._(group_id).delete();
@@ -457,6 +473,7 @@ Suppressions are recipient email addresses that are added to [unsubscribe groups
### POST /asm/groups/{group_id}/suppressions
+
```csharp
string data = @"{
'recipient_emails': [
@@ -480,6 +497,7 @@ Suppressions are recipient email addresses that are added to [unsubscribe groups
### GET /asm/groups/{group_id}/suppressions
+
```csharp
var group_id = "test_url_param";
dynamic response = sg.client.asm.groups._(group_id).suppressions.get();
@@ -497,6 +515,7 @@ Suppressions are recipient email addresses that are added to [unsubscribe groups
### DELETE /asm/groups/{group_id}/suppressions/{email}
+
```csharp
var group_id = "test_url_param";
var email = "test_url_param";
@@ -507,6 +526,23 @@ Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
```
+## Retrieve all suppressions
+
+**This endpoint allows you to retrieve a list of all suppressions.**
+
+Suppressions are email addresses that can be added to [groups](https://sendgrid.com/docs/API_Reference/Web_API_v3/Suppression_Management/groups.html) to prevent certain types of emails from being delivered to those addresses.
+
+### GET /asm/suppressions
+
+
+```csharp
+dynamic response = sg.client.asm.suppressions.get();
+Console.WriteLine(response.StatusCode);
+Console.WriteLine(response.Body.ReadAsStringAsync().Result);
+Console.WriteLine(response.Headers.ToString());
+Console.ReadLine();
+```
+
## Add recipient addresses to the global suppression group.
**This endpoint allows you to add one or more email addresses to the global suppressions group.**
@@ -515,6 +551,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### POST /asm/suppressions/global
+
```csharp
string data = @"{
'recipient_emails': [
@@ -539,6 +576,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### GET /asm/suppressions/global/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.asm.suppressions.global._(email).get();
@@ -556,6 +594,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### DELETE /asm/suppressions/global/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.asm.suppressions.global._(email).delete();
@@ -565,6 +604,24 @@ Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
```
+## Retrieve all suppression groups for an email address
+
+**This endpoint will return a list of all suppression groups, indicating if the given email address is suppressed for each group.**
+
+Suppressions are email addresses that can be added to [groups](https://sendgrid.com/docs/API_Reference/Web_API_v3/Suppression_Management/groups.html) to prevent certain types of emails from being delivered to those addresses.
+
+### GET /asm/suppressions/{email}
+
+
+```csharp
+var email = "test_url_param";
+dynamic response = sg.client.asm.suppressions._(email).get();
+Console.WriteLine(response.StatusCode);
+Console.WriteLine(response.Body.ReadAsStringAsync().Result);
+Console.WriteLine(response.Headers.ToString());
+Console.ReadLine();
+```
+
<a name="browsers"></a>
# BROWSERS
@@ -578,6 +635,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /browsers/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -611,6 +669,7 @@ For more information:
### POST /campaigns
+
```csharp
string data = @"{
'categories': [
@@ -653,6 +712,7 @@ For more information:
### GET /campaigns
+
```csharp
string queryParams = @"{
'limit': 0,
@@ -675,6 +735,7 @@ For more information:
### PATCH /campaigns/{campaign_id}
+
```csharp
string data = @"{
'categories': [
@@ -705,6 +766,7 @@ For more information:
### GET /campaigns/{campaign_id}
+
```csharp
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).get();
@@ -726,6 +788,7 @@ For more information:
### DELETE /campaigns/{campaign_id}
+
```csharp
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).delete();
@@ -745,6 +808,7 @@ For more information:
### PATCH /campaigns/{campaign_id}/schedules
+
```csharp
string data = @"{
'send_at': 1489451436
@@ -767,6 +831,7 @@ For more information:
### POST /campaigns/{campaign_id}/schedules
+
```csharp
string data = @"{
'send_at': 1489771528
@@ -789,6 +854,7 @@ For more information:
### GET /campaigns/{campaign_id}/schedules
+
```csharp
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).schedules.get();
@@ -811,6 +877,7 @@ For more information:
### DELETE /campaigns/{campaign_id}/schedules
+
```csharp
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).schedules.delete();
@@ -832,6 +899,7 @@ For more information:
### POST /campaigns/{campaign_id}/schedules/now
+
```csharp
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).schedules.now.post();
@@ -853,6 +921,7 @@ For more information:
### POST /campaigns/{campaign_id}/schedules/test
+
```csharp
string data = @"{
'to': 'your.email@example.com'
@@ -876,6 +945,7 @@ Categories can help organize your email analytics by enabling you to tag emails
### GET /categories
+
```csharp
string queryParams = @"{
'category': 'test_string',
@@ -899,6 +969,7 @@ Categories allow you to group your emails together according to broad topics tha
### GET /categories/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -925,6 +996,7 @@ Categories allow you to group your emails together according to broad topics tha
### GET /categories/stats/sums
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -955,6 +1027,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /clients/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -984,6 +1057,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /clients/{client_type}/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -1009,6 +1083,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### POST /contactdb/custom_fields
+
```csharp
string data = @"{
'name': 'pet',
@@ -1029,6 +1104,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/custom_fields
+
```csharp
dynamic response = sg.client.contactdb.custom_fields.get();
Console.WriteLine(response.StatusCode);
@@ -1045,6 +1121,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/custom_fields/{custom_field_id}
+
```csharp
var custom_field_id = "test_url_param";
dynamic response = sg.client.contactdb.custom_fields._(custom_field_id).get();
@@ -1062,6 +1139,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### DELETE /contactdb/custom_fields/{custom_field_id}
+
```csharp
var custom_field_id = "test_url_param";
dynamic response = sg.client.contactdb.custom_fields._(custom_field_id).delete();
@@ -1079,6 +1157,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/lists
+
```csharp
string data = @"{
'name': 'your list name'
@@ -1098,6 +1177,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/lists
+
```csharp
dynamic response = sg.client.contactdb.lists.get();
Console.WriteLine(response.StatusCode);
@@ -1114,6 +1194,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/lists
+
```csharp
string data = @"[
1,
@@ -1137,6 +1218,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### PATCH /contactdb/lists/{list_id}
+
```csharp
string data = @"{
'name': 'newlistname'
@@ -1160,6 +1242,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/lists/{list_id}
+
```csharp
string queryParams = @"{
'list_id': 0
@@ -1180,6 +1263,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/lists/{list_id}
+
```csharp
string queryParams = @"{
'delete_contacts': 'true'
@@ -1202,6 +1286,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/lists/{list_id}/recipients
+
```csharp
string data = @"[
'recipient_id1',
@@ -1223,6 +1308,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/lists/{list_id}/recipients
+
```csharp
string queryParams = @"{
'list_id': 0,
@@ -1245,6 +1331,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/lists/{list_id}/recipients/{recipient_id}
+
```csharp
var list_id = "test_url_param";
var recipient_id = "test_url_param";
@@ -1263,6 +1350,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/lists/{list_id}/recipients/{recipient_id}
+
```csharp
string queryParams = @"{
'list_id': 0,
@@ -1289,6 +1377,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### PATCH /contactdb/recipients
+
```csharp
string data = @"[
{
@@ -1314,6 +1403,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/recipients
+
```csharp
string data = @"[
{
@@ -1347,6 +1437,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients
+
```csharp
string queryParams = @"{
'page': 1,
@@ -1369,6 +1460,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### DELETE /contactdb/recipients
+
```csharp
string data = @"[
'recipient_id1',
@@ -1391,6 +1483,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients/billable_count
+
```csharp
dynamic response = sg.client.contactdb.recipients.billable_count.get();
Console.WriteLine(response.StatusCode);
@@ -1407,6 +1500,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/recipients/count
+
```csharp
dynamic response = sg.client.contactdb.recipients.count.get();
Console.WriteLine(response.StatusCode);
@@ -1432,6 +1526,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/recipients/search
+
```csharp
string queryParams = @"{
'{field_name}': 'test_string'
@@ -1451,6 +1546,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients/{recipient_id}
+
```csharp
var recipient_id = "test_url_param";
dynamic response = sg.client.contactdb.recipients._(recipient_id).get();
@@ -1468,6 +1564,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/recipients/{recipient_id}
+
```csharp
var recipient_id = "test_url_param";
dynamic response = sg.client.contactdb.recipients._(recipient_id).delete();
@@ -1487,6 +1584,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients/{recipient_id}/lists
+
```csharp
var recipient_id = "test_url_param";
dynamic response = sg.client.contactdb.recipients._(recipient_id).lists.get();
@@ -1504,6 +1602,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/reserved_fields
+
```csharp
dynamic response = sg.client.contactdb.reserved_fields.get();
Console.WriteLine(response.StatusCode);
@@ -1540,6 +1639,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### POST /contactdb/segments
+
```csharp
string data = @"{
'conditions': [
@@ -1582,6 +1682,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### GET /contactdb/segments
+
```csharp
dynamic response = sg.client.contactdb.segments.get();
Console.WriteLine(response.StatusCode);
@@ -1600,6 +1701,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### PATCH /contactdb/segments/{segment_id}
+
```csharp
string data = @"{
'conditions': [
@@ -1634,6 +1736,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### GET /contactdb/segments/{segment_id}
+
```csharp
string queryParams = @"{
'segment_id': 0
@@ -1658,6 +1761,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### DELETE /contactdb/segments/{segment_id}
+
```csharp
string queryParams = @"{
'delete_contacts': 'true'
@@ -1680,6 +1784,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### GET /contactdb/segments/{segment_id}/recipients
+
```csharp
string queryParams = @"{
'page': 1,
@@ -1715,6 +1820,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /devices/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -1743,6 +1849,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /geo/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -1772,6 +1879,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### GET /ips
+
```csharp
string queryParams = @"{
'exclude_whitelabels': 'true',
@@ -1795,6 +1903,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### GET /ips/assigned
+
```csharp
dynamic response = sg.client.ips.assigned.get();
Console.WriteLine(response.StatusCode);
@@ -1817,6 +1926,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### POST /ips/pools
+
```csharp
string data = @"{
'name': 'marketing'
@@ -1840,6 +1950,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### GET /ips/pools
+
```csharp
dynamic response = sg.client.ips.pools.get();
Console.WriteLine(response.StatusCode);
@@ -1860,6 +1971,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### PUT /ips/pools/{pool_name}
+
```csharp
string data = @"{
'name': 'new_pool_name'
@@ -1884,6 +1996,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### GET /ips/pools/{pool_name}
+
```csharp
var pool_name = "test_url_param";
dynamic response = sg.client.ips.pools._(pool_name).get();
@@ -1905,6 +2018,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### DELETE /ips/pools/{pool_name}
+
```csharp
var pool_name = "test_url_param";
dynamic response = sg.client.ips.pools._(pool_name).delete();
@@ -1924,6 +2038,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### POST /ips/pools/{pool_name}/ips
+
```csharp
string data = @"{
'ip': '0.0.0.0'
@@ -1946,6 +2061,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### DELETE /ips/pools/{pool_name}/ips/{ip}
+
```csharp
var pool_name = "test_url_param";
var ip = "test_url_param";
@@ -1966,6 +2082,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### POST /ips/warmup
+
```csharp
string data = @"{
'ip': '0.0.0.0'
@@ -1987,6 +2104,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### GET /ips/warmup
+
```csharp
dynamic response = sg.client.ips.warmup.get();
Console.WriteLine(response.StatusCode);
@@ -2005,6 +2123,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### GET /ips/warmup/{ip_address}
+
```csharp
var ip_address = "test_url_param";
dynamic response = sg.client.ips.warmup._(ip_address).get();
@@ -2024,6 +2143,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### DELETE /ips/warmup/{ip_address}
+
```csharp
var ip_address = "test_url_param";
dynamic response = sg.client.ips.warmup._(ip_address).delete();
@@ -2043,6 +2163,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### GET /ips/{ip_address}
+
```csharp
var ip_address = "test_url_param";
dynamic response = sg.client.ips._(ip_address).get();
@@ -2067,6 +2188,7 @@ More Information:
### POST /mail/batch
+
```csharp
dynamic response = sg.client.mail.batch.post();
Console.WriteLine(response.StatusCode);
@@ -2087,6 +2209,7 @@ More Information:
### GET /mail/batch/{batch_id}
+
```csharp
var batch_id = "test_url_param";
dynamic response = sg.client.mail.batch._(batch_id).get();
@@ -2109,6 +2232,8 @@ For more detailed information about how to use the v3 Mail Send endpoint, please
### POST /mail/send/beta
+This endpoint has a helper, check it out [here](https://github.com/sendgrid/sendgrid-csharp/blob/v3beta/SendGrid/SendGrid/Helpers/Mail/README.md).
+
```csharp
string data = @"{
'asm': {
@@ -2271,6 +2396,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings
+
```csharp
string queryParams = @"{
'limit': 1,
@@ -2293,6 +2419,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/address_whitelist
+
```csharp
string data = @"{
'enabled': true,
@@ -2318,6 +2445,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/address_whitelist
+
```csharp
dynamic response = sg.client.mail_settings.address_whitelist.get();
Console.WriteLine(response.StatusCode);
@@ -2336,6 +2464,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/bcc
+
```csharp
string data = @"{
'email': 'email@example.com',
@@ -2358,6 +2487,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/bcc
+
```csharp
dynamic response = sg.client.mail_settings.bcc.get();
Console.WriteLine(response.StatusCode);
@@ -2376,6 +2506,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/bounce_purge
+
```csharp
string data = @"{
'enabled': true,
@@ -2399,6 +2530,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/bounce_purge
+
```csharp
dynamic response = sg.client.mail_settings.bounce_purge.get();
Console.WriteLine(response.StatusCode);
@@ -2417,6 +2549,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/footer
+
```csharp
string data = @"{
'enabled': true,
@@ -2440,6 +2573,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/footer
+
```csharp
dynamic response = sg.client.mail_settings.footer.get();
Console.WriteLine(response.StatusCode);
@@ -2458,6 +2592,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/forward_bounce
+
```csharp
string data = @"{
'email': 'example@example.com',
@@ -2480,6 +2615,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/forward_bounce
+
```csharp
dynamic response = sg.client.mail_settings.forward_bounce.get();
Console.WriteLine(response.StatusCode);
@@ -2498,6 +2634,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/forward_spam
+
```csharp
string data = @"{
'email': '',
@@ -2520,6 +2657,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/forward_spam
+
```csharp
dynamic response = sg.client.mail_settings.forward_spam.get();
Console.WriteLine(response.StatusCode);
@@ -2538,6 +2676,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/plain_content
+
```csharp
string data = @"{
'enabled': false
@@ -2559,6 +2698,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/plain_content
+
```csharp
dynamic response = sg.client.mail_settings.plain_content.get();
Console.WriteLine(response.StatusCode);
@@ -2577,6 +2717,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/spam_check
+
```csharp
string data = @"{
'enabled': true,
@@ -2600,6 +2741,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/spam_check
+
```csharp
dynamic response = sg.client.mail_settings.spam_check.get();
Console.WriteLine(response.StatusCode);
@@ -2620,6 +2762,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/template
+
```csharp
string data = @"{
'enabled': true,
@@ -2644,6 +2787,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/template
+
```csharp
dynamic response = sg.client.mail_settings.template.get();
Console.WriteLine(response.StatusCode);
@@ -2665,6 +2809,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /mailbox_providers/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -2692,6 +2837,7 @@ Our partner settings allow you to integrate your SendGrid account with our partn
### GET /partner_settings
+
```csharp
string queryParams = @"{
'limit': 1,
@@ -2714,6 +2860,7 @@ By integrating with New Relic, you can send your SendGrid email statistics to yo
### PATCH /partner_settings/new_relic
+
```csharp
string data = @"{
'enable_subuser_statistics': true,
@@ -2737,6 +2884,7 @@ By integrating with New Relic, you can send your SendGrid email statistics to yo
### GET /partner_settings/new_relic
+
```csharp
dynamic response = sg.client.partner_settings.new_relic.get();
Console.WriteLine(response.StatusCode);
@@ -2756,6 +2904,7 @@ API Keys can be used to authenticate the use of [SendGrids v3 Web API](https://s
### GET /scopes
+
```csharp
dynamic response = sg.client.scopes.get();
Console.WriteLine(response.StatusCode);
@@ -2775,6 +2924,7 @@ Parent accounts will see aggregated stats for their account and all subuser acco
### GET /stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -2804,6 +2954,7 @@ For more information about Subusers:
### POST /subusers
+
```csharp
string data = @"{
'email': 'John@example.com',
@@ -2832,6 +2983,7 @@ For more information about Subusers:
### GET /subusers
+
```csharp
string queryParams = @"{
'limit': 0,
@@ -2853,6 +3005,7 @@ This endpoint allows you to request the reputations for your subusers.
### GET /subusers/reputations
+
```csharp
string queryParams = @"{
'usernames': 'test_string'
@@ -2876,6 +3029,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -2905,6 +3059,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/stats/monthly
+
```csharp
string queryParams = @"{
'date': 'test_string',
@@ -2932,6 +3087,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/stats/sums
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -2960,6 +3116,7 @@ For more information about Subusers:
### PATCH /subusers/{subuser_name}
+
```csharp
string data = @"{
'disabled': false
@@ -2983,6 +3140,7 @@ For more information about Subusers:
### DELETE /subusers/{subuser_name}
+
```csharp
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).delete();
@@ -3003,6 +3161,7 @@ More information:
### PUT /subusers/{subuser_name}/ips
+
```csharp
string data = @"[
'127.0.0.1'
@@ -3021,6 +3180,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### PUT /subusers/{subuser_name}/monitor
+
```csharp
string data = @"{
'email': 'example@example.com',
@@ -3040,6 +3200,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### POST /subusers/{subuser_name}/monitor
+
```csharp
string data = @"{
'email': 'example@example.com',
@@ -3059,6 +3220,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### GET /subusers/{subuser_name}/monitor
+
```csharp
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).monitor.get();
@@ -3074,6 +3236,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### DELETE /subusers/{subuser_name}/monitor
+
```csharp
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).monitor.delete();
@@ -3096,6 +3259,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/{subuser_name}/stats/monthly
+
```csharp
string queryParams = @"{
'date': 'test_string',
@@ -3125,6 +3289,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/blocks
+
```csharp
string queryParams = @"{
'end_time': 1,
@@ -3154,6 +3319,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/blocks
+
```csharp
string data = @"{
'delete_all': false,
@@ -3179,6 +3345,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/blocks/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.suppression.blocks._(email).get();
@@ -3198,6 +3365,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/blocks/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.suppression.blocks._(email).delete();
@@ -3220,6 +3388,7 @@ For more information see:
### GET /suppression/bounces
+
```csharp
string queryParams = @"{
'end_time': 0,
@@ -3248,6 +3417,7 @@ Note: the `delete_all` and `emails` parameters should be used independently of e
### DELETE /suppression/bounces
+
```csharp
string data = @"{
'delete_all': true,
@@ -3277,6 +3447,7 @@ For more information see:
### GET /suppression/bounces/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.suppression.bounces._(email).get();
@@ -3300,6 +3471,7 @@ For more information see:
### DELETE /suppression/bounces/{email}
+
```csharp
string queryParams = @"{
'email_address': 'example@example.com'
@@ -3324,6 +3496,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/invalid_emails
+
```csharp
string queryParams = @"{
'end_time': 1,
@@ -3355,6 +3528,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/invalid_emails
+
```csharp
string data = @"{
'delete_all': false,
@@ -3382,6 +3556,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/invalid_emails/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.suppression.invalid_emails._(email).get();
@@ -3403,6 +3578,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/invalid_emails/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.suppression.invalid_emails._(email).delete();
@@ -3422,6 +3598,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/spam_report/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.suppression.spam_report._(email).get();
@@ -3441,6 +3618,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/spam_report/{email}
+
```csharp
var email = "test_url_param";
dynamic response = sg.client.suppression.spam_report._(email).delete();
@@ -3460,6 +3638,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/spam_reports
+
```csharp
string queryParams = @"{
'end_time': 1,
@@ -3489,6 +3668,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/spam_reports
+
```csharp
string data = @"{
'delete_all': false,
@@ -3512,6 +3692,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### GET /suppression/unsubscribes
+
```csharp
string queryParams = @"{
'end_time': 1,
@@ -3539,6 +3720,7 @@ Transactional templates are templates created specifically for transactional ema
### POST /templates
+
```csharp
string data = @"{
'name': 'example_name'
@@ -3560,6 +3742,7 @@ Transactional templates are templates created specifically for transactional ema
### GET /templates
+
```csharp
dynamic response = sg.client.templates.get();
Console.WriteLine(response.StatusCode);
@@ -3579,6 +3762,7 @@ Transactional templates are templates created specifically for transactional ema
### PATCH /templates/{template_id}
+
```csharp
string data = @"{
'name': 'new_example_name'
@@ -3602,6 +3786,7 @@ Transactional templates are templates created specifically for transactional ema
### GET /templates/{template_id}
+
```csharp
var template_id = "test_url_param";
dynamic response = sg.client.templates._(template_id).get();
@@ -3622,6 +3807,7 @@ Transactional templates are templates created specifically for transactional ema
### DELETE /templates/{template_id}
+
```csharp
var template_id = "test_url_param";
dynamic response = sg.client.templates._(template_id).delete();
@@ -3642,6 +3828,7 @@ For more information about transactional templates, please see our [User Guide](
### POST /templates/{template_id}/versions
+
```csharp
string data = @"{
'active': 1,
@@ -3675,6 +3862,7 @@ For more information about transactional templates, please see our [User Guide](
### PATCH /templates/{template_id}/versions/{version_id}
+
```csharp
string data = @"{
'active': 1,
@@ -3708,6 +3896,7 @@ For more information about transactional templates, please see our [User Guide](
### GET /templates/{template_id}/versions/{version_id}
+
```csharp
var template_id = "test_url_param";
var version_id = "test_url_param";
@@ -3734,6 +3923,7 @@ For more information about transactional templates, please see our [User Guide](
### DELETE /templates/{template_id}/versions/{version_id}
+
```csharp
var template_id = "test_url_param";
var version_id = "test_url_param";
@@ -3761,6 +3951,7 @@ For more information about transactional templates, please see our [User Guide](
### POST /templates/{template_id}/versions/{version_id}/activate
+
```csharp
var template_id = "test_url_param";
var version_id = "test_url_param";
@@ -3784,6 +3975,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings
+
```csharp
string queryParams = @"{
'limit': 1,
@@ -3806,6 +3998,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/click
+
```csharp
string data = @"{
'enabled': true
@@ -3827,6 +4020,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/click
+
```csharp
dynamic response = sg.client.tracking_settings.click.get();
Console.WriteLine(response.StatusCode);
@@ -3849,6 +4043,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/google_analytics
+
```csharp
string data = @"{
'enabled': true,
@@ -3879,6 +4074,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/google_analytics
+
```csharp
dynamic response = sg.client.tracking_settings.google_analytics.get();
Console.WriteLine(response.StatusCode);
@@ -3899,6 +4095,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/open
+
```csharp
string data = @"{
'enabled': true
@@ -3922,6 +4119,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/open
+
```csharp
dynamic response = sg.client.tracking_settings.open.get();
Console.WriteLine(response.StatusCode);
@@ -3942,6 +4140,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/subscription
+
```csharp
string data = @"{
'enabled': true,
@@ -3970,6 +4169,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/subscription
+
```csharp
dynamic response = sg.client.tracking_settings.subscription.get();
Console.WriteLine(response.StatusCode);
@@ -3995,6 +4195,7 @@ For more information about your user profile:
### GET /user/account
+
```csharp
dynamic response = sg.client.user.account.get();
Console.WriteLine(response.StatusCode);
@@ -4011,6 +4212,7 @@ Your monthly credit allotment limits the number of emails you may send before in
### GET /user/credits
+
```csharp
dynamic response = sg.client.user.credits.get();
Console.WriteLine(response.StatusCode);
@@ -4031,6 +4233,7 @@ For more information about your user profile:
### PUT /user/email
+
```csharp
string data = @"{
'email': 'example@example.com'
@@ -4054,6 +4257,7 @@ For more information about your user profile:
### GET /user/email
+
```csharp
dynamic response = sg.client.user.email.get();
Console.WriteLine(response.StatusCode);
@@ -4074,6 +4278,7 @@ For more information about your user profile:
### PUT /user/password
+
```csharp
string data = @"{
'new_password': 'new_password',
@@ -4100,6 +4305,7 @@ It should be noted that any one or more of the parameters can be updated via the
### PATCH /user/profile
+
```csharp
string data = @"{
'city': 'Orange',
@@ -4123,6 +4329,7 @@ For more information about your user profile:
### GET /user/profile
+
```csharp
dynamic response = sg.client.user.profile.get();
Console.WriteLine(response.StatusCode);
@@ -4142,6 +4349,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### POST /user/scheduled_sends
+
```csharp
string data = @"{
'batch_id': 'YOUR_BATCH_ID',
@@ -4162,6 +4370,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### GET /user/scheduled_sends
+
```csharp
dynamic response = sg.client.user.scheduled_sends.get();
Console.WriteLine(response.StatusCode);
@@ -4178,6 +4387,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### PATCH /user/scheduled_sends/{batch_id}
+
```csharp
string data = @"{
'status': 'pause'
@@ -4198,6 +4408,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### GET /user/scheduled_sends/{batch_id}
+
```csharp
var batch_id = "test_url_param";
dynamic response = sg.client.user.scheduled_sends._(batch_id).get();
@@ -4215,6 +4426,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### DELETE /user/scheduled_sends/{batch_id}
+
```csharp
var batch_id = "test_url_param";
dynamic response = sg.client.user.scheduled_sends._(batch_id).delete();
@@ -4234,6 +4446,7 @@ The Enforced TLS settings specify whether or not the recipient is required to su
### PATCH /user/settings/enforced_tls
+
```csharp
string data = @"{
'require_tls': true,
@@ -4256,6 +4469,7 @@ The Enforced TLS settings specify whether or not the recipient is required to su
### GET /user/settings/enforced_tls
+
```csharp
dynamic response = sg.client.user.settings.enforced_tls.get();
Console.WriteLine(response.StatusCode);
@@ -4276,6 +4490,7 @@ For more information about your user profile:
### PUT /user/username
+
```csharp
string data = @"{
'username': 'test_username'
@@ -4299,6 +4514,7 @@ For more information about your user profile:
### GET /user/username
+
```csharp
dynamic response = sg.client.user.username.get();
Console.WriteLine(response.StatusCode);
@@ -4319,6 +4535,7 @@ Common uses of this data are to remove unsubscribes, react to spam reports, dete
### PATCH /user/webhooks/event/settings
+
```csharp
string data = @"{
'bounce': true,
@@ -4354,6 +4571,7 @@ Common uses of this data are to remove unsubscribes, react to spam reports, dete
### GET /user/webhooks/event/settings
+
```csharp
dynamic response = sg.client.user.webhooks._("event").settings.get();
Console.WriteLine(response.StatusCode);
@@ -4372,6 +4590,7 @@ Common uses of this data are to remove unsubscribes, react to spam reports, dete
### POST /user/webhooks/event/test
+
```csharp
string data = @"{
'url': 'url'
@@ -4391,6 +4610,7 @@ SendGrid can parse the attachments and contents of incoming emails. The Parse AP
### GET /user/webhooks/parse/settings
+
```csharp
dynamic response = sg.client.user.webhooks.parse.settings.get();
Console.WriteLine(response.StatusCode);
@@ -4409,6 +4629,7 @@ There are a number of pre-made integrations for the SendGrid Parse Webhook which
### GET /user/webhooks/parse/stats
+
```csharp
string queryParams = @"{
'aggregated_by': 'day',
@@ -4441,6 +4662,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains
+
```csharp
string data = @"{
'automatic_security': false,
@@ -4472,6 +4694,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains
+
```csharp
string queryParams = @"{
'domain': 'test_string',
@@ -4502,6 +4725,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains/default
+
```csharp
dynamic response = sg.client.whitelabel.domains._("default").get();
Console.WriteLine(response.StatusCode);
@@ -4527,6 +4751,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains/subuser
+
```csharp
dynamic response = sg.client.whitelabel.domains.subuser.get();
Console.WriteLine(response.StatusCode);
@@ -4552,6 +4777,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### DELETE /whitelabel/domains/subuser
+
```csharp
dynamic response = sg.client.whitelabel.domains.subuser.delete();
Console.WriteLine(response.StatusCode);
@@ -4570,6 +4796,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### PATCH /whitelabel/domains/{domain_id}
+
```csharp
string data = @"{
'custom_spf': true,
@@ -4594,6 +4821,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains/{domain_id}
+
```csharp
var domain_id = "test_url_param";
dynamic response = sg.client.whitelabel.domains._(domain_id).get();
@@ -4613,6 +4841,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### DELETE /whitelabel/domains/{domain_id}
+
```csharp
var domain_id = "test_url_param";
dynamic response = sg.client.whitelabel.domains._(domain_id).delete();
@@ -4639,6 +4868,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains/{domain_id}/subuser
+
```csharp
string data = @"{
'username': 'jane@example.com'
@@ -4666,6 +4896,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains/{id}/ips
+
```csharp
string data = @"{
'ip': '192.168.0.1'
@@ -4694,6 +4925,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### DELETE /whitelabel/domains/{id}/ips/{ip}
+
```csharp
var id = "test_url_param";
var ip = "test_url_param";
@@ -4719,6 +4951,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains/{id}/validate
+
```csharp
var id = "test_url_param";
dynamic response = sg.client.whitelabel.domains._(id).validate.post();
@@ -4740,6 +4973,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/ips
+
```csharp
string data = @"{
'domain': 'example.com',
@@ -4765,6 +4999,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/ips
+
```csharp
string queryParams = @"{
'ip': 'test_string',
@@ -4788,6 +5023,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/ips/{id}
+
```csharp
var id = "test_url_param";
dynamic response = sg.client.whitelabel.ips._(id).get();
@@ -4807,6 +5043,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### DELETE /whitelabel/ips/{id}
+
```csharp
var id = "test_url_param";
dynamic response = sg.client.whitelabel.ips._(id).delete();
@@ -4826,6 +5063,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/ips/{id}/validate
+
```csharp
var id = "test_url_param";
dynamic response = sg.client.whitelabel.ips._(id).validate.post();
@@ -4845,6 +5083,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/links
+
```csharp
string data = @"{
'default': true,
@@ -4872,6 +5111,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links
+
```csharp
string queryParams = @"{
'limit': 1
@@ -4900,6 +5140,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links/default
+
```csharp
string queryParams = @"{
'domain': 'test_string'
@@ -4925,6 +5166,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links/subuser
+
```csharp
string queryParams = @"{
'username': 'test_string'
@@ -4950,6 +5192,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### DELETE /whitelabel/links/subuser
+
```csharp
string queryParams = @"{
'username': 'test_string'
@@ -4971,6 +5214,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### PATCH /whitelabel/links/{id}
+
```csharp
string data = @"{
'default': true
@@ -4993,6 +5237,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links/{id}
+
```csharp
var id = "test_url_param";
dynamic response = sg.client.whitelabel.links._(id).get();
@@ -5012,6 +5257,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### DELETE /whitelabel/links/{id}
+
```csharp
var id = "test_url_param";
dynamic response = sg.client.whitelabel.links._(id).delete();
@@ -5031,6 +5277,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/links/{id}/validate
+
```csharp
var id = "test_url_param";
dynamic response = sg.client.whitelabel.links._(id).validate.post();
@@ -5054,6 +5301,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/links/{link_id}/subuser
+
```csharp
string data = @"{
'username': 'jane@example.com'
diff --git a/examples/accesssettings/accesssettings.cs b/examples/accesssettings/accesssettings.cs
index 25f561f..15fe8b0 100644
--- a/examples/accesssettings/accesssettings.cs
+++ b/examples/accesssettings/accesssettings.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve all recent access attempts #
-# GET /access_settings/activity #
+////////////////////////////////////////////////////////
+// Retrieve all recent access attempts
+// GET /access_settings/activity
string queryParams = @"{
'limit': 1
@@ -18,9 +18,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add one or more IPs to the whitelist #
-# POST /access_settings/whitelist #
+////////////////////////////////////////////////////////
+// Add one or more IPs to the whitelist
+// POST /access_settings/whitelist
string data = @"{
'ips': [
@@ -41,9 +41,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a list of currently whitelisted IPs #
-# GET /access_settings/whitelist #
+////////////////////////////////////////////////////////
+// Retrieve a list of currently whitelisted IPs
+// GET /access_settings/whitelist
dynamic response = sg.client.access_settings.whitelist.get();
Console.WriteLine(response.StatusCode);
@@ -51,9 +51,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Remove one or more IPs from the whitelist #
-# DELETE /access_settings/whitelist #
+////////////////////////////////////////////////////////
+// Remove one or more IPs from the whitelist
+// DELETE /access_settings/whitelist
string data = @"{
'ids': [
@@ -68,9 +68,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a specific whitelisted IP #
-# GET /access_settings/whitelist/{rule_id} #
+////////////////////////////////////////////////////////
+// Retrieve a specific whitelisted IP
+// GET /access_settings/whitelist/{rule_id}
var rule_id = "test_url_param";
dynamic response = sg.client.access_settings.whitelist._(rule_id).get();
@@ -79,9 +79,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Remove a specific IP from the whitelist #
-# DELETE /access_settings/whitelist/{rule_id} #
+////////////////////////////////////////////////////////
+// Remove a specific IP from the whitelist
+// DELETE /access_settings/whitelist/{rule_id}
var rule_id = "test_url_param";
dynamic response = sg.client.access_settings.whitelist._(rule_id).delete();
diff --git a/examples/apikeys/apikeys.cs b/examples/apikeys/apikeys.cs
index 75eb536..eff23ec 100644
--- a/examples/apikeys/apikeys.cs
+++ b/examples/apikeys/apikeys.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create API keys #
-# POST /api_keys #
+////////////////////////////////////////////////////////
+// Create API keys
+// POST /api_keys
string data = @"{
'name': 'My API Key',
@@ -23,9 +23,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all API Keys belonging to the authenticated user #
-# GET /api_keys #
+////////////////////////////////////////////////////////
+// Retrieve all API Keys belonging to the authenticated user
+// GET /api_keys
dynamic response = sg.client.api_keys.get();
Console.WriteLine(response.StatusCode);
@@ -33,9 +33,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update the name & scopes of an API Key #
-# PUT /api_keys/{api_key_id} #
+////////////////////////////////////////////////////////
+// Update the name & scopes of an API Key
+// PUT /api_keys/{api_key_id}
string data = @"{
'name': 'A New Hope',
@@ -51,9 +51,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update API keys #
-# PATCH /api_keys/{api_key_id} #
+////////////////////////////////////////////////////////
+// Update API keys
+// PATCH /api_keys/{api_key_id}
string data = @"{
'name': 'A New Hope'
@@ -65,9 +65,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve an existing API Key #
-# GET /api_keys/{api_key_id} #
+////////////////////////////////////////////////////////
+// Retrieve an existing API Key
+// GET /api_keys/{api_key_id}
var api_key_id = "test_url_param";
dynamic response = sg.client.api_keys._(api_key_id).get();
@@ -76,9 +76,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete API keys #
-# DELETE /api_keys/{api_key_id} #
+////////////////////////////////////////////////////////
+// Delete API keys
+// DELETE /api_keys/{api_key_id}
var api_key_id = "test_url_param";
dynamic response = sg.client.api_keys._(api_key_id).delete();
diff --git a/examples/asm/asm.cs b/examples/asm/asm.cs
index 14cd77c..4f5bde7 100644
--- a/examples/asm/asm.cs
+++ b/examples/asm/asm.cs
@@ -5,14 +5,14 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create a Group #
-# POST /asm/groups #
+////////////////////////////////////////////////////////
+// Create a new suppression group
+// POST /asm/groups
string data = @"{
- 'description': 'A group description',
- 'is_default': false,
- 'name': 'A group name'
+ 'description': 'Suggestions for products our users might like.',
+ 'is_default': true,
+ 'name': 'Product Suggestions'
}";
dynamic response = sg.client.asm.groups.post(requestBody: data);
Console.WriteLine(response.StatusCode);
@@ -20,19 +20,22 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all suppression groups associated with the user. #
-# GET /asm/groups #
+////////////////////////////////////////////////////////
+// Retrieve information about multiple suppression groups
+// GET /asm/groups
-dynamic response = sg.client.asm.groups.get();
+string queryParams = @"{
+ 'id': 1
+}";
+dynamic response = sg.client.asm.groups.get(queryParams: queryParams);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a suppression group. #
-# PATCH /asm/groups/{group_id} #
+////////////////////////////////////////////////////////
+// Update a suppression group.
+// PATCH /asm/groups/{group_id}
string data = @"{
'description': 'Suggestions for items our users might like.',
@@ -46,9 +49,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Get information on a single suppression group. #
-# GET /asm/groups/{group_id} #
+////////////////////////////////////////////////////////
+// Get information on a single suppression group.
+// GET /asm/groups/{group_id}
var group_id = "test_url_param";
dynamic response = sg.client.asm.groups._(group_id).get();
@@ -57,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a suppression group. #
-# DELETE /asm/groups/{group_id} #
+////////////////////////////////////////////////////////
+// Delete a suppression group.
+// DELETE /asm/groups/{group_id}
var group_id = "test_url_param";
dynamic response = sg.client.asm.groups._(group_id).delete();
@@ -68,9 +71,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add suppressions to a suppression group #
-# POST /asm/groups/{group_id}/suppressions #
+////////////////////////////////////////////////////////
+// Add suppressions to a suppression group
+// POST /asm/groups/{group_id}/suppressions
string data = @"{
'recipient_emails': [
@@ -85,9 +88,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all suppressions for a suppression group #
-# GET /asm/groups/{group_id}/suppressions #
+////////////////////////////////////////////////////////
+// Retrieve all suppressions for a suppression group
+// GET /asm/groups/{group_id}/suppressions
var group_id = "test_url_param";
dynamic response = sg.client.asm.groups._(group_id).suppressions.get();
@@ -96,9 +99,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a suppression from a suppression group #
-# DELETE /asm/groups/{group_id}/suppressions/{email} #
+////////////////////////////////////////////////////////
+// Delete a suppression from a suppression group
+// DELETE /asm/groups/{group_id}/suppressions/{email}
var group_id = "test_url_param";
var email = "test_url_param";
@@ -108,9 +111,19 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add recipient addresses to the global suppression group. #
-# POST /asm/suppressions/global #
+////////////////////////////////////////////////////////
+// Retrieve all suppressions
+// GET /asm/suppressions
+
+dynamic response = sg.client.asm.suppressions.get();
+Console.WriteLine(response.StatusCode);
+Console.WriteLine(response.Body.ReadAsStringAsync().Result);
+Console.WriteLine(response.Headers.ToString());
+Console.ReadLine();
+
+////////////////////////////////////////////////////////
+// Add recipient addresses to the global suppression group.
+// POST /asm/suppressions/global
string data = @"{
'recipient_emails': [
@@ -124,9 +137,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a Global Suppression #
-# GET /asm/suppressions/global/{email} #
+////////////////////////////////////////////////////////
+// Retrieve a Global Suppression
+// GET /asm/suppressions/global/{email}
var email = "test_url_param";
dynamic response = sg.client.asm.suppressions.global._(email).get();
@@ -135,9 +148,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a Global Suppression #
-# DELETE /asm/suppressions/global/{email} #
+////////////////////////////////////////////////////////
+// Delete a Global Suppression
+// DELETE /asm/suppressions/global/{email}
var email = "test_url_param";
dynamic response = sg.client.asm.suppressions.global._(email).delete();
@@ -146,3 +159,14 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
+////////////////////////////////////////////////////////
+// Retrieve all suppression groups for an email address
+// GET /asm/suppressions/{email}
+
+var email = "test_url_param";
+dynamic response = sg.client.asm.suppressions._(email).get();
+Console.WriteLine(response.StatusCode);
+Console.WriteLine(response.Body.ReadAsStringAsync().Result);
+Console.WriteLine(response.Headers.ToString());
+Console.ReadLine();
+
diff --git a/examples/browsers/browsers.cs b/examples/browsers/browsers.cs
index e75de7b..43d52e5 100644
--- a/examples/browsers/browsers.cs
+++ b/examples/browsers/browsers.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve email statistics by browser. #
-# GET /browsers/stats #
+////////////////////////////////////////////////////////
+// Retrieve email statistics by browser.
+// GET /browsers/stats
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/campaigns/campaigns.cs b/examples/campaigns/campaigns.cs
index fbae7f4..03bbadc 100644
--- a/examples/campaigns/campaigns.cs
+++ b/examples/campaigns/campaigns.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create a Campaign #
-# POST /campaigns #
+////////////////////////////////////////////////////////
+// Create a Campaign
+// POST /campaigns
string data = @"{
'categories': [
@@ -35,9 +35,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all Campaigns #
-# GET /campaigns #
+////////////////////////////////////////////////////////
+// Retrieve all Campaigns
+// GET /campaigns
string queryParams = @"{
'limit': 0,
@@ -49,9 +49,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a Campaign #
-# PATCH /campaigns/{campaign_id} #
+////////////////////////////////////////////////////////
+// Update a Campaign
+// PATCH /campaigns/{campaign_id}
string data = @"{
'categories': [
@@ -69,9 +69,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a single campaign #
-# GET /campaigns/{campaign_id} #
+////////////////////////////////////////////////////////
+// Retrieve a single campaign
+// GET /campaigns/{campaign_id}
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).get();
@@ -80,9 +80,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a Campaign #
-# DELETE /campaigns/{campaign_id} #
+////////////////////////////////////////////////////////
+// Delete a Campaign
+// DELETE /campaigns/{campaign_id}
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).delete();
@@ -91,9 +91,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a Scheduled Campaign #
-# PATCH /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////////
+// Update a Scheduled Campaign
+// PATCH /campaigns/{campaign_id}/schedules
string data = @"{
'send_at': 1489451436
@@ -105,9 +105,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Schedule a Campaign #
-# POST /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////////
+// Schedule a Campaign
+// POST /campaigns/{campaign_id}/schedules
string data = @"{
'send_at': 1489771528
@@ -119,9 +119,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# View Scheduled Time of a Campaign #
-# GET /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////////
+// View Scheduled Time of a Campaign
+// GET /campaigns/{campaign_id}/schedules
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).schedules.get();
@@ -130,9 +130,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Unschedule a Scheduled Campaign #
-# DELETE /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////////
+// Unschedule a Scheduled Campaign
+// DELETE /campaigns/{campaign_id}/schedules
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).schedules.delete();
@@ -141,9 +141,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Send a Campaign #
-# POST /campaigns/{campaign_id}/schedules/now #
+////////////////////////////////////////////////////////
+// Send a Campaign
+// POST /campaigns/{campaign_id}/schedules/now
var campaign_id = "test_url_param";
dynamic response = sg.client.campaigns._(campaign_id).schedules.now.post();
@@ -152,9 +152,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Send a Test Campaign #
-# POST /campaigns/{campaign_id}/schedules/test #
+////////////////////////////////////////////////////////
+// Send a Test Campaign
+// POST /campaigns/{campaign_id}/schedules/test
string data = @"{
'to': 'your.email@example.com'
diff --git a/examples/categories/categories.cs b/examples/categories/categories.cs
index c8fe5cc..82899ea 100644
--- a/examples/categories/categories.cs
+++ b/examples/categories/categories.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve all categories #
-# GET /categories #
+////////////////////////////////////////////////////////
+// Retrieve all categories
+// GET /categories
string queryParams = @"{
'category': 'test_string',
@@ -20,9 +20,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Email Statistics for Categories #
-# GET /categories/stats #
+////////////////////////////////////////////////////////
+// Retrieve Email Statistics for Categories
+// GET /categories/stats
string queryParams = @"{
'aggregated_by': 'day',
@@ -38,9 +38,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?] #
-# GET /categories/stats/sums #
+////////////////////////////////////////////////////////
+// Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?]
+// GET /categories/stats/sums
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/clients/clients.cs b/examples/clients/clients.cs
index e275267..ecefdcd 100644
--- a/examples/clients/clients.cs
+++ b/examples/clients/clients.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve email statistics by client type. #
-# GET /clients/stats #
+////////////////////////////////////////////////////////
+// Retrieve email statistics by client type.
+// GET /clients/stats
string queryParams = @"{
'aggregated_by': 'day',
@@ -20,9 +20,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve stats by a specific client type. #
-# GET /clients/{client_type}/stats #
+////////////////////////////////////////////////////////
+// Retrieve stats by a specific client type.
+// GET /clients/{client_type}/stats
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/contactdb/contactdb.cs b/examples/contactdb/contactdb.cs
index 639d060..ea388d2 100644
--- a/examples/contactdb/contactdb.cs
+++ b/examples/contactdb/contactdb.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create a Custom Field #
-# POST /contactdb/custom_fields #
+////////////////////////////////////////////////////////
+// Create a Custom Field
+// POST /contactdb/custom_fields
string data = @"{
'name': 'pet',
@@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all custom fields #
-# GET /contactdb/custom_fields #
+////////////////////////////////////////////////////////
+// Retrieve all custom fields
+// GET /contactdb/custom_fields
dynamic response = sg.client.contactdb.custom_fields.get();
Console.WriteLine(response.StatusCode);
@@ -29,9 +29,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a Custom Field #
-# GET /contactdb/custom_fields/{custom_field_id} #
+////////////////////////////////////////////////////////
+// Retrieve a Custom Field
+// GET /contactdb/custom_fields/{custom_field_id}
var custom_field_id = "test_url_param";
dynamic response = sg.client.contactdb.custom_fields._(custom_field_id).get();
@@ -40,9 +40,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a Custom Field #
-# DELETE /contactdb/custom_fields/{custom_field_id} #
+////////////////////////////////////////////////////////
+// Delete a Custom Field
+// DELETE /contactdb/custom_fields/{custom_field_id}
var custom_field_id = "test_url_param";
dynamic response = sg.client.contactdb.custom_fields._(custom_field_id).delete();
@@ -51,9 +51,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create a List #
-# POST /contactdb/lists #
+////////////////////////////////////////////////////////
+// Create a List
+// POST /contactdb/lists
string data = @"{
'name': 'your list name'
@@ -64,9 +64,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all lists #
-# GET /contactdb/lists #
+////////////////////////////////////////////////////////
+// Retrieve all lists
+// GET /contactdb/lists
dynamic response = sg.client.contactdb.lists.get();
Console.WriteLine(response.StatusCode);
@@ -74,9 +74,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete Multiple lists #
-# DELETE /contactdb/lists #
+////////////////////////////////////////////////////////
+// Delete Multiple lists
+// DELETE /contactdb/lists
string data = @"[
1,
@@ -90,9 +90,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a List #
-# PATCH /contactdb/lists/{list_id} #
+////////////////////////////////////////////////////////
+// Update a List
+// PATCH /contactdb/lists/{list_id}
string data = @"{
'name': 'newlistname'
@@ -107,9 +107,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a single list #
-# GET /contactdb/lists/{list_id} #
+////////////////////////////////////////////////////////
+// Retrieve a single list
+// GET /contactdb/lists/{list_id}
string queryParams = @"{
'list_id': 0
@@ -121,9 +121,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a List #
-# DELETE /contactdb/lists/{list_id} #
+////////////////////////////////////////////////////////
+// Delete a List
+// DELETE /contactdb/lists/{list_id}
string queryParams = @"{
'delete_contacts': 'true'
@@ -135,9 +135,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add Multiple Recipients to a List #
-# POST /contactdb/lists/{list_id}/recipients #
+////////////////////////////////////////////////////////
+// Add Multiple Recipients to a List
+// POST /contactdb/lists/{list_id}/recipients
string data = @"[
'recipient_id1',
@@ -150,9 +150,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all recipients on a List #
-# GET /contactdb/lists/{list_id}/recipients #
+////////////////////////////////////////////////////////
+// Retrieve all recipients on a List
+// GET /contactdb/lists/{list_id}/recipients
string queryParams = @"{
'list_id': 0,
@@ -166,9 +166,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add a Single Recipient to a List #
-# POST /contactdb/lists/{list_id}/recipients/{recipient_id} #
+////////////////////////////////////////////////////////
+// Add a Single Recipient to a List
+// POST /contactdb/lists/{list_id}/recipients/{recipient_id}
var list_id = "test_url_param";
var recipient_id = "test_url_param";
@@ -178,9 +178,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a Single Recipient from a Single List #
-# DELETE /contactdb/lists/{list_id}/recipients/{recipient_id} #
+////////////////////////////////////////////////////////
+// Delete a Single Recipient from a Single List
+// DELETE /contactdb/lists/{list_id}/recipients/{recipient_id}
string queryParams = @"{
'list_id': 0,
@@ -194,9 +194,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Recipient #
-# PATCH /contactdb/recipients #
+////////////////////////////////////////////////////////
+// Update Recipient
+// PATCH /contactdb/recipients
string data = @"[
{
@@ -211,9 +211,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add recipients #
-# POST /contactdb/recipients #
+////////////////////////////////////////////////////////
+// Add recipients
+// POST /contactdb/recipients
string data = @"[
{
@@ -235,9 +235,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve recipients #
-# GET /contactdb/recipients #
+////////////////////////////////////////////////////////
+// Retrieve recipients
+// GET /contactdb/recipients
string queryParams = @"{
'page': 1,
@@ -249,9 +249,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete Recipient #
-# DELETE /contactdb/recipients #
+////////////////////////////////////////////////////////
+// Delete Recipient
+// DELETE /contactdb/recipients
string data = @"[
'recipient_id1',
@@ -263,9 +263,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve the count of billable recipients #
-# GET /contactdb/recipients/billable_count #
+////////////////////////////////////////////////////////
+// Retrieve the count of billable recipients
+// GET /contactdb/recipients/billable_count
dynamic response = sg.client.contactdb.recipients.billable_count.get();
Console.WriteLine(response.StatusCode);
@@ -273,9 +273,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a Count of Recipients #
-# GET /contactdb/recipients/count #
+////////////////////////////////////////////////////////
+// Retrieve a Count of Recipients
+// GET /contactdb/recipients/count
dynamic response = sg.client.contactdb.recipients.count.get();
Console.WriteLine(response.StatusCode);
@@ -283,9 +283,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve recipients matching search criteria #
-# GET /contactdb/recipients/search #
+////////////////////////////////////////////////////////
+// Retrieve recipients matching search criteria
+// GET /contactdb/recipients/search
string queryParams = @"{
'{field_name}': 'test_string'
@@ -296,9 +296,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a single recipient #
-# GET /contactdb/recipients/{recipient_id} #
+////////////////////////////////////////////////////////
+// Retrieve a single recipient
+// GET /contactdb/recipients/{recipient_id}
var recipient_id = "test_url_param";
dynamic response = sg.client.contactdb.recipients._(recipient_id).get();
@@ -307,9 +307,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a Recipient #
-# DELETE /contactdb/recipients/{recipient_id} #
+////////////////////////////////////////////////////////
+// Delete a Recipient
+// DELETE /contactdb/recipients/{recipient_id}
var recipient_id = "test_url_param";
dynamic response = sg.client.contactdb.recipients._(recipient_id).delete();
@@ -318,9 +318,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve the lists that a recipient is on #
-# GET /contactdb/recipients/{recipient_id}/lists #
+////////////////////////////////////////////////////////
+// Retrieve the lists that a recipient is on
+// GET /contactdb/recipients/{recipient_id}/lists
var recipient_id = "test_url_param";
dynamic response = sg.client.contactdb.recipients._(recipient_id).lists.get();
@@ -329,9 +329,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve reserved fields #
-# GET /contactdb/reserved_fields #
+////////////////////////////////////////////////////////
+// Retrieve reserved fields
+// GET /contactdb/reserved_fields
dynamic response = sg.client.contactdb.reserved_fields.get();
Console.WriteLine(response.StatusCode);
@@ -339,9 +339,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create a Segment #
-# POST /contactdb/segments #
+////////////////////////////////////////////////////////
+// Create a Segment
+// POST /contactdb/segments
string data = @"{
'conditions': [
@@ -373,9 +373,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all segments #
-# GET /contactdb/segments #
+////////////////////////////////////////////////////////
+// Retrieve all segments
+// GET /contactdb/segments
dynamic response = sg.client.contactdb.segments.get();
Console.WriteLine(response.StatusCode);
@@ -383,9 +383,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a segment #
-# PATCH /contactdb/segments/{segment_id} #
+////////////////////////////////////////////////////////
+// Update a segment
+// PATCH /contactdb/segments/{segment_id}
string data = @"{
'conditions': [
@@ -409,9 +409,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a segment #
-# GET /contactdb/segments/{segment_id} #
+////////////////////////////////////////////////////////
+// Retrieve a segment
+// GET /contactdb/segments/{segment_id}
string queryParams = @"{
'segment_id': 0
@@ -423,9 +423,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a segment #
-# DELETE /contactdb/segments/{segment_id} #
+////////////////////////////////////////////////////////
+// Delete a segment
+// DELETE /contactdb/segments/{segment_id}
string queryParams = @"{
'delete_contacts': 'true'
@@ -437,9 +437,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve recipients on a segment #
-# GET /contactdb/segments/{segment_id}/recipients #
+////////////////////////////////////////////////////////
+// Retrieve recipients on a segment
+// GET /contactdb/segments/{segment_id}/recipients
string queryParams = @"{
'page': 1,
diff --git a/examples/devices/devices.cs b/examples/devices/devices.cs
index 2e58403..e813871 100644
--- a/examples/devices/devices.cs
+++ b/examples/devices/devices.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve email statistics by device type. #
-# GET /devices/stats #
+////////////////////////////////////////////////////////
+// Retrieve email statistics by device type.
+// GET /devices/stats
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/geo/geo.cs b/examples/geo/geo.cs
index 21268f4..25faa04 100644
--- a/examples/geo/geo.cs
+++ b/examples/geo/geo.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve email statistics by country and state/province. #
-# GET /geo/stats #
+////////////////////////////////////////////////////////
+// Retrieve email statistics by country and state/province.
+// GET /geo/stats
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/ips/ips.cs b/examples/ips/ips.cs
index 077eedc..640da91 100644
--- a/examples/ips/ips.cs
+++ b/examples/ips/ips.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve all IP addresses #
-# GET /ips #
+////////////////////////////////////////////////////////
+// Retrieve all IP addresses
+// GET /ips
string queryParams = @"{
'exclude_whitelabels': 'true',
@@ -22,9 +22,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all assigned IPs #
-# GET /ips/assigned #
+////////////////////////////////////////////////////////
+// Retrieve all assigned IPs
+// GET /ips/assigned
dynamic response = sg.client.ips.assigned.get();
Console.WriteLine(response.StatusCode);
@@ -32,9 +32,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create an IP pool. #
-# POST /ips/pools #
+////////////////////////////////////////////////////////
+// Create an IP pool.
+// POST /ips/pools
string data = @"{
'name': 'marketing'
@@ -45,9 +45,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all IP pools. #
-# GET /ips/pools #
+////////////////////////////////////////////////////////
+// Retrieve all IP pools.
+// GET /ips/pools
dynamic response = sg.client.ips.pools.get();
Console.WriteLine(response.StatusCode);
@@ -55,9 +55,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update an IP pools name. #
-# PUT /ips/pools/{pool_name} #
+////////////////////////////////////////////////////////
+// Update an IP pools name.
+// PUT /ips/pools/{pool_name}
string data = @"{
'name': 'new_pool_name'
@@ -69,9 +69,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all IPs in a specified pool. #
-# GET /ips/pools/{pool_name} #
+////////////////////////////////////////////////////////
+// Retrieve all IPs in a specified pool.
+// GET /ips/pools/{pool_name}
var pool_name = "test_url_param";
dynamic response = sg.client.ips.pools._(pool_name).get();
@@ -80,9 +80,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete an IP pool. #
-# DELETE /ips/pools/{pool_name} #
+////////////////////////////////////////////////////////
+// Delete an IP pool.
+// DELETE /ips/pools/{pool_name}
var pool_name = "test_url_param";
dynamic response = sg.client.ips.pools._(pool_name).delete();
@@ -91,9 +91,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add an IP address to a pool #
-# POST /ips/pools/{pool_name}/ips #
+////////////////////////////////////////////////////////
+// Add an IP address to a pool
+// POST /ips/pools/{pool_name}/ips
string data = @"{
'ip': '0.0.0.0'
@@ -105,9 +105,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Remove an IP address from a pool. #
-# DELETE /ips/pools/{pool_name}/ips/{ip} #
+////////////////////////////////////////////////////////
+// Remove an IP address from a pool.
+// DELETE /ips/pools/{pool_name}/ips/{ip}
var pool_name = "test_url_param";
var ip = "test_url_param";
@@ -117,9 +117,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add an IP to warmup #
-# POST /ips/warmup #
+////////////////////////////////////////////////////////
+// Add an IP to warmup
+// POST /ips/warmup
string data = @"{
'ip': '0.0.0.0'
@@ -130,9 +130,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all IPs currently in warmup #
-# GET /ips/warmup #
+////////////////////////////////////////////////////////
+// Retrieve all IPs currently in warmup
+// GET /ips/warmup
dynamic response = sg.client.ips.warmup.get();
Console.WriteLine(response.StatusCode);
@@ -140,9 +140,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve warmup status for a specific IP address #
-# GET /ips/warmup/{ip_address} #
+////////////////////////////////////////////////////////
+// Retrieve warmup status for a specific IP address
+// GET /ips/warmup/{ip_address}
var ip_address = "test_url_param";
dynamic response = sg.client.ips.warmup._(ip_address).get();
@@ -151,9 +151,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Remove an IP from warmup #
-# DELETE /ips/warmup/{ip_address} #
+////////////////////////////////////////////////////////
+// Remove an IP from warmup
+// DELETE /ips/warmup/{ip_address}
var ip_address = "test_url_param";
dynamic response = sg.client.ips.warmup._(ip_address).delete();
@@ -162,9 +162,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all IP pools an IP address belongs to #
-# GET /ips/{ip_address} #
+////////////////////////////////////////////////////////
+// Retrieve all IP pools an IP address belongs to
+// GET /ips/{ip_address}
var ip_address = "test_url_param";
dynamic response = sg.client.ips._(ip_address).get();
diff --git a/examples/mail/mail.cs b/examples/mail/mail.cs
index 6ff86f9..0500958 100644
--- a/examples/mail/mail.cs
+++ b/examples/mail/mail.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create a batch ID #
-# POST /mail/batch #
+////////////////////////////////////////////////////////
+// Create a batch ID
+// POST /mail/batch
dynamic response = sg.client.mail.batch.post();
Console.WriteLine(response.StatusCode);
@@ -15,9 +15,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Validate batch ID #
-# GET /mail/batch/{batch_id} #
+////////////////////////////////////////////////////////
+// Validate batch ID
+// GET /mail/batch/{batch_id}
var batch_id = "test_url_param";
dynamic response = sg.client.mail.batch._(batch_id).get();
@@ -26,9 +26,10 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# v3 Mail Send Beta #
-# POST /mail/send/beta #
+////////////////////////////////////////////////////////
+// v3 Mail Send Beta
+// POST /mail/send/beta
+# This endpoint has a helper, check it out [here](https://github.com/sendgrid/sendgrid-csharp/blob/v3beta/SendGrid/SendGrid/Helpers/Mail/README.md).
string data = @"{
'asm': {
diff --git a/examples/mailboxproviders/mailboxproviders.cs b/examples/mailboxproviders/mailboxproviders.cs
index f0af12a..b307fc4 100644
--- a/examples/mailboxproviders/mailboxproviders.cs
+++ b/examples/mailboxproviders/mailboxproviders.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve email statistics by mailbox provider. #
-# GET /mailbox_providers/stats #
+////////////////////////////////////////////////////////
+// Retrieve email statistics by mailbox provider.
+// GET /mailbox_providers/stats
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/mailsettings/mailsettings.cs b/examples/mailsettings/mailsettings.cs
index 6af284f..8f0c519 100644
--- a/examples/mailsettings/mailsettings.cs
+++ b/examples/mailsettings/mailsettings.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve all mail settings #
-# GET /mail_settings #
+////////////////////////////////////////////////////////
+// Retrieve all mail settings
+// GET /mail_settings
string queryParams = @"{
'limit': 1,
@@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update address whitelist mail settings #
-# PATCH /mail_settings/address_whitelist #
+////////////////////////////////////////////////////////
+// Update address whitelist mail settings
+// PATCH /mail_settings/address_whitelist
string data = @"{
'enabled': true,
@@ -36,9 +36,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve address whitelist mail settings #
-# GET /mail_settings/address_whitelist #
+////////////////////////////////////////////////////////
+// Retrieve address whitelist mail settings
+// GET /mail_settings/address_whitelist
dynamic response = sg.client.mail_settings.address_whitelist.get();
Console.WriteLine(response.StatusCode);
@@ -46,9 +46,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update BCC mail settings #
-# PATCH /mail_settings/bcc #
+////////////////////////////////////////////////////////
+// Update BCC mail settings
+// PATCH /mail_settings/bcc
string data = @"{
'email': 'email@example.com',
@@ -60,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all BCC mail settings #
-# GET /mail_settings/bcc #
+////////////////////////////////////////////////////////
+// Retrieve all BCC mail settings
+// GET /mail_settings/bcc
dynamic response = sg.client.mail_settings.bcc.get();
Console.WriteLine(response.StatusCode);
@@ -70,9 +70,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update bounce purge mail settings #
-# PATCH /mail_settings/bounce_purge #
+////////////////////////////////////////////////////////
+// Update bounce purge mail settings
+// PATCH /mail_settings/bounce_purge
string data = @"{
'enabled': true,
@@ -85,9 +85,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve bounce purge mail settings #
-# GET /mail_settings/bounce_purge #
+////////////////////////////////////////////////////////
+// Retrieve bounce purge mail settings
+// GET /mail_settings/bounce_purge
dynamic response = sg.client.mail_settings.bounce_purge.get();
Console.WriteLine(response.StatusCode);
@@ -95,9 +95,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update footer mail settings #
-# PATCH /mail_settings/footer #
+////////////////////////////////////////////////////////
+// Update footer mail settings
+// PATCH /mail_settings/footer
string data = @"{
'enabled': true,
@@ -110,9 +110,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve footer mail settings #
-# GET /mail_settings/footer #
+////////////////////////////////////////////////////////
+// Retrieve footer mail settings
+// GET /mail_settings/footer
dynamic response = sg.client.mail_settings.footer.get();
Console.WriteLine(response.StatusCode);
@@ -120,9 +120,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update forward bounce mail settings #
-# PATCH /mail_settings/forward_bounce #
+////////////////////////////////////////////////////////
+// Update forward bounce mail settings
+// PATCH /mail_settings/forward_bounce
string data = @"{
'email': 'example@example.com',
@@ -134,9 +134,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve forward bounce mail settings #
-# GET /mail_settings/forward_bounce #
+////////////////////////////////////////////////////////
+// Retrieve forward bounce mail settings
+// GET /mail_settings/forward_bounce
dynamic response = sg.client.mail_settings.forward_bounce.get();
Console.WriteLine(response.StatusCode);
@@ -144,9 +144,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update forward spam mail settings #
-# PATCH /mail_settings/forward_spam #
+////////////////////////////////////////////////////////
+// Update forward spam mail settings
+// PATCH /mail_settings/forward_spam
string data = @"{
'email': '',
@@ -158,9 +158,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve forward spam mail settings #
-# GET /mail_settings/forward_spam #
+////////////////////////////////////////////////////////
+// Retrieve forward spam mail settings
+// GET /mail_settings/forward_spam
dynamic response = sg.client.mail_settings.forward_spam.get();
Console.WriteLine(response.StatusCode);
@@ -168,9 +168,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update plain content mail settings #
-# PATCH /mail_settings/plain_content #
+////////////////////////////////////////////////////////
+// Update plain content mail settings
+// PATCH /mail_settings/plain_content
string data = @"{
'enabled': false
@@ -181,9 +181,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve plain content mail settings #
-# GET /mail_settings/plain_content #
+////////////////////////////////////////////////////////
+// Retrieve plain content mail settings
+// GET /mail_settings/plain_content
dynamic response = sg.client.mail_settings.plain_content.get();
Console.WriteLine(response.StatusCode);
@@ -191,9 +191,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update spam check mail settings #
-# PATCH /mail_settings/spam_check #
+////////////////////////////////////////////////////////
+// Update spam check mail settings
+// PATCH /mail_settings/spam_check
string data = @"{
'enabled': true,
@@ -206,9 +206,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve spam check mail settings #
-# GET /mail_settings/spam_check #
+////////////////////////////////////////////////////////
+// Retrieve spam check mail settings
+// GET /mail_settings/spam_check
dynamic response = sg.client.mail_settings.spam_check.get();
Console.WriteLine(response.StatusCode);
@@ -216,9 +216,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update template mail settings #
-# PATCH /mail_settings/template #
+////////////////////////////////////////////////////////
+// Update template mail settings
+// PATCH /mail_settings/template
string data = @"{
'enabled': true,
@@ -230,9 +230,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve legacy template mail settings #
-# GET /mail_settings/template #
+////////////////////////////////////////////////////////
+// Retrieve legacy template mail settings
+// GET /mail_settings/template
dynamic response = sg.client.mail_settings.template.get();
Console.WriteLine(response.StatusCode);
diff --git a/examples/partnersettings/partnersettings.cs b/examples/partnersettings/partnersettings.cs
index df30bc7..5f253b3 100644
--- a/examples/partnersettings/partnersettings.cs
+++ b/examples/partnersettings/partnersettings.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Returns a list of all partner settings. #
-# GET /partner_settings #
+////////////////////////////////////////////////////////
+// Returns a list of all partner settings.
+// GET /partner_settings
string queryParams = @"{
'limit': 1,
@@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Updates New Relic partner settings. #
-# PATCH /partner_settings/new_relic #
+////////////////////////////////////////////////////////
+// Updates New Relic partner settings.
+// PATCH /partner_settings/new_relic
string data = @"{
'enable_subuser_statistics': true,
@@ -34,9 +34,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Returns all New Relic partner settings. #
-# GET /partner_settings/new_relic #
+////////////////////////////////////////////////////////
+// Returns all New Relic partner settings.
+// GET /partner_settings/new_relic
dynamic response = sg.client.partner_settings.new_relic.get();
Console.WriteLine(response.StatusCode);
diff --git a/examples/scopes/scopes.cs b/examples/scopes/scopes.cs
index 05191af..c5a5c68 100644
--- a/examples/scopes/scopes.cs
+++ b/examples/scopes/scopes.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve a list of scopes for which this user has access. #
-# GET /scopes #
+////////////////////////////////////////////////////////
+// Retrieve a list of scopes for which this user has access.
+// GET /scopes
dynamic response = sg.client.scopes.get();
Console.WriteLine(response.StatusCode);
diff --git a/examples/stats/stats.cs b/examples/stats/stats.cs
index b608bee..a363952 100644
--- a/examples/stats/stats.cs
+++ b/examples/stats/stats.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve global email statistics #
-# GET /stats #
+////////////////////////////////////////////////////////
+// Retrieve global email statistics
+// GET /stats
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/subusers/subusers.cs b/examples/subusers/subusers.cs
index 22c68b7..208e13c 100644
--- a/examples/subusers/subusers.cs
+++ b/examples/subusers/subusers.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create Subuser #
-# POST /subusers #
+////////////////////////////////////////////////////////
+// Create Subuser
+// POST /subusers
string data = @"{
'email': 'John@example.com',
@@ -24,9 +24,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# List all Subusers #
-# GET /subusers #
+////////////////////////////////////////////////////////
+// List all Subusers
+// GET /subusers
string queryParams = @"{
'limit': 0,
@@ -39,9 +39,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Subuser Reputations #
-# GET /subusers/reputations #
+////////////////////////////////////////////////////////
+// Retrieve Subuser Reputations
+// GET /subusers/reputations
string queryParams = @"{
'usernames': 'test_string'
@@ -52,9 +52,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve email statistics for your subusers. #
-# GET /subusers/stats #
+////////////////////////////////////////////////////////
+// Retrieve email statistics for your subusers.
+// GET /subusers/stats
string queryParams = @"{
'aggregated_by': 'day',
@@ -70,9 +70,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve monthly stats for all subusers #
-# GET /subusers/stats/monthly #
+////////////////////////////////////////////////////////
+// Retrieve monthly stats for all subusers
+// GET /subusers/stats/monthly
string queryParams = @"{
'date': 'test_string',
@@ -88,9 +88,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve the totals for each email statistic metric for all subusers. #
-# GET /subusers/stats/sums #
+////////////////////////////////////////////////////////
+// Retrieve the totals for each email statistic metric for all subusers.
+// GET /subusers/stats/sums
string queryParams = @"{
'aggregated_by': 'day',
@@ -107,9 +107,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Enable/disable a subuser #
-# PATCH /subusers/{subuser_name} #
+////////////////////////////////////////////////////////
+// Enable/disable a subuser
+// PATCH /subusers/{subuser_name}
string data = @"{
'disabled': false
@@ -121,9 +121,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a subuser #
-# DELETE /subusers/{subuser_name} #
+////////////////////////////////////////////////////////
+// Delete a subuser
+// DELETE /subusers/{subuser_name}
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).delete();
@@ -132,9 +132,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update IPs assigned to a subuser #
-# PUT /subusers/{subuser_name}/ips #
+////////////////////////////////////////////////////////
+// Update IPs assigned to a subuser
+// PUT /subusers/{subuser_name}/ips
string data = @"[
'127.0.0.1'
@@ -146,9 +146,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Monitor Settings for a subuser #
-# PUT /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Update Monitor Settings for a subuser
+// PUT /subusers/{subuser_name}/monitor
string data = @"{
'email': 'example@example.com',
@@ -161,9 +161,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create monitor settings #
-# POST /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Create monitor settings
+// POST /subusers/{subuser_name}/monitor
string data = @"{
'email': 'example@example.com',
@@ -176,9 +176,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve monitor settings for a subuser #
-# GET /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Retrieve monitor settings for a subuser
+// GET /subusers/{subuser_name}/monitor
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).monitor.get();
@@ -187,9 +187,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete monitor settings #
-# DELETE /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Delete monitor settings
+// DELETE /subusers/{subuser_name}/monitor
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).monitor.delete();
@@ -198,9 +198,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve the monthly email statistics for a single subuser #
-# GET /subusers/{subuser_name}/stats/monthly #
+////////////////////////////////////////////////////////
+// Retrieve the monthly email statistics for a single subuser
+// GET /subusers/{subuser_name}/stats/monthly
string queryParams = @"{
'date': 'test_string',
diff --git a/examples/suppression/suppression.cs b/examples/suppression/suppression.cs
index 7a07513..6cd819a 100644
--- a/examples/suppression/suppression.cs
+++ b/examples/suppression/suppression.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve all blocks #
-# GET /suppression/blocks #
+////////////////////////////////////////////////////////
+// Retrieve all blocks
+// GET /suppression/blocks
string queryParams = @"{
'end_time': 1,
@@ -21,9 +21,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete blocks #
-# DELETE /suppression/blocks #
+////////////////////////////////////////////////////////
+// Delete blocks
+// DELETE /suppression/blocks
string data = @"{
'delete_all': false,
@@ -38,9 +38,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a specific block #
-# GET /suppression/blocks/{email} #
+////////////////////////////////////////////////////////
+// Retrieve a specific block
+// GET /suppression/blocks/{email}
var email = "test_url_param";
dynamic response = sg.client.suppression.blocks._(email).get();
@@ -49,9 +49,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a specific block #
-# DELETE /suppression/blocks/{email} #
+////////////////////////////////////////////////////////
+// Delete a specific block
+// DELETE /suppression/blocks/{email}
var email = "test_url_param";
dynamic response = sg.client.suppression.blocks._(email).delete();
@@ -60,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all bounces #
-# GET /suppression/bounces #
+////////////////////////////////////////////////////////
+// Retrieve all bounces
+// GET /suppression/bounces
string queryParams = @"{
'end_time': 0,
@@ -74,9 +74,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete bounces #
-# DELETE /suppression/bounces #
+////////////////////////////////////////////////////////
+// Delete bounces
+// DELETE /suppression/bounces
string data = @"{
'delete_all': true,
@@ -91,9 +91,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a Bounce #
-# GET /suppression/bounces/{email} #
+////////////////////////////////////////////////////////
+// Retrieve a Bounce
+// GET /suppression/bounces/{email}
var email = "test_url_param";
dynamic response = sg.client.suppression.bounces._(email).get();
@@ -102,9 +102,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a bounce #
-# DELETE /suppression/bounces/{email} #
+////////////////////////////////////////////////////////
+// Delete a bounce
+// DELETE /suppression/bounces/{email}
string queryParams = @"{
'email_address': 'example@example.com'
@@ -116,9 +116,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all invalid emails #
-# GET /suppression/invalid_emails #
+////////////////////////////////////////////////////////
+// Retrieve all invalid emails
+// GET /suppression/invalid_emails
string queryParams = @"{
'end_time': 1,
@@ -132,9 +132,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete invalid emails #
-# DELETE /suppression/invalid_emails #
+////////////////////////////////////////////////////////
+// Delete invalid emails
+// DELETE /suppression/invalid_emails
string data = @"{
'delete_all': false,
@@ -149,9 +149,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a specific invalid email #
-# GET /suppression/invalid_emails/{email} #
+////////////////////////////////////////////////////////
+// Retrieve a specific invalid email
+// GET /suppression/invalid_emails/{email}
var email = "test_url_param";
dynamic response = sg.client.suppression.invalid_emails._(email).get();
@@ -160,9 +160,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a specific invalid email #
-# DELETE /suppression/invalid_emails/{email} #
+////////////////////////////////////////////////////////
+// Delete a specific invalid email
+// DELETE /suppression/invalid_emails/{email}
var email = "test_url_param";
dynamic response = sg.client.suppression.invalid_emails._(email).delete();
@@ -171,9 +171,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a specific spam report #
-# GET /suppression/spam_report/{email} #
+////////////////////////////////////////////////////////
+// Retrieve a specific spam report
+// GET /suppression/spam_report/{email}
var email = "test_url_param";
dynamic response = sg.client.suppression.spam_report._(email).get();
@@ -182,9 +182,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a specific spam report #
-# DELETE /suppression/spam_report/{email} #
+////////////////////////////////////////////////////////
+// Delete a specific spam report
+// DELETE /suppression/spam_report/{email}
var email = "test_url_param";
dynamic response = sg.client.suppression.spam_report._(email).delete();
@@ -193,9 +193,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all spam reports #
-# GET /suppression/spam_reports #
+////////////////////////////////////////////////////////
+// Retrieve all spam reports
+// GET /suppression/spam_reports
string queryParams = @"{
'end_time': 1,
@@ -209,9 +209,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete spam reports #
-# DELETE /suppression/spam_reports #
+////////////////////////////////////////////////////////
+// Delete spam reports
+// DELETE /suppression/spam_reports
string data = @"{
'delete_all': false,
@@ -226,9 +226,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all global suppressions #
-# GET /suppression/unsubscribes #
+////////////////////////////////////////////////////////
+// Retrieve all global suppressions
+// GET /suppression/unsubscribes
string queryParams = @"{
'end_time': 1,
diff --git a/examples/templates/templates.cs b/examples/templates/templates.cs
index f148a20..beea4d0 100644
--- a/examples/templates/templates.cs
+++ b/examples/templates/templates.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create a transactional template. #
-# POST /templates #
+////////////////////////////////////////////////////////
+// Create a transactional template.
+// POST /templates
string data = @"{
'name': 'example_name'
@@ -18,9 +18,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all transactional templates. #
-# GET /templates #
+////////////////////////////////////////////////////////
+// Retrieve all transactional templates.
+// GET /templates
dynamic response = sg.client.templates.get();
Console.WriteLine(response.StatusCode);
@@ -28,9 +28,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Edit a transactional template. #
-# PATCH /templates/{template_id} #
+////////////////////////////////////////////////////////
+// Edit a transactional template.
+// PATCH /templates/{template_id}
string data = @"{
'name': 'new_example_name'
@@ -42,9 +42,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a single transactional template. #
-# GET /templates/{template_id} #
+////////////////////////////////////////////////////////
+// Retrieve a single transactional template.
+// GET /templates/{template_id}
var template_id = "test_url_param";
dynamic response = sg.client.templates._(template_id).get();
@@ -53,9 +53,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a template. #
-# DELETE /templates/{template_id} #
+////////////////////////////////////////////////////////
+// Delete a template.
+// DELETE /templates/{template_id}
var template_id = "test_url_param";
dynamic response = sg.client.templates._(template_id).delete();
@@ -64,9 +64,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create a new transactional template version. #
-# POST /templates/{template_id}/versions #
+////////////////////////////////////////////////////////
+// Create a new transactional template version.
+// POST /templates/{template_id}/versions
string data = @"{
'active': 1,
@@ -83,9 +83,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Edit a transactional template version. #
-# PATCH /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////////
+// Edit a transactional template version.
+// PATCH /templates/{template_id}/versions/{version_id}
string data = @"{
'active': 1,
@@ -102,9 +102,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a specific transactional template version. #
-# GET /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////////
+// Retrieve a specific transactional template version.
+// GET /templates/{template_id}/versions/{version_id}
var template_id = "test_url_param";
var version_id = "test_url_param";
@@ -114,9 +114,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a transactional template version. #
-# DELETE /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////////
+// Delete a transactional template version.
+// DELETE /templates/{template_id}/versions/{version_id}
var template_id = "test_url_param";
var version_id = "test_url_param";
@@ -126,9 +126,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Activate a transactional template version. #
-# POST /templates/{template_id}/versions/{version_id}/activate #
+////////////////////////////////////////////////////////
+// Activate a transactional template version.
+// POST /templates/{template_id}/versions/{version_id}/activate
var template_id = "test_url_param";
var version_id = "test_url_param";
diff --git a/examples/trackingsettings/trackingsettings.cs b/examples/trackingsettings/trackingsettings.cs
index c6a0eb1..cba044d 100644
--- a/examples/trackingsettings/trackingsettings.cs
+++ b/examples/trackingsettings/trackingsettings.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Retrieve Tracking Settings #
-# GET /tracking_settings #
+////////////////////////////////////////////////////////
+// Retrieve Tracking Settings
+// GET /tracking_settings
string queryParams = @"{
'limit': 1,
@@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Click Tracking Settings #
-# PATCH /tracking_settings/click #
+////////////////////////////////////////////////////////
+// Update Click Tracking Settings
+// PATCH /tracking_settings/click
string data = @"{
'enabled': true
@@ -32,9 +32,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Click Track Settings #
-# GET /tracking_settings/click #
+////////////////////////////////////////////////////////
+// Retrieve Click Track Settings
+// GET /tracking_settings/click
dynamic response = sg.client.tracking_settings.click.get();
Console.WriteLine(response.StatusCode);
@@ -42,9 +42,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Google Analytics Settings #
-# PATCH /tracking_settings/google_analytics #
+////////////////////////////////////////////////////////
+// Update Google Analytics Settings
+// PATCH /tracking_settings/google_analytics
string data = @"{
'enabled': true,
@@ -60,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Google Analytics Settings #
-# GET /tracking_settings/google_analytics #
+////////////////////////////////////////////////////////
+// Retrieve Google Analytics Settings
+// GET /tracking_settings/google_analytics
dynamic response = sg.client.tracking_settings.google_analytics.get();
Console.WriteLine(response.StatusCode);
@@ -70,9 +70,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Open Tracking Settings #
-# PATCH /tracking_settings/open #
+////////////////////////////////////////////////////////
+// Update Open Tracking Settings
+// PATCH /tracking_settings/open
string data = @"{
'enabled': true
@@ -83,9 +83,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Get Open Tracking Settings #
-# GET /tracking_settings/open #
+////////////////////////////////////////////////////////
+// Get Open Tracking Settings
+// GET /tracking_settings/open
dynamic response = sg.client.tracking_settings.open.get();
Console.WriteLine(response.StatusCode);
@@ -93,9 +93,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Subscription Tracking Settings #
-# PATCH /tracking_settings/subscription #
+////////////////////////////////////////////////////////
+// Update Subscription Tracking Settings
+// PATCH /tracking_settings/subscription
string data = @"{
'enabled': true,
@@ -111,9 +111,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Subscription Tracking Settings #
-# GET /tracking_settings/subscription #
+////////////////////////////////////////////////////////
+// Retrieve Subscription Tracking Settings
+// GET /tracking_settings/subscription
dynamic response = sg.client.tracking_settings.subscription.get();
Console.WriteLine(response.StatusCode);
diff --git a/examples/user/user.cs b/examples/user/user.cs
index e57a8c9..c81acc6 100644
--- a/examples/user/user.cs
+++ b/examples/user/user.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Get a user's account information. #
-# GET /user/account #
+////////////////////////////////////////////////////////
+// Get a user's account information.
+// GET /user/account
dynamic response = sg.client.user.account.get();
Console.WriteLine(response.StatusCode);
@@ -15,9 +15,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve your credit balance #
-# GET /user/credits #
+////////////////////////////////////////////////////////
+// Retrieve your credit balance
+// GET /user/credits
dynamic response = sg.client.user.credits.get();
Console.WriteLine(response.StatusCode);
@@ -25,9 +25,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update your account email address #
-# PUT /user/email #
+////////////////////////////////////////////////////////
+// Update your account email address
+// PUT /user/email
string data = @"{
'email': 'example@example.com'
@@ -38,9 +38,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve your account email address #
-# GET /user/email #
+////////////////////////////////////////////////////////
+// Retrieve your account email address
+// GET /user/email
dynamic response = sg.client.user.email.get();
Console.WriteLine(response.StatusCode);
@@ -48,9 +48,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update your password #
-# PUT /user/password #
+////////////////////////////////////////////////////////
+// Update your password
+// PUT /user/password
string data = @"{
'new_password': 'new_password',
@@ -62,9 +62,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a user's profile #
-# PATCH /user/profile #
+////////////////////////////////////////////////////////
+// Update a user's profile
+// PATCH /user/profile
string data = @"{
'city': 'Orange',
@@ -77,9 +77,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Get a user's profile #
-# GET /user/profile #
+////////////////////////////////////////////////////////
+// Get a user's profile
+// GET /user/profile
dynamic response = sg.client.user.profile.get();
Console.WriteLine(response.StatusCode);
@@ -87,9 +87,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Cancel or pause a scheduled send #
-# POST /user/scheduled_sends #
+////////////////////////////////////////////////////////
+// Cancel or pause a scheduled send
+// POST /user/scheduled_sends
string data = @"{
'batch_id': 'YOUR_BATCH_ID',
@@ -101,9 +101,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all scheduled sends #
-# GET /user/scheduled_sends #
+////////////////////////////////////////////////////////
+// Retrieve all scheduled sends
+// GET /user/scheduled_sends
dynamic response = sg.client.user.scheduled_sends.get();
Console.WriteLine(response.StatusCode);
@@ -111,9 +111,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update user scheduled send information #
-# PATCH /user/scheduled_sends/{batch_id} #
+////////////////////////////////////////////////////////
+// Update user scheduled send information
+// PATCH /user/scheduled_sends/{batch_id}
string data = @"{
'status': 'pause'
@@ -125,9 +125,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve scheduled send #
-# GET /user/scheduled_sends/{batch_id} #
+////////////////////////////////////////////////////////
+// Retrieve scheduled send
+// GET /user/scheduled_sends/{batch_id}
var batch_id = "test_url_param";
dynamic response = sg.client.user.scheduled_sends._(batch_id).get();
@@ -136,9 +136,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a cancellation or pause of a scheduled send #
-# DELETE /user/scheduled_sends/{batch_id} #
+////////////////////////////////////////////////////////
+// Delete a cancellation or pause of a scheduled send
+// DELETE /user/scheduled_sends/{batch_id}
var batch_id = "test_url_param";
dynamic response = sg.client.user.scheduled_sends._(batch_id).delete();
@@ -147,9 +147,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Enforced TLS settings #
-# PATCH /user/settings/enforced_tls #
+////////////////////////////////////////////////////////
+// Update Enforced TLS settings
+// PATCH /user/settings/enforced_tls
string data = @"{
'require_tls': true,
@@ -161,9 +161,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve current Enforced TLS settings. #
-# GET /user/settings/enforced_tls #
+////////////////////////////////////////////////////////
+// Retrieve current Enforced TLS settings.
+// GET /user/settings/enforced_tls
dynamic response = sg.client.user.settings.enforced_tls.get();
Console.WriteLine(response.StatusCode);
@@ -171,9 +171,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update your username #
-# PUT /user/username #
+////////////////////////////////////////////////////////
+// Update your username
+// PUT /user/username
string data = @"{
'username': 'test_username'
@@ -184,9 +184,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve your username #
-# GET /user/username #
+////////////////////////////////////////////////////////
+// Retrieve your username
+// GET /user/username
dynamic response = sg.client.user.username.get();
Console.WriteLine(response.StatusCode);
@@ -194,9 +194,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Event Notification Settings #
-# PATCH /user/webhooks/event/settings #
+////////////////////////////////////////////////////////
+// Update Event Notification Settings
+// PATCH /user/webhooks/event/settings
string data = @"{
'bounce': true,
@@ -219,9 +219,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Event Webhook settings #
-# GET /user/webhooks/event/settings #
+////////////////////////////////////////////////////////
+// Retrieve Event Webhook settings
+// GET /user/webhooks/event/settings
dynamic response = sg.client.user.webhooks._("event").settings.get();
Console.WriteLine(response.StatusCode);
@@ -229,9 +229,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Test Event Notification Settings #
-# POST /user/webhooks/event/test #
+////////////////////////////////////////////////////////
+// Test Event Notification Settings
+// POST /user/webhooks/event/test
string data = @"{
'url': 'url'
@@ -242,9 +242,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Parse Webhook settings #
-# GET /user/webhooks/parse/settings #
+////////////////////////////////////////////////////////
+// Retrieve Parse Webhook settings
+// GET /user/webhooks/parse/settings
dynamic response = sg.client.user.webhooks.parse.settings.get();
Console.WriteLine(response.StatusCode);
@@ -252,9 +252,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieves Inbound Parse Webhook statistics. #
-# GET /user/webhooks/parse/stats #
+////////////////////////////////////////////////////////
+// Retrieves Inbound Parse Webhook statistics.
+// GET /user/webhooks/parse/stats
string queryParams = @"{
'aggregated_by': 'day',
diff --git a/examples/whitelabel/whitelabel.cs b/examples/whitelabel/whitelabel.cs
index 8d4905e..80be1c1 100644
--- a/examples/whitelabel/whitelabel.cs
+++ b/examples/whitelabel/whitelabel.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create a domain whitelabel. #
-# POST /whitelabel/domains #
+////////////////////////////////////////////////////////
+// Create a domain whitelabel.
+// POST /whitelabel/domains
string data = @"{
'automatic_security': false,
@@ -27,9 +27,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# List all domain whitelabels. #
-# GET /whitelabel/domains #
+////////////////////////////////////////////////////////
+// List all domain whitelabels.
+// GET /whitelabel/domains
string queryParams = @"{
'domain': 'test_string',
@@ -44,9 +44,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Get the default domain whitelabel. #
-# GET /whitelabel/domains/default #
+////////////////////////////////////////////////////////
+// Get the default domain whitelabel.
+// GET /whitelabel/domains/default
dynamic response = sg.client.whitelabel.domains._("default").get();
Console.WriteLine(response.StatusCode);
@@ -54,9 +54,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# List the domain whitelabel associated with the given user. #
-# GET /whitelabel/domains/subuser #
+////////////////////////////////////////////////////////
+// List the domain whitelabel associated with the given user.
+// GET /whitelabel/domains/subuser
dynamic response = sg.client.whitelabel.domains.subuser.get();
Console.WriteLine(response.StatusCode);
@@ -64,9 +64,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Disassociate a domain whitelabel from a given user. #
-# DELETE /whitelabel/domains/subuser #
+////////////////////////////////////////////////////////
+// Disassociate a domain whitelabel from a given user.
+// DELETE /whitelabel/domains/subuser
dynamic response = sg.client.whitelabel.domains.subuser.delete();
Console.WriteLine(response.StatusCode);
@@ -74,9 +74,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a domain whitelabel. #
-# PATCH /whitelabel/domains/{domain_id} #
+////////////////////////////////////////////////////////
+// Update a domain whitelabel.
+// PATCH /whitelabel/domains/{domain_id}
string data = @"{
'custom_spf': true,
@@ -89,9 +89,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a domain whitelabel. #
-# GET /whitelabel/domains/{domain_id} #
+////////////////////////////////////////////////////////
+// Retrieve a domain whitelabel.
+// GET /whitelabel/domains/{domain_id}
var domain_id = "test_url_param";
dynamic response = sg.client.whitelabel.domains._(domain_id).get();
@@ -100,9 +100,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a domain whitelabel. #
-# DELETE /whitelabel/domains/{domain_id} #
+////////////////////////////////////////////////////////
+// Delete a domain whitelabel.
+// DELETE /whitelabel/domains/{domain_id}
var domain_id = "test_url_param";
dynamic response = sg.client.whitelabel.domains._(domain_id).delete();
@@ -111,9 +111,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Associate a domain whitelabel with a given user. #
-# POST /whitelabel/domains/{domain_id}/subuser #
+////////////////////////////////////////////////////////
+// Associate a domain whitelabel with a given user.
+// POST /whitelabel/domains/{domain_id}/subuser
string data = @"{
'username': 'jane@example.com'
@@ -125,9 +125,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Add an IP to a domain whitelabel. #
-# POST /whitelabel/domains/{id}/ips #
+////////////////////////////////////////////////////////
+// Add an IP to a domain whitelabel.
+// POST /whitelabel/domains/{id}/ips
string data = @"{
'ip': '192.168.0.1'
@@ -139,9 +139,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Remove an IP from a domain whitelabel. #
-# DELETE /whitelabel/domains/{id}/ips/{ip} #
+////////////////////////////////////////////////////////
+// Remove an IP from a domain whitelabel.
+// DELETE /whitelabel/domains/{id}/ips/{ip}
var id = "test_url_param";
var ip = "test_url_param";
@@ -151,9 +151,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Validate a domain whitelabel. #
-# POST /whitelabel/domains/{id}/validate #
+////////////////////////////////////////////////////////
+// Validate a domain whitelabel.
+// POST /whitelabel/domains/{id}/validate
var id = "test_url_param";
dynamic response = sg.client.whitelabel.domains._(id).validate.post();
@@ -162,9 +162,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create an IP whitelabel #
-# POST /whitelabel/ips #
+////////////////////////////////////////////////////////
+// Create an IP whitelabel
+// POST /whitelabel/ips
string data = @"{
'domain': 'example.com',
@@ -177,9 +177,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all IP whitelabels #
-# GET /whitelabel/ips #
+////////////////////////////////////////////////////////
+// Retrieve all IP whitelabels
+// GET /whitelabel/ips
string queryParams = @"{
'ip': 'test_string',
@@ -192,9 +192,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve an IP whitelabel #
-# GET /whitelabel/ips/{id} #
+////////////////////////////////////////////////////////
+// Retrieve an IP whitelabel
+// GET /whitelabel/ips/{id}
var id = "test_url_param";
dynamic response = sg.client.whitelabel.ips._(id).get();
@@ -203,9 +203,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete an IP whitelabel #
-# DELETE /whitelabel/ips/{id} #
+////////////////////////////////////////////////////////
+// Delete an IP whitelabel
+// DELETE /whitelabel/ips/{id}
var id = "test_url_param";
dynamic response = sg.client.whitelabel.ips._(id).delete();
@@ -214,9 +214,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Validate an IP whitelabel #
-# POST /whitelabel/ips/{id}/validate #
+////////////////////////////////////////////////////////
+// Validate an IP whitelabel
+// POST /whitelabel/ips/{id}/validate
var id = "test_url_param";
dynamic response = sg.client.whitelabel.ips._(id).validate.post();
@@ -225,9 +225,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create a Link Whitelabel #
-# POST /whitelabel/links #
+////////////////////////////////////////////////////////
+// Create a Link Whitelabel
+// POST /whitelabel/links
string data = @"{
'default': true,
@@ -244,9 +244,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all link whitelabels #
-# GET /whitelabel/links #
+////////////////////////////////////////////////////////
+// Retrieve all link whitelabels
+// GET /whitelabel/links
string queryParams = @"{
'limit': 1
@@ -257,9 +257,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a Default Link Whitelabel #
-# GET /whitelabel/links/default #
+////////////////////////////////////////////////////////
+// Retrieve a Default Link Whitelabel
+// GET /whitelabel/links/default
string queryParams = @"{
'domain': 'test_string'
@@ -270,9 +270,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Associated Link Whitelabel #
-# GET /whitelabel/links/subuser #
+////////////////////////////////////////////////////////
+// Retrieve Associated Link Whitelabel
+// GET /whitelabel/links/subuser
string queryParams = @"{
'username': 'test_string'
@@ -283,9 +283,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Disassociate a Link Whitelabel #
-# DELETE /whitelabel/links/subuser #
+////////////////////////////////////////////////////////
+// Disassociate a Link Whitelabel
+// DELETE /whitelabel/links/subuser
string queryParams = @"{
'username': 'test_string'
@@ -296,9 +296,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update a Link Whitelabel #
-# PATCH /whitelabel/links/{id} #
+////////////////////////////////////////////////////////
+// Update a Link Whitelabel
+// PATCH /whitelabel/links/{id}
string data = @"{
'default': true
@@ -310,9 +310,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a Link Whitelabel #
-# GET /whitelabel/links/{id} #
+////////////////////////////////////////////////////////
+// Retrieve a Link Whitelabel
+// GET /whitelabel/links/{id}
var id = "test_url_param";
dynamic response = sg.client.whitelabel.links._(id).get();
@@ -321,9 +321,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a Link Whitelabel #
-# DELETE /whitelabel/links/{id} #
+////////////////////////////////////////////////////////
+// Delete a Link Whitelabel
+// DELETE /whitelabel/links/{id}
var id = "test_url_param";
dynamic response = sg.client.whitelabel.links._(id).delete();
@@ -332,9 +332,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Validate a Link Whitelabel #
-# POST /whitelabel/links/{id}/validate #
+////////////////////////////////////////////////////////
+// Validate a Link Whitelabel
+// POST /whitelabel/links/{id}/validate
var id = "test_url_param";
dynamic response = sg.client.whitelabel.links._(id).validate.post();
@@ -343,9 +343,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Associate a Link Whitelabel #
-# POST /whitelabel/links/{link_id}/subuser #
+////////////////////////////////////////////////////////
+// Associate a Link Whitelabel
+// POST /whitelabel/links/{link_id}/subuser
string data = @"{
'username': 'jane@example.com'