Skip to Content

The ScheduledSend type of the TypeScript SDK, which messages.send and 5 more methods take or answer.

type ScheduledSend = {
  attempts: number
  createdAt: number
  deferrals: number
  deliveryId: string
  error: string | null
  finishedAt: number | null
  messageId: string
  recipients: string[]
  releaseAt: number
  result: ScheduledLegResult[] | null
  scheduleId: string
  sendAt: number
  state: ('pending' | 'releasing' | 'sent' | 'failed' | 'canceled')
  threadId: string | null
}

Fields

FieldTypeDescription
attemptsnumberNumber of delivery attempts made
createdAtnumberCreation timestamp in epoch seconds
deferralsnumberNumber of deferrals encountered
deliveryIdstringIdempotency key for this submission
errorstring | nullError reason if sending failed or was canceled, or null
finishedAtnumber | nullCompletion timestamp in epoch seconds, or null if pending
messageIdstringDraft message ULID scheduled for sending
recipientsstring[]List of target recipient email addresses
releaseAtnumberActual scheduled release time in epoch seconds
resultScheduledLegResult[] | nullPer-recipient delivery outcomes, or null if pending
scheduleIdstringScheduled send ULID
sendAtnumberRequested send time in epoch seconds
state('pending' | 'releasing' | 'sent' | 'failed' | 'canceled')Current scheduling status
threadIdstring | nullAssociated conversation thread ID, or null

Used by

MethodWhat it does
messages.sendSend an email message
messages.sendDraftSend a stored draft
threads.replyReply to a conversation thread
scheduled.listList scheduled sends
scheduled.getGet a scheduled send
scheduled.rescheduleChange a scheduled send's release time

On this page