# Preview subscriber deliveries — API reference

> Previews e-mail and webhook deliveries for a status-page update without queueing messages or consuming page limits.

Source: https://upfour.io/docs/api/status-pages/preview-subscriber-deliveries

[Developers](https://upfour.io/docs/api.md)/[Status pages](https://upfour.io/docs/api/status-pages.md)

Previews e-mail and webhook deliveries for a status-page update without queueing messages or consuming page limits.

GET https://app.upfour.io/v1/status-pages/{pageID}/mail-preview

scope status_page.read stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `pageID` required | uuid | path parameter |
| `kind` required | string one of`start` `interim` `resolution` | query parameter · The entry about to be published: `start` (first entry of a new incident or maintenance, also publishing a draft), `interim` (an update in between) or `resolution` (resolved, completed, cancelled). |
| `update_id` optional | uuid | query parameter · The thread the entry belongs to. Its type and components win over `type` and `resource_ids`. Without it the thread is new and nobody has been mailed about it yet. |
| `type` optional | string one of`incident` `maintenance` `report` | query parameter · Type of a thread that does not exist yet (default `incident`). |
| `resource_ids` optional | string | query parameter · Comma-separated affected components of a thread that does not exist yet; empty means all subscribers. |

## Returns

A successful request returns `200` with application/json.

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | MailPreview | |
| MailPreview · 28 fields FieldTypeDescription `billing_paused` boolean `email` MailPreviewEmail MailPreviewEmail · 11 fields FieldTypeDescription `folded` integer `groups` MailPreviewGroup[]  · nullable Each item · 5 fields FieldTypeDescription `count` integer `earliest` string (date-time)  · nullable `latest` string (date-time)  · nullable `outcome` string one of`folded` `not_sent` `reason` string `immediate` integer `next_mail_at` string (date-time)  · nullable `not_sent` integer `recipients` integer `generated_at` string (date-time) `kind` string one of`start` `interim` `resolution` `limits` MailPreviewLimits MailPreviewLimits · 5 fields FieldTypeDescription `brake_mails` integer `brake_window_seconds` integer `interim_window_seconds` integer `page_burst` integer `page_entries_per_hour` integer `quota_level` string one of`ok` `warn` `bundle` `hold` `stop` `update_id` uuid  · nullable null when the preview is for a thread that does not exist yet. `update_type` string one of`incident` `maintenance` `report` `webhook` MailPreviewWebhook MailPreviewWebhook · 3 fields FieldTypeDescription `immediate` integer `not_sent` integer `recipients` integer | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | [bad_request](https://upfour.io/docs/api/errors#code-bad_request) | The request is malformed or fails validation. |
| 404 | [not_found](https://upfour.io/docs/api/errors#code-not_found) | The requested resource does not exist or is outside the caller's scope. |

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

[PreviousDuplicate a status page](https://upfour.io/docs/api/status-pages/duplicate-a-status-page.md) [NextList report updates](https://upfour.io/docs/api/status-pages/list-report-updates.md)

## Request

### cURL

```bash
curl -s "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/mail-preview?kind=start" \
  -H "Authorization: Bearer $UP4_API_KEY"
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/mail-preview?kind=start", {
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/mail-preview?kind=start",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/mail-preview?kind=start", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(out))
}
```

### PHP

```php
<?php
$ch = curl_init("https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/mail-preview?kind=start");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
    ],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 200

```json
{
  "data": {
    "billing_paused": false,
    "email": {
      "folded": 0,
      "groups": [],
      "immediate": 0,
      "next_mail_at": null,
      "not_sent": 0,
      "recipients": 0
    },
    "generated_at": "2026-10-27T09:00:00Z",
    "kind": "start",
    "limits": {
      "brake_mails": 20,
      "brake_window_seconds": 86400,
      "interim_window_seconds": 1800,
      "page_burst": 5,
      "page_entries_per_hour": 10
    },
    "quota_level": "ok",
    "update_id": null,
    "update_type": "incident",
    "webhook": {
      "immediate": 0,
      "not_sent": 0,
      "recipients": 0
    }
  }
}
```

### 400

```json
{
  "error": {
    "code": "bad_request",
    "message": "The request is malformed or fails validation.",
    "request_id": "req_…"
  }
}
```

### 404

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource does not exist or is outside the caller's scope.",
    "request_id": "req_…"
  }
}
```
