Skip to content

Conversations that just woke up

GET
/mail/mailboxes/{mailbox}/snooze/recent
curl --request GET \
--url 'https://mail.work.optidata.cloud/api/mail/mailboxes/78/snooze/recent?folder_id=2' \
--header 'Authorization: Bearer <token>'

Threads that came back to a folder on their own because their snooze expired. A client uses this to highlight them, so the user notices what reappeared.

Requires snooze to be enabled for the tenant.

mailbox
required
integer

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

folder_id
required
string

The folder to look at.

The recently woken threads.

Media typeapplication/json
Array<object>

A conversation hidden until a chosen moment.

object
id
integer
mailbox_id
integer
conversation_id
string
original_folder_id

The folder to restore the thread to.

string | null
snooze_until

When the thread comes back.

string
timezone
string
snooze_hash

Stable identifier of the snooze record.

string
unsnoozed_at

When the thread actually came back, if it already has.

string | null
unsnoozed_target_folder_id

The folder the thread was restored to, once it woke.

string | integer | null
was_auto_unsnoozed

Whether the thread woke on its own (its time came) rather than by hand.

boolean
created_at
string
updated_at
string
returns_in_human

Human-readable time until the thread returns, e.g. Returns in 4 days.

string | null
returned_ago_human

Human-readable time since the thread returned, when it already has.

string | null
Examplegenerated
[
{
"id": 1,
"mailbox_id": 1,
"conversation_id": "example",
"original_folder_id": "example",
"snooze_until": "example",
"timezone": "example",
"snooze_hash": "example",
"unsnoozed_at": "example",
"unsnoozed_target_folder_id": "example",
"was_auto_unsnoozed": true,
"created_at": "example",
"updated_at": "example",
"returns_in_human": "example",
"returned_ago_human": "example"
}
]

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"
}

Snooze 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"
}

The request body or query string failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleinvalid
{
"message": "The conversations field is required.",
"errors": {
"conversation_ids": [
"The conversations field is required."
]
}
}

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."
}