Zum Hauptinhalt springen

Update whitelist for a given project ID

PUT/v2/projects/{projectId}/mailsettings/whitelist
API-Version
v2
Request-Methode
PUT
Operation-ID
deprecated-mail-projectsetting-update-whitelist

Request​

  • projectIdstringrequired

    ID of the project you want to update whitelist for

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X PUT \
-d '{"whitelist":["string"]}' \
-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": [
"string"
]
}
});

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();

Auf dieser Seite