Update whitelist for a given project ID
PUT/projects/ {projectId}/ mailsettings/ whitelist/
v2
PUT
mail-projectsetting-update-whitelist-deprecated
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.projectsettingUpdateWhitelistDeprecated({
"projectId": "string",
"data": {
"whitelist": [
"email@mittwald.example"
]
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\ProjectsettingUpdateWhitelistDeprecated\ProjectsettingUpdateWhitelistDeprecatedRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\ProjectsettingUpdateWhitelistDeprecated\ProjectsettingUpdateWhitelistDeprecatedRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// ProjectsettingUpdateWhitelistDeprecatedRequestBody to learn how to construct a valid instance
$body = new ProjectsettingUpdateWhitelistDeprecatedRequestBody(/* TODO: ... */);
$request = (new ProjectsettingUpdateWhitelistDeprecatedRequest(
projectId: "string",
body: $body
));
$response = $client->mail()->projectsettingUpdateWhitelistDeprecated($request);
var_dump($response->getBody();