# Confirm an email channel

`POST /api/v1/alert-channel-confirmations/{token}`

Confirms the address of an email channel: it receives alerts from now on, and the link stops working. The link's token is the credential; no sign-in needed.

Sign-in: none.

Section: Alert channels. Operation id in openapi.json: `confirm_alert_channel`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `token` | path | yes | string | The token from the link's address. |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 200

The confirmed channel.

`application/json`: ChannelConfirmation

| Field | Type | Required | Description |
|---|---|---|---|
| `confirmed` | boolean | yes | True once confirmed (the answer of the POST, or a GET after it). |
| `email` | string | yes |  |
| `expiresAt` | string \| null | no |  |
| `projectName` | string \| null | no | Null for a workspace channel. |
| `workspaceName` | string | yes |  |

### 400

Bad Request.

- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `request.origin_mismatch`, `request.header_required`: a changing request with a session comes from another site or lacks `X-Monitorly-Request: 1`

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it
- `alert_channel.verify_not_found`: channel confirmation link not found (already used or channel deleted)

### 410

Gone.

- `alert_channel.verify_expired`: confirmation link is older than 24 hours: send the email again

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
