v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
File Restoration

Restore email forwarders

This function restores an account's email forwarders.

Important:

When the Receive Mail role is disabled, the system also disables this function.

Note:

You must use the backup parameter when you call this function in one of the following formats:

  • As part of a multipart/form-data request body to upload and restore a backup file to the server. For more information about this structure, read Mozilla's POST Method documentation.
  • As a query parameter to restore an existing file on the server.
post/Backup/restore_email_forwarders

Query parameters

backupstring

The email forwarder file to restore.

Important:

Only pass this parameter to restore email forwarder files that already exist on the server.

Note:

To restore multiple email filter files, increment the parameter name. For example: backup-1backup-2, and backup-3.

timeoutinteger
Example:3600

The maximum number of seconds to try to restore the file.

  • 0 - The system will not time out the file restoration.
verbose0 | 1
Example:1

Whether to return additional information from the /home/cpuser/.cpanel/logs/restore-email-forwarders log files.

  • 1 - Return additional information.
  • 0 - Do not return additional information.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "restore_email_forwarders",
  "module": "Backup",
  "result": {
    "data": {
      "log_id": "2019-08-13T15:10:07Z.1",
      "log_path": "/home/cpuser/.cpanel/logs/restore-email-forwarders/2019-09-11T18:30:49Z.1.log",
      "messages": [
        "The system successfully restored the email forwarders from the 'aliases-example.com.gz' backup."
      ]
    },
    "status": 1
  }
}