Change your mail address
PUT/users/ self/ credentials/ email/
v2
PUT
user-change-email
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PUT \
-d '{"email":"ada.lovelace@example.com"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/users/self/credentials/email
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.user.changeEmail({
"data": {
"email": "ada.lovelace@example.com"
}
});
assertStatus(response, 204);
use \Mittwald\ApiClient\Generated\V2\Clients\User\ChangeEmail\ChangeEmailRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\User\ChangeEmail\ChangeEmailRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// ChangeEmailRequestBody to learn how to construct a valid instance
$body = new ChangeEmailRequestBody(/* TODO: ... */);
$request = (new ChangeEmailRequest(
body: $body
));
$response = $client->user()->changeEmail($request);
var_dump($response->getBody();