provider Cancel Scheduled Sends POST /user/scheduled_sends
@utdk/sendgrid /user/scheduled_sends
Cancel or pause a scheduled send
**This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the "Update a scheduled send" endpoint to change its status or the "Delete a cancellation or pause from a scheduled send" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned.
on-behalf-of header
string

Try it

Authentication
Configure credentials for Email Activity (beta)
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

postUserScheduledSends
POST/user/scheduled_sends
**This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the "Update a scheduled send" endpoint to change its status or the "Delete a cancellation or pause from a scheduled send" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned.

Input

required

The batch ID is the identifier that your scheduled mail sends share.

required

The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id}

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.postUserScheduledSends({
  "on-behalf-of": "The subuser's username. This header generates the API call as if the subuser account was making the call.",
  "status": "pause"
})