Update a mail setting of a Project
PUT/projects/ {projectId}/ mail-settings/ {setting}/
v2
PUT
mail-update-project-mail-setting-v2-deprecated
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PUT \
-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.updateProjectMailSettingV2Deprecated({
"projectId": "string",
"setting": "blacklist",
"data": {
"blacklist": [
"email@mittwald.example"
]
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\UpdateProjectMailSettingV2Deprecated\UpdateProjectMailSettingV2DeprecatedRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\UpdateProjectMailSettingV2Deprecated\UpdateProjectMailSettingV2DeprecatedRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// UpdateProjectMailSettingV2DeprecatedRequestBody to learn how to construct a valid instance
$body = new UpdateProjectMailSettingV2DeprecatedRequestBody(/* TODO: ... */);
$request = (new UpdateProjectMailSettingV2DeprecatedRequest(
projectId: "string",
setting: "blacklist",
body: $body
));
$response = $client->mail()->updateProjectMailSettingV2Deprecated($request);
var_dump($response->getBody();