Skip to content

Get a scheduled delivery

GET
/mail/mailboxes/{mailbox}/scheduled/{scheduledDraft}
curl --request GET \
--url https://mail.work.optidata.cloud/api/mail/mailboxes/78/scheduled/44 \
--header 'Authorization: Bearer <token>'

One scheduled delivery together with the draft it will send.

Requires scheduled sending to be enabled for the tenant.

mailbox
required
integer

Id of the mailbox. Every mailbox the caller may use is listed in their account.

scheduledDraft
required
integer

Id of the scheduled delivery.

The scheduled delivery, with its draft expanded.

Media typeapplication/json
object
id
integer
draft_id
integer
mailbox_id
integer
scheduled_at

When the message will be sent.

string
timezone

The time zone the user chose the moment in.

string
status

Where a scheduled delivery stands.

string
Allowed values: pending processing sent failed cancelled
sent_at
string | null
attempts

How many delivery attempts have been made.

integer
last_error

Why the last attempt failed, when one did.

string | null
created_at
string
updated_at
string
draft

A message being composed.

object
id
integer
mailbox_id
integer
type

How an outgoing message came to be.

string
Allowed values: new reply forward
status

Where a draft stands. not_sent is still being written, sending has been handed to the queue, sent has left, and failed could not be delivered.

string
Allowed values: not_sent sending sent failed
reply_server_message_id

The message this draft answers, when it answers one.

string | null
subject
string | null
body
string | null
date
string
is_read_receipt_enabled
boolean
from
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
to
Array<object> | null

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
cc
Array<object> | null

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
bcc
Array<object> | null

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
attachments

The files uploaded to the draft.

Array<object>
object
created_at
string
updated_at
string
Example
{
"id": 44,
"timezone": "America/Sao_Paulo",
"status": "pending",
"draft": {
"id": 918,
"type": "new",
"status": "not_sent",
"from": [
{
"name": "Jane Doe",
"email": "jane.doe@acme.example",
"type": "f"
}
],
"to": [
{
"name": "Jane Doe",
"email": "jane.doe@acme.example",
"type": "f"
}
],
"cc": [
{
"name": "Jane Doe",
"email": "jane.doe@acme.example",
"type": "f"
}
],
"bcc": [
{
"name": "Jane Doe",
"email": "jane.doe@acme.example",
"type": "f"
}
]
}
}

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

Scheduled sending is not enabled for this tenant.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledisabled
{
"message": "Not available"
}

No such resource, or it does not belong to the caller.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "No query results for model."
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}