Skip to content

Changes properties of an email. This does not care about the previous status, i.e. setting a property to the same value as before will still result in a success response.

PATCH
/api/mailbox/{emailId}

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Path Parameters

emailId*

which email to modify

Typeinteger
Required

Request Body

JSON
{
"folder": 0,
"isRead": true
}

Responses

Success.
Authorization
api_key
Variables
Key
Value
emailId*
cURL
curl -X PATCH \
'http://localhost/api/mailbox/{emailId}' \
 --data '{
  "folder": 0,
  "isRead": true
}'

Samples

cURL
curl -X PATCH http://localhost/api/mailbox/{emailId}
JavaScript
fetch("http://localhost/api/mailbox/{emailId}", { method: "PATCH" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/mailbox/{emailId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.patch("http://localhost/api/mailbox/{emailId}")
print(response.json())