|
| 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 | + |
0 commit comments