Conversations that just woke up
const url = 'https://mail.work.optidata.cloud/api/mail/mailboxes/78/snooze/recent?folder_id=2';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Id of the mailbox. Every mailbox the caller may use is listed in their account.
Query Parameters
Section titled “Query Parameters”The folder to look at.
Responses
Section titled “ Responses ”The recently woken threads.
A conversation hidden until a chosen moment.
object
The folder to restore the thread to.
When the thread comes back.
Stable identifier of the snooze record.
When the thread actually came back, if it already has.
The folder the thread was restored to, once it woke.
Whether the thread woke on its own (its time came) rather than by hand.
Human-readable time until the thread returns, e.g. Returns in 4 days.
Human-readable time since the thread returned, when it already has.
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.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}Snooze is not enabled for this tenant.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Not available"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The conversations field is required.", "errors": { "conversation_ids": [ "The conversations field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}