Update a mail setting of a Project
PATCH/projects/ {projectId}/ mail-settings/ {mailSetting}/
v2
PATCH
mail-update-project-mail-setting
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PATCH \
-d '{"blacklist":["email@mittwald.example"]}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/projects/string/mail-settings/blacklist
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.mail.updateProjectMailSetting({
"projectId": "string",
"mailSetting": "blacklist",
"data": {
"blacklist": [
"email@mittwald.example"
]
}
});
assertStatus(response, 204);
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\UpdateProjectMailSetting\UpdateProjectMailSettingRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\UpdateProjectMailSetting\UpdateProjectMailSettingRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// UpdateProjectMailSettingRequestBody to learn how to construct a valid instance
$body = new UpdateProjectMailSettingRequestBody(/* TODO: ... */);
$request = (new UpdateProjectMailSettingRequest(
projectId: "string",
mailSetting: "blacklist",
body: $body
));
$response = $client->mail()->updateProjectMailSetting($request);
var_dump($response->getBody();