Schedule Email API
Schedule email notifications for delivery at a specific future time
Schedule Email API
Schedule email notifications for future delivery. Perfect for reminders, scheduled announcements, and time-sensitive communications.
Future Delivery
Schedule emails for specific dates and times.
Timezone Aware
Send at optimal times for recipients.
Rich Content
Support for HTML templates and attachments.
Endpoint Overview
/graphqlSchedule an email notification for delivery at a specified future time. Supports HTML content, multiple recipients, and timezone handling.
Request Parameters
recipients[String!]!RequiredArray of email addresses to send to.
subjectString!RequiredEmail subject line.
contentString!RequiredEmail body content (supports HTML).
scheduledTimeDateTime!RequiredISO 8601 datetime for scheduled delivery.
fromNameStringSender display name.
replyToStringReply-to email address.
timezoneStringTimezone for scheduled time interpretation.
GraphQL Mutation
mutation scheduleEmail($email: ScheduledEmailInput!) {
scheduleEmail(email: $email) {
id
status
scheduledTime
recipients
}
}Variables:
{
"email": {
"recipients": ["user@example.com", "user2@example.com"],
"subject": "Subscription Renewal Reminder",
"content": "<h1>Renewal Reminder</h1><p>Your subscription expires in 7 days.</p>",
"scheduledTime": "2024-01-20T09:00:00Z",
"fromName": "OrbVPN Support",
"replyTo": "support@orbvpn.com"
}
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"query": "mutation scheduleEmail($email: ScheduledEmailInput!) { scheduleEmail(email: $email) { id status scheduledTime } }",
"variables": {
"email": {
"recipients": ["user@example.com"],
"subject": "Reminder",
"content": "Your subscription expires soon.",
"scheduledTime": "2024-01-20T09:00:00Z"
}
}
}'Response
{
"data": {
"scheduleEmail": {
"id": "email_12345",
"status": "scheduled",
"scheduledTime": "2024-01-20T09:00:00Z",
"recipients": ["user@example.com", "user2@example.com"]
}
}
}{
"errors": [
{
"message": "Scheduled time must be in the future",
"path": ["scheduleEmail"],
"extensions": {
"code": "INVALID_SCHEDULE_TIME"
}
}
],
"data": null
}Use Cases
Renewal Reminders
Schedule reminders before subscription expiration.
Promotional Campaigns
Schedule marketing emails for optimal timing.
Time Zone Delivery
Schedule for recipients' local morning hours.
Event Announcements
Schedule announcements for specific launch times.
Best Practices
Optimal Timing
Schedule for business hours in recipient's timezone.
Test First
Send test emails before scheduling large campaigns.
Track Delivery
Monitor scheduled email status and delivery reports.
Unsubscribe Link
Include unsubscribe options for marketing emails.
Related Endpoints
Timezone Handling
If no timezone is specified, the scheduled time is interpreted as UTC. Always specify the timezone for clarity.
Need Immediate Delivery?
For instant email delivery without scheduling, use the standard notification endpoints.