Update whitelist for a given project ID
PUT/projects/ {projectId}/ mailsettings/ whitelist/
v2
PUT
deprecated-mail-projectsetting-update-whitelist
This operation is deprecated. Use the PATCH v2/{projectId}/mail-settings/{mailSetting} endpoint instead.
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PUT \
-d '{"whitelist":["email@mittwald.example"]}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/projects/string/mailsettings/whitelist
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.deprecatedMailProjectsettingUpdateWhitelist({
"projectId": "string",
"data": {
"whitelist": [
"email@mittwald.example"
]
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\DeprecatedMailProjectsettingUpdateWhitelist\DeprecatedMailProjectsettingUpdateWhitelistRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\DeprecatedMailProjectsettingUpdateWhitelist\DeprecatedMailProjectsettingUpdateWhitelistRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// DeprecatedMailProjectsettingUpdateWhitelistRequestBody to learn how to construct a valid instance
$body = new DeprecatedMailProjectsettingUpdateWhitelistRequestBody(/* TODO: ... */);
$request = (new DeprecatedMailProjectsettingUpdateWhitelistRequest(
projectId: "string",
body: $body
));
$response = $client->mail()->deprecatedMailProjectsettingUpdateWhitelist($request);
var_dump($response->getBody();