{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"**This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.**\n\nPassing this endpoint a `batch_id` and status will cancel or pause the scheduled send.\n\nOnce 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.\n\nIf the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned.","properties":{"headers":{"type":"object","properties":{"on-behalf-of":{"type":"string","description":"The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information."}},"required":[],"additionalProperties":false},"body":{"title":"Cancel or pause a scheduled send request","type":"object","properties":{"batch_id":{"type":"string","description":"The batch ID is the identifier that your scheduled mail sends share.","pattern":"^[a-zA-Z0-9]"},"status":{"allOf":[{"$ref":"#/definitions/Status"},{"type":"string","default":"pause"}]}},"required":["batch_id","status"],"examples":[{"batch_id":"YOUR_BATCH_ID","status":"pause"}]}},"required":[],"additionalProperties":false,"definitions":{"Status":{"type":"string","enum":["pause","cancel"]}}},"name":"Cancel or pause a scheduled send","id":"sendgrid.scheduled_sends.createscheduledsend","example":{},"maxRequests":1,"summary":false}}