Using the Cancel Scheduled Sends API, you can cancel or pause sending one or more groups of emails. SendGrid defines these multiple scheduled send requests together as batches identified with a batch_id.
With this API, you can perform the following tasks on scheduled emails:
Define and validate the ID for a batch of messages.
Retrieve, update, pause, resume, or cancel a scheduled send.
Cancelling or pausing a batch of messages include the following conditions:
You can't pause or cancel more than 10 different batches at one time.
You can't pause or cancel a batch later than 10 minutes before the scheduled send_at time.
When you cancel or pause a batch, all messages associated with that batch stay in your sending queue.
When a cancelled batch reaches its send_at time, SendGrid discards the messages.
When a paused batch reaches its send_at time, SendGrid retains the messages.
When you resume a paused batch, SendGrid delivers your scheduled send.
When a paused batch passes 72 hours after its send_at time, SendGrid discards the messages as Expired.
Base url: https://api.sendgrid.com (for global users and subusers)
Base url: https://api.eu.sendgrid.com (for EU regional subusers)
This operation allows you to validate a mail batch ID.
If you provide a valid batch ID, this operation will return a 200 status code and the batch ID itself.
If you provide an invalid batch ID, you will receive a 400 level status code and an error message.
A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send.
Operation details
Authentication
Headers
Property nameTypeRequiredDescription
authorizationstring
required
Default: Bearer <<YOUR_API_KEY_HERE>>
onBehalfOfstring
Optional
Use the on-behalf-of header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header.
Path parameters
Property nameTypeRequiredDescription
batchIdstring
required
Set this parameter to the batch ID that's associated with the mail send you want to retrieve.