Skip to content
This repository was archived by the owner on Aug 27, 2021. It is now read-only.

Commit f9a9155

Browse files
author
Matt Bernier
committed
Merge pull request #1272 from sendgrid/develop
removed last_email_sent_at 👊
2 parents 3d66c8f + 2bab3f5 commit f9a9155

File tree

10 files changed

+187
-18
lines changed

10 files changed

+187
-18
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
language: ruby
2+
sudo: false
3+
cache: bundler
24
rvm:
35
- 2.1
46
branches:

_config.sample.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ highlighter: pygments # default python pygments have been replaced by pygments.r
3131

3232
titlecase: true # Converts page and post titles to titlecase
3333

34-
navigation: #creates a default for showing navigation unless otherwise overridden in individual file's frontmatter
35-
show: true
36-
3734
# list each of the sidebar modules you want to include, in the order you want them to appear.
3835
# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
3936
default_asides: [asides/page_navigation.html]
@@ -54,14 +51,16 @@ asset_pipeline:
5451
indextank_api_url: http://:[email protected] #get an index URL at indexden.com
5552
indextank_index: docs #set this to the index name you set on indexden.com
5653

57-
# these values are applied as regular expressions
58-
# indextank_excludes: [index.html, 404.html, ^/secret/]
54+
# language
55+
languages: ["en", "es"]
56+
exclude_from_localizations: ["javascript", "images", "css"]
5957

6058
#pages we link to from many places, change it once here. Must be added to content as {{root_url}}{{site.thisVariable}} in links
6159
password_requirements: "/Classroom/Basics/password.html"
6260
app_url: "https://app.sendgrid.com"
6361
blog_url: "https://sendgrid.com/blog"
6462
marketing_email_url: "https://sendgrid.com/newsletter"
63+
marketing_campaigns_url: "https://sendgrid.com/marketing_campaigns"
6564
pricing_url: "https://sendgrid.com/pricing"
6665
site_url: "https://sendgrid.com"
6766
support_url: "https://support.sendgrid.com"

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"dependencies": {
2626
"bootstrap": "~3.1.1",
2727
"jquery-ui": "~1.10.4",
28-
"modernizr": ">=2.7.2",
28+
"modernizr": "=2.7.2",
2929
"jstorage": "~0.4.8",
3030
"jsrender": "~1.0.0-beta",
3131
"highlightjs": "~8.0.0",

source/API_Reference/SMTP_API/scheduling_parameters.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,20 @@ To schedule a send request for individual recipients; use `send_each_at` to send
6161
]
6262
}
6363
{% endcodeblock %}
64+
65+
To allow for the cancellation of a scheduled send, you must include a batch id with your send. The endpoint for cancellation needs a batch id to cancel with. To generate a valid batch id, use the batch id generation endpoint
66+
67+
<h4>Example of including a batch_id</h4>
68+
{% codeblock lang:json %}
69+
{
70+
"to": [
71+
72+
73+
74+
],
75+
"send_at": [
76+
1409348513
77+
],
78+
"batch_id": "MWQxZmIyODYtNjE1Ni0xMWU1LWI3ZTUtMDgwMDI3OGJkMmY2LWEzMmViMjYxMw"
79+
}
80+
{% endcodeblock %}

source/API_Reference/SMTP_API/suppressions.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,30 @@ You may only specify one group per send, and you should wait one minute after cr
2323
}
2424
{% endcodeblock %}
2525

26+
{% anchor h2 %}
27+
Defining ASM Groups to display on the Manage Preferences page
28+
{% endanchor %}
29+
30+
To specify which groups to display on the Manage Preferences page of an email, add the group IDs to the X-SMTPAPI header of an SMTP message, or in the x-smtpapi parameter of a [mail.send API
31+
call]({{root_url}}/API_Reference/Web_API/mail.html).
32+
If the asm_groups_to_display header is omitted, your default groups will be shown on the Manage Preferences page instead.
33+
34+
{% warning %}
35+
You can specify up to 25 groups to display.
36+
{% endwarning %}
37+
38+
{% codeblock lang:json %}
39+
{
40+
"asm_groups_to_display": [1, 2, 3]
41+
}
42+
{% endcodeblock %}
43+
44+
{% anchor h2 %}
45+
Groups
46+
{% endanchor %}
47+
2648
You can find your group IDs by looking at the Group ID column in the Advanced Suppression Manager UI, or by calling the [GET method]({{root_url}}/API_Reference/Web_API_v3/Advanced_Suppression_Manager/groups.html#-GET) of the groups resource.
2749

2850
Related Articles:
2951

30-
* You can create ASM groups via the [API V3 > ASM Endpoint]({{root_url}}/API_Reference/Web_API_v3/Unsubscribe_Manager/groups.html#-POST).
52+
* You can create ASM groups via the [API V3 > ASM Endpoint]({{root_url}}/API_Reference/Web_API_v3/Unsubscribe_Manager/groups.html#-POST).

source/API_Reference/Web_API_v3/Advanced_Suppression_Manager/groups.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ HTTP/1.1 201 OK
3333
{
3434
"id":103,
3535
"name": "Product Suggestions",
36-
"description": "Suggestions for products our users might like.",
37-
"last_email_sent_at": "NOT IMPLEMENTED"
36+
"description": "Suggestions for products our users might like."
3837
}
3938
{% endv3response %}
4039
{% endapiv3example %}
@@ -53,14 +52,12 @@ Retrieve all suppression groups associated with the user.
5352
"id": 100,
5453
"name": "Newsletters",
5554
"description": "Our monthly newsletter.",
56-
"last_email_sent_at": "2014-09-04 01:34:43",
5755
"unsubscribes": 400
5856
},
5957
{
6058
"id": 101,
6159
"name": "Alerts",
6260
"description 2": "Emails triggered by user-defined rules.",
63-
"last_email_sent_at": "2012-11-06 09:37:33",
6461
"unsubscribes": 1
6562
}
6663
]
@@ -80,7 +77,6 @@ Get information on a single suppression group.
8077
"id": 100,
8178
"name": "Newsletters",
8279
"description": "Our monthly newsletter.",
83-
"last_email_sent_at": "2014-09-04 01:34:43",
8480
"unsubscribes": 400
8581
}
8682
{% endv3response %}
@@ -105,8 +101,7 @@ HTTP/1.1 201 OK
105101
{
106102
"id":103,
107103
"name": "Item Suggestions",
108-
"description": "Suggestions for items our users might like.",
109-
"last_email_sent_at": "2014-09-05 03:14:15"
104+
"description": "Suggestions for items our users might like."
110105
}
111106
{% endv3response %}
112107
{% endapiv3example %}

source/API_Reference/Web_API_v3/Stats/categories.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ navigation:
99
Category Stats provide all of your user's email statistics for your categories.
1010

1111
{% anchor h2 %}
12-
GET
12+
GET statistics
1313
{% endanchor %}
1414

1515
Gets email statistics for the given categories. If you don't pass any parameters, the endpoint will return a sum for each category 10 at a time.
@@ -130,7 +130,7 @@ HTTP/1.1 200
130130
* * * * *
131131

132132
{% anchor h2 %}
133-
GET
133+
GET Sums
134134
{% endanchor %}
135135

136136
Gets the total sums of each email statistic metric for all categories over the given date range.
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
layout: page
3+
weight: 0
4+
title: Cancel Scheduled Sends
5+
navigation:
6+
show: true
7+
---
8+
9+
FORMAT: 1A
10+
11+
# Cancellation of Scheduled Sends
12+
Cancelling scheduled send
13+
14+
# Group Batch IDs
15+
16+
If you set the [SMTPAPI header batch_id]({{root_url}}/API_Reference/SMTP_API/scheduling_parameters.html),
17+
it allows you to then cancel a scheduled send based on that batch_id by calling the [Cancel Scheduled Send endpoint]({{root_url}}/API_Reference/Web_API_v3/cancel_scheduled_send.html#Cancel-Scheduled-Sends)
18+
19+
## Batch ID Generation [/mail/batch]
20+
Generate a new Batch ID to associate with scheduled sends
21+
22+
### Generate Batch ID [POST]
23+
24+
+ Request
25+
26+
27+
+ Response 200 (application/json)
28+
29+
+ Body
30+
31+
{
32+
"batch_id": "YOUR_BATCH_ID"
33+
}
34+
35+
## Validate Batch ID [/mail/batch/]
36+
37+
### Validate Batch ID [GET]
38+
39+
Validate whether or not a batch id is valid
40+
41+
+ Request
42+
43+
+ Response 200 (application/json)
44+
45+
+ Body
46+
47+
{
48+
"batch_id": "YOUR_BATCH_ID"
49+
}
50+
51+
+ Response 400 (application/json)
52+
53+
+ Body
54+
55+
{
56+
"errors":[{"message": "invalid batch id"}]
57+
}
58+
59+
60+
# Group Cancel Scheduled Sends
61+
62+
The Cancel Scheduled Sends feature allows the customer to cancel a
63+
scheduled send based on a [Batch ID]({{root_url}}/API_Reference/SMTP_API/scheduling_parameters.html)
64+
included in the SMTPAPI header.
65+
66+
## Manage user scheduled sends [/user/scheduled_send/{batch_id}]
67+
68+
A CRUD for managing user scheduled sends
69+
70+
### Retrieve scheduled send [GET]
71+
72+
Get cancel/paused scheduled send information.
73+
74+
+ Request
75+
76+
+ Response 200 (application/json)
77+
78+
+ Body
79+
80+
{
81+
"batch_id": "YOUR_BATCH_ID",
82+
"status": "cancel"
83+
}
84+
85+
### Update user scheduled send information [PATCH]
86+
87+
Update the status of a scheduled send.
88+
89+
+ Request
90+
91+
+ Body
92+
93+
{
94+
"batch_id": "YOUR_BATCH_ID",
95+
"status": "pause"
96+
}
97+
98+
+ Response 204 (application/json)
99+
100+
+ Response 404
101+
102+
### Delete a cancellation or pause of a scheduled send [DELETE]
103+
Delete the cancellation/pause of a scheduled send.
104+
105+
+ Request
106+
107+
+ Response 204
108+
109+
+ Response 404
110+
111+
## Cancel or pause a scheduled send [/user/scheduled_send/]
112+
113+
### Cancel or pause a scheduled send [POST]
114+
115+
Cancel or pause a scheduled send. If the maximum number of cancellations/pauses are added, HTTP 400 will
116+
be returned.
117+
118+
+ Request
119+
120+
+ Body
121+
122+
{
123+
"batch_id": "YOUR_BATCH_ID",
124+
"status": "pause"
125+
}
126+
127+
+ Response 201 (application/json)
128+
129+
+ Response 400
130+
131+

source/Integrate/Code_Examples/java.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ import com.sendgrid.*;
1414

1515
public class SendGridExample {
1616
public static void main(String[] args) {
17-
SendGrid sendgrid = new SendGrid(api_user, api_key);
17+
18+
SendGrid sendgrid = new SendGrid(api_key); // recommended
19+
// OR
20+
SendGrid sendgrid = new SendGrid(api_user, api_password);
1821

1922
SendGrid.Email email = new SendGrid.Email();
2023

source/User_Guide/Suppressions/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@
6060
<strong><a href="{{root_url}}/User_Guide/Suppressions/global_unsubscribes.html">Global Unsubscribes</a></strong> - When a user unsubscribes from everything you might email them.
6161
</p>
6262
<p>
63-
<strong><a href="{{root_url}}/User_Guide/Suppressions/global_unsubscribes.html">Group Unsubscribes</a></strong> - When a user unsubscribes from a specific group of your emails.
63+
<strong><a href="{{root_url}}/User_Guide/Suppressions/group_unsubscribes.html">Group Unsubscribes</a></strong> - When a user unsubscribes from a specific group of your emails.
6464
</p>

0 commit comments

Comments
 (0)