# Email yourself a preview

`POST https://evohub.io/api/v1/uptime-digest/preview`

Part of the [Uptime API](https://docs-dev.evohub.io/uptime.md) reference · operationId `sendWeeklySummaryPreview`.

Emails the caller the summary of the last full week. Takes no body.

Only an owner or administrator signed in to EvoHub can do this, at
most once a minute. An API key always gets **403**.

Requires the `uptime:monitor:read` scope, and a person who is an
owner or administrator.

## Authorization

Any one of:

- `bearerKey`
- `headerKey`

Where:

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Responses

### 200 — The preview was sent.

Content type: `application/json`

Type: `object`

- `data` (object)
  - `sent_to` (string, required): The address it was sent to.

### 401 — No API key was sent, or it is unknown, revoked or expired (`UNAUTHORIZED`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 403 — The caller is not an owner or administrator signed in as a person, or lacks `uptime:monitor:read` (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 409 — The weekly summary email is not available yet (`DIGEST_UNAVAILABLE`), there are no monitors to summarize (`NO_MONITORS`), or the caller's account has no address it can be sent to (`NO_DELIVERABLE_EMAIL`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 429 — A preview was sent to the caller less than a minute ago (`RATE_LIMITED`), or the API rate limit was reached.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 502 — The email provider refused the preview (`EMAIL_REJECTED`), or it could not be sent (`PREVIEW_FAILED`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

## Example request

```bash
curl -X POST 'https://evohub.io/api/v1/uptime-digest/preview' \
  -H 'Authorization: Bearer <TOKEN>'
```
