# initiateMyEmailChange

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/profile/email |

| Field | Value |
|---|---|
| operationId | initiateMyEmailChange |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /profile/email |
| tags | `My Profile` |
| summary | Initiate personal email change (sends verification email) |
| badges | None |

## Request Parameters

None.

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/InitiateEmailVerificationDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 202 | Verification email queued | #/components/schemas/InitiateEmailVerificationResponseDto |
| 400 | Invalid email payload | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 409 | Email already in use by another user (EMAIL_ALREADY_IN_USE) | #/components/schemas/ApiErrorResponseDto |
| 422 | Email is the same as the current personal email (EMAIL_UNCHANGED) | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 409 example

```json
{
  "statusCode": 409,
  "message": "Email already in use by another user",
  "error": "EMAIL_ALREADY_IN_USE"
}
```

### Response 422 example

```json
{
  "statusCode": 422,
  "message": "Email is unchanged",
  "error": "EMAIL_UNCHANGED"
}
```
