Schedule Single Send
Twilio calls a one-time, non-automated email message delivered to a list or segment of your audience a Single Send. You can send such messages immediately or scheduled for future delivery. Single Sends can deliver promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. The Single Sends API lets you create, retrieve, update, delete, schedule, and search for Single Sends. Another API endpoint provides campaign statistics. The SendGrid Knowledge Center explains the latest updates to the Single Sends API.
PUT/v3/marketing/singlesends/{id}/schedule
Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)
This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.
To send your message immediately, set the send_at property value to the string now. To schedule the Single Send for future delivery, set the send_at value to your desired send time in ISO 8601 date time format (yyyy-MM-ddTHH:mm:ssZ).
Bearer <<YOUR_API_KEY_HERE>>application/jsonThe ISO 8601 time at which to send the Single Send. This must be in future or the string now. SendGrid Mail Send emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via Marketing Campaigns.
Optional
The ISO 8601 time at which to send the Single Send. This must be in future or the string now. SendGrid Mail Send emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via Marketing Campaigns.
Optional
scheduled1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const id = "id";5const data = {6send_at: "3752-01-28T23:21:52.575Z",7};89const request = {10url: `/v3/marketing/singlesends/${id}/schedule`,11method: "PUT",12body: data,13};1415client16.request(request)17.then(([response, body]) => {18console.log(response.statusCode);19console.log(response.body);20})21.catch((error) => {22console.error(error);23});