API: OpenSRS Email

The API: OpenSRS Hosted Email Developer Hub

Welcome to the API: OpenSRS Hosted Email developer hub. You'll find comprehensive guides and documentation to help you start working with API: OpenSRS Hosted Email as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

restore_deleted_messages

The restore_deleted_messages method restores specific deleted messages.

To get a list of the messages that can be restored, use the get_deleted_messages method.

📘

Note:

If a message is deleted immediately after it is delivered, you may not be able to restore it.

Syntax

{
    <credentials object>,
    "user": <mailbox_name>,
    "ids": ["list of message ids"}
}

Request fields for restore_deleted_messages

The following fields can be used in the restore_deleted_messages method:

Field name

Obligation

Definition/Value

ids

Required

The IDs for the messages that you want to restore.

To get a list of the messages that can be restored, use the get_deleted_messages method.

user

Required

The name of the mailbox.

Response fields for restore_deleted_messages

The following fields may be returned in response to the restore_deleted_messages method:

Field name

Obligation

Description/Value

error

Returned if success = false

A text string that explains the error.

error_number

Returned if success = false

A number that represents the error.

ids

Returned if success = true

Contains a list of the messages and indicates whether each one was successfully restored or not.

Includes the following:

  • error—A text string that explains the error.

  • error_number—A number that represents the error.

  • id—The message id number.

  • success—Indicates whether this message was restored or not. Allowed values are true and false.

success

Always returned

Indicates whether the request was successful or not. Allowed values are true and false.

Examples for restore_deleted_messages

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "sw0rdf1sh"
  },
  "user": "[email protected]",
  "ids":[
    "U2Fsd+ZoLG/DDD3l4dKu6D4eUOiuHvKz+T/nB//+Ga6UkJL1vOc/eHOgNznK", ]
}

Response

{
  "success": true,
  "ids": [
    {
      "success": true,
      "id": 
"U2Fsd+ZoLG/DDD3l4dKu6D4eUOiuHvKj+T/nB//+Ga6UkJL1vOc/eHOgNznK"
    }, 
  ]
}

Updated less than a minute ago

restore_deleted_messages


The restore_deleted_messages method restores specific deleted messages.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.