Zum Hauptinhalt springen

Update a mail setting of a Project

PATCH/v2/projects/{projectId}/mail-settings/{mailSetting}
API-Version
v2
Request-Methode
PATCH
Operation-ID
mail-update-project-mail-setting

Request​

  • projectIdstringrequired

    ID of the Project to update a mail setting for.

  • mailSettingstring (einer von: blacklist, whitelist)required

    The mail setting to update.

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

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

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

Auf dieser Seite