{"action":"created","comment":{"url":"https://api.github.com/repos/sendgrid/docs/pulls/comments/40367751","id":40367751,"diff_hunk":"@@ -0,0 +1,132 @@\n+---\n+layout: page\n+weight: 0\n+title: Cancel Scheduled Sends\n+navigation:\n+  show: true\n+---\n+\n+FORMAT: 1A\n+\n+# Batch IDs\n+If you set the [SMTPAPI header batch_id]({{root_url}}/API_Reference/SMTP_API/scheduling_parameters.html),\n+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)\n+\n+# Group Batch ID Management\n+\n+## Batch ID Generation [/mail/batch]\n+Generate a new Batch ID to associate with scheduled sends\n+\n+### Generate Batch ID [POST]\n+\n++ Request\n+\n+\n++ Response 200 (application/json)\n+\n+    + Body\n+\n+            {\n+                \"id\": \"YOUR_BATCH_ID\",\n+                \"expiration\": 1442945818\n+            }\n+\n+## Validate Batch ID [/mail/batch/]\n+\n+### Validate Batch ID [GET]\n+Validate whether or not a batch id is valid\n+\n++ Request\n++ Response 200 (application/json)\n+\n+    + Body\n+\n+             {\n+                \"id\": \"YOUR_BATCH_ID\",\n+                \"expiration\": 1442945818\n+             }\n++ Response 400 (application/json)\n+\n+    + Body\n+\n+             {\n+                \"errors\":[{\"message\": \"invalid batch id\"}]\n+             }\n+\n+\n+# Cancel Scheduled Sends\n+The Cancel Scheduled Sends feature allows you to cancel a scheduled send based on a [Batch ID]({{root_url}}/API_Reference/SMTP_API/scheduling_parameters.html)\n+included in the SMTPAPI header.\n+\n+# Group Cancel Scheduled Send\n+\n+## Manage user scheduled sends [/user/scheduled_send]\n+\n+### Retrieve scheduled send [GET]\n+Get cancel/paused scheduled send information.\n+\n++ Request\n+    + Body\n+\n+             {\n+                \"id\": 23\n+             }\n+\n++ Response 200 (application/json)\n+\n+    + Body\n+\n+             {\n+                \"id\": 23,\n+                \"batch_id\": \"YOUR_BATCH_ID\",\n+                \"status\": \"cancel\"\n+\n+             }\n+\n+\n+\n+### Update user scheduled send information [PUT]\n+Update the status of a scheduled send.\n+\n++ Request\n+    + Body\n+\n+            {\n+                \"id\": 24,\n+                \"status\": \"pause\"\n+            }\n+\n++ Response 204 (application/json)\n+\n++ Response 404\n+\n+### Cancel or pause a scheduled send [POST]\n+Cancel or pause a scheduled send. If the maximum number of cancellations/pauses are added, HTTP 400 will\n+be returned.\n+\n++ Request\n+    + Body\n+\n+            {\n+                \"id\": 24,","path":"source/API_Reference/Web_API_v3/cancel_scheduled_send.apiblueprint","position":111,"original_position":111,"commit_id":"053a7ee0237cd99a50b6ae138c6923dde33d2b1f","original_commit_id":"053a7ee0237cd99a50b6ae138c6923dde33d2b1f","user":{"login":"mbernier","id":169448,"avatar_url":"https://avatars.githubusercontent.com/u/169448?v=3","gravatar_id":"","url":"https://api.github.com/users/mbernier","html_url":"https://github.com/mbernier","followers_url":"https://api.github.com/users/mbernier/followers","following_url":"https://api.github.com/users/mbernier/following{/other_user}","gists_url":"https://api.github.com/users/mbernier/gists{/gist_id}","starred_url":"https://api.github.com/users/mbernier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbernier/subscriptions","organizations_url":"https://api.github.com/users/mbernier/orgs","repos_url":"https://api.github.com/users/mbernier/repos","events_url":"https://api.github.com/users/mbernier/events{/privacy}","received_events_url":"https://api.github.com/users/mbernier/received_events","type":"User","site_admin":false},"body":"Should this be Batch ID? ","created_at":"2015-09-24T20:22:44Z","updated_at":"2015-09-24T20:22:44Z","html_url":"https://github.com/sendgrid/docs/pull/1276#discussion_r40367751","pull_request_url":"https://api.github.com/repos/sendgrid/docs/pulls/1276","_links":{"self":{"href":"https://api.github.com/repos/sendgrid/docs/pulls/comments/40367751"},"html":{"href":"https://github.com/sendgrid/docs/pull/1276#discussion_r40367751"},"pull_request":{"href":"https://api.github.com/repos/sendgrid/docs/pulls/1276"}}},"pull_request":{"url":"https://api.github.com/repos/sendgrid/docs/pulls/1276","id":45729074,"html_url":"https://github.com/sendgrid/docs/pull/1276","diff_url":"https://github.com/sendgrid/docs/pull/1276.diff","patch_url":"https://github.com/sendgrid/docs/pull/1276.patch","issue_url":"https://api.github.com/repos/sendgrid/docs/issues/1276","number":1276,"state":"open","locked":false,"title":"cancel scheduled send","user":{"login":"john-cai","id":2354211,"avatar_url":"https://avatars.githubusercontent.com/u/2354211?v=3","gravatar_id":"","url":"https://api.github.com/users/john-cai","html_url":"https://github.com/john-cai","followers_url":"https://api.github.com/users/john-cai/followers","following_url":"https://api.github.com/users/john-cai/following{/other_user}","gists_url":"https://api.github.com/users/john-cai/gists{/gist_id}","starred_url":"https://api.github.com/users/john-cai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-cai/subscriptions","organizations_url":"https://api.github.com/users/john-cai/orgs","repos_url":"https://api.github.com/users/john-cai/repos","events_url":"https://api.github.com/users/john-cai/events{/privacy}","received_events_url":"https://api.github.com/users/john-cai/received_events","type":"User","site_admin":false},"body":"This update to the docs is for cancellation of scheduled sends, and batch id generation","created_at":"2015-09-22T23:16:34Z","updated_at":"2015-09-24T20:22:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"526a91ecfae13f3940eef7627a1b62ea985a0582","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sendgrid/docs/pulls/1276/commits","review_comments_url":"https://api.github.com/repos/sendgrid/docs/pulls/1276/comments","review_comment_url":"https://api.github.com/repos/sendgrid/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sendgrid/docs/issues/1276/comments","statuses_url":"https://api.github.com/repos/sendgrid/docs/statuses/053a7ee0237cd99a50b6ae138c6923dde33d2b1f","head":{"label":"sendgrid:CORE-2814-cancel-scheduled-send","ref":"CORE-2814-cancel-scheduled-send","sha":"053a7ee0237cd99a50b6ae138c6923dde33d2b1f","user":{"login":"sendgrid","id":181234,"avatar_url":"https://avatars.githubusercontent.com/u/181234?v=3","gravatar_id":"","url":"https://api.github.com/users/sendgrid","html_url":"https://github.com/sendgrid","followers_url":"https://api.github.com/users/sendgrid/followers","following_url":"https://api.github.com/users/sendgrid/following{/other_user}","gists_url":"https://api.github.com/users/sendgrid/gists{/gist_id}","starred_url":"https://api.github.com/users/sendgrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendgrid/subscriptions","organizations_url":"https://api.github.com/users/sendgrid/orgs","repos_url":"https://api.github.com/users/sendgrid/repos","events_url":"https://api.github.com/users/sendgrid/events{/privacy}","received_events_url":"https://api.github.com/users/sendgrid/received_events","type":"Organization","site_admin":false},"repo":{"id":4679626,"name":"docs","full_name":"sendgrid/docs","owner":{"login":"sendgrid","id":181234,"avatar_url":"https://avatars.githubusercontent.com/u/181234?v=3","gravatar_id":"","url":"https://api.github.com/users/sendgrid","html_url":"https://github.com/sendgrid","followers_url":"https://api.github.com/users/sendgrid/followers","following_url":"https://api.github.com/users/sendgrid/following{/other_user}","gists_url":"https://api.github.com/users/sendgrid/gists{/gist_id}","starred_url":"https://api.github.com/users/sendgrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendgrid/subscriptions","organizations_url":"https://api.github.com/users/sendgrid/orgs","repos_url":"https://api.github.com/users/sendgrid/repos","events_url":"https://api.github.com/users/sendgrid/events{/privacy}","received_events_url":"https://api.github.com/users/sendgrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sendgrid/docs","description":"The code generating SendGrid's documentation. Please feel free to make pull requests, if there's anything you feel we could do better!","fork":false,"url":"https://api.github.com/repos/sendgrid/docs","forks_url":"https://api.github.com/repos/sendgrid/docs/forks","keys_url":"https://api.github.com/repos/sendgrid/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sendgrid/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sendgrid/docs/teams","hooks_url":"https://api.github.com/repos/sendgrid/docs/hooks","issue_events_url":"https://api.github.com/repos/sendgrid/docs/issues/events{/number}","events_url":"https://api.github.com/repos/sendgrid/docs/events","assignees_url":"https://api.github.com/repos/sendgrid/docs/assignees{/user}","branches_url":"https://api.github.com/repos/sendgrid/docs/branches{/branch}","tags_url":"https://api.github.com/repos/sendgrid/docs/tags","blobs_url":"https://api.github.com/repos/sendgrid/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sendgrid/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sendgrid/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sendgrid/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sendgrid/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/sendgrid/docs/languages","stargazers_url":"https://api.github.com/repos/sendgrid/docs/stargazers","contributors_url":"https://api.github.com/repos/sendgrid/docs/contributors","subscribers_url":"https://api.github.com/repos/sendgrid/docs/subscribers","subscription_url":"https://api.github.com/repos/sendgrid/docs/subscription","commits_url":"https://api.github.com/repos/sendgrid/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sendgrid/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sendgrid/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sendgrid/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sendgrid/docs/contents/{+path}","compare_url":"https://api.github.com/repos/sendgrid/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sendgrid/docs/merges","archive_url":"https://api.github.com/repos/sendgrid/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sendgrid/docs/downloads","issues_url":"https://api.github.com/repos/sendgrid/docs/issues{/number}","pulls_url":"https://api.github.com/repos/sendgrid/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/sendgrid/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/sendgrid/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sendgrid/docs/labels{/name}","releases_url":"https://api.github.com/repos/sendgrid/docs/releases{/id}","created_at":"2012-06-15T20:17:12Z","updated_at":"2015-09-21T10:32:11Z","pushed_at":"2015-09-24T19:54:02Z","git_url":"git://github.com/sendgrid/docs.git","ssh_url":"git@github.com:sendgrid/docs.git","clone_url":"https://github.com/sendgrid/docs.git","svn_url":"https://github.com/sendgrid/docs","homepage":"http://sendgrid.com/docs/","size":61601,"stargazers_count":42,"watchers_count":42,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":170,"mirror_url":null,"open_issues_count":52,"forks":170,"open_issues":52,"watchers":42,"default_branch":"develop"}},"base":{"label":"sendgrid:develop","ref":"develop","sha":"d932f71e886b28bb8579a1aa8d12fd1632976157","user":{"login":"sendgrid","id":181234,"avatar_url":"https://avatars.githubusercontent.com/u/181234?v=3","gravatar_id":"","url":"https://api.github.com/users/sendgrid","html_url":"https://github.com/sendgrid","followers_url":"https://api.github.com/users/sendgrid/followers","following_url":"https://api.github.com/users/sendgrid/following{/other_user}","gists_url":"https://api.github.com/users/sendgrid/gists{/gist_id}","starred_url":"https://api.github.com/users/sendgrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendgrid/subscriptions","organizations_url":"https://api.github.com/users/sendgrid/orgs","repos_url":"https://api.github.com/users/sendgrid/repos","events_url":"https://api.github.com/users/sendgrid/events{/privacy}","received_events_url":"https://api.github.com/users/sendgrid/received_events","type":"Organization","site_admin":false},"repo":{"id":4679626,"name":"docs","full_name":"sendgrid/docs","owner":{"login":"sendgrid","id":181234,"avatar_url":"https://avatars.githubusercontent.com/u/181234?v=3","gravatar_id":"","url":"https://api.github.com/users/sendgrid","html_url":"https://github.com/sendgrid","followers_url":"https://api.github.com/users/sendgrid/followers","following_url":"https://api.github.com/users/sendgrid/following{/other_user}","gists_url":"https://api.github.com/users/sendgrid/gists{/gist_id}","starred_url":"https://api.github.com/users/sendgrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendgrid/subscriptions","organizations_url":"https://api.github.com/users/sendgrid/orgs","repos_url":"https://api.github.com/users/sendgrid/repos","events_url":"https://api.github.com/users/sendgrid/events{/privacy}","received_events_url":"https://api.github.com/users/sendgrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sendgrid/docs","description":"The code generating SendGrid's documentation. Please feel free to make pull requests, if there's anything you feel we could do better!","fork":false,"url":"https://api.github.com/repos/sendgrid/docs","forks_url":"https://api.github.com/repos/sendgrid/docs/forks","keys_url":"https://api.github.com/repos/sendgrid/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sendgrid/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sendgrid/docs/teams","hooks_url":"https://api.github.com/repos/sendgrid/docs/hooks","issue_events_url":"https://api.github.com/repos/sendgrid/docs/issues/events{/number}","events_url":"https://api.github.com/repos/sendgrid/docs/events","assignees_url":"https://api.github.com/repos/sendgrid/docs/assignees{/user}","branches_url":"https://api.github.com/repos/sendgrid/docs/branches{/branch}","tags_url":"https://api.github.com/repos/sendgrid/docs/tags","blobs_url":"https://api.github.com/repos/sendgrid/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sendgrid/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sendgrid/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sendgrid/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sendgrid/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/sendgrid/docs/languages","stargazers_url":"https://api.github.com/repos/sendgrid/docs/stargazers","contributors_url":"https://api.github.com/repos/sendgrid/docs/contributors","subscribers_url":"https://api.github.com/repos/sendgrid/docs/subscribers","subscription_url":"https://api.github.com/repos/sendgrid/docs/subscription","commits_url":"https://api.github.com/repos/sendgrid/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sendgrid/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sendgrid/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sendgrid/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sendgrid/docs/contents/{+path}","compare_url":"https://api.github.com/repos/sendgrid/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sendgrid/docs/merges","archive_url":"https://api.github.com/repos/sendgrid/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sendgrid/docs/downloads","issues_url":"https://api.github.com/repos/sendgrid/docs/issues{/number}","pulls_url":"https://api.github.com/repos/sendgrid/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/sendgrid/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/sendgrid/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sendgrid/docs/labels{/name}","releases_url":"https://api.github.com/repos/sendgrid/docs/releases{/id}","created_at":"2012-06-15T20:17:12Z","updated_at":"2015-09-21T10:32:11Z","pushed_at":"2015-09-24T19:54:02Z","git_url":"git://github.com/sendgrid/docs.git","ssh_url":"git@github.com:sendgrid/docs.git","clone_url":"https://github.com/sendgrid/docs.git","svn_url":"https://github.com/sendgrid/docs","homepage":"http://sendgrid.com/docs/","size":61601,"stargazers_count":42,"watchers_count":42,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":170,"mirror_url":null,"open_issues_count":52,"forks":170,"open_issues":52,"watchers":42,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sendgrid/docs/pulls/1276"},"html":{"href":"https://github.com/sendgrid/docs/pull/1276"},"issue":{"href":"https://api.github.com/repos/sendgrid/docs/issues/1276"},"comments":{"href":"https://api.github.com/repos/sendgrid/docs/issues/1276/comments"},"review_comments":{"href":"https://api.github.com/repos/sendgrid/docs/pulls/1276/comments"},"review_comment":{"href":"https://api.github.com/repos/sendgrid/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sendgrid/docs/pulls/1276/commits"},"statuses":{"href":"https://api.github.com/repos/sendgrid/docs/statuses/053a7ee0237cd99a50b6ae138c6923dde33d2b1f"}}}}