If you have scheduled an email or a campaign to be sent, but decided to cancel or reschedule the email then you have several options.

If you are looking for information on how to stop a send that is currently in progress, click here!

Canceling Transactional Email

Cancel Scheduled Sends

There is a group of endpoints in the SendGrid API v3 that makes it possible to batch transactional email together and to schedule a time for that batch to be delivered. You can also pause or cancel the delivery of one of these batches.

You can have no more than 10 different batches (10 different groups of emails with each group identified by a unique batch_id) in a ‘paused’ or ‘pending cancellation’ state at one time.

To create a batch ID, assign that ID to an email or group of emails, and cancel the send, refer to the following steps:

1. Generate a Batch ID

First, generate a batch id by calling the v3/mail/batch endpoint. When successful, you should receive a 201 response along with your batch ID.

Request

1
POST https://api.sendgrid.com/v3/mail/batch HTTP/1.1

Response

1
2
3
4
HTTP/1.1 201
  {
    "batch_id": "YOUR_BATCH_ID"
  }

2. Assign Batch ID to an Email

The batch ID generated in step 1 can now be used when scheduling an email via the SendGrid API v3 by setting the value of batch_id to your new batch ID in a v3/mail/send request and setting the value of send_at to a UNIX timestamp representing the time you want your email sent. For example:

Request

1
POST https://api.sendgrid.com/v3/mail/send HTTP/1.1
Request Body
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "personalizations": [
    {
      "to": [
        {
          "email": "john@example.com"
        }
      ],
      "subject": "Hello, World!"
    }
  ],
  "from": {
    "email": "from_address@example.com"
  },
  "content": [
    {
      "type": "text/plain",
      "value": "Hello, World!"
    }
  ],
  "send_at": 1484913600,
  "batch_id": "YOUR_BATCH_ID"
}

Response

1
2
3
{
  HTTP/1.1 202
}

3. Cancel or Pause Your Send

Now that your email has been scheduled and has a batch ID assigned, you can pause or cancel the send at any time up to 10 minutes before the scheduled send time.

Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled.

To only pause your scheduled send, simply set the status parameter in your request to “pause”. To completely cancel your request, set status to “cancel”.

When a Batch is cancelled, all messages associated with that batch will stay in your sending queue, but when their send_at value is reached, they will be discarded instead of attempting delivery.

When a Batch is paused, all messages associated with that batch will stay in your sending queue, even past their send_at value. Any messages that are more than 72 hours old will be discarded as Expired.

Request

1
POST https://api.sendgrid.com/v3/user/scheduled_sends HTTP/1.1
Request Body
1
2
3
4
{
  "batch_id": "YOUR_BATCH_ID",
  "status": "pause"
}

Response

1
HTTP/1.1 201

For more details, please see our Cancel Scheduled Sends API Reference.

Canceling a Marketing Campaign

Using the User Interface

If you scheduled a specific time to send your campaign, it’s easy to unschedule this campaign to make changes or reschedule it. Simply navigate to your Campaigns page by clicking Marketing Campaigns in the left hand navigation menu and selecting Campaigns. Next to the campaign you want to unschedule, click the action menu and select Unschedule.

Using the API

You can unschedule a campaign by making a call to /v3/campaigns/{campaign_id}/schedules where {campaign_id} is the ID of the campaign you want to unschedule. A successful unschedule will return a 204. You cannot unschedule campaigns that are already in the process of being sent. You should instead cancel or delete the campaign.

Request

1
DELETE https://api.sendgrid.com/v3/campaigns/{campaign_id}/schedules HTTP/1.1

Response

1
HTTP/1.1 204