---
title: "Preview Kai-written emails"
url: https://docs.gleap.ai/en/reference/rest-api/sample-kai-emails
method: POST
path: "/engagement/emails/{engagementEmailId}/kai/sample"
api: "API Reference"
tag: "Engagement Email"
operationId: "SampleKaiEmails"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Preview Kai-written emails

`POST https://api.gleap.io/v3/engagement/emails/{engagementEmailId}/kai/sample`

Writes Kai emails for a few sample recipients with the saved Kai config. Nothing is sent or stored; the model calls are billed as AI usage.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Path parameters

- `engagementEmailId` (string, required)

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

- `contactIds` (string[]): Contacts of this project to write for (max 5). Without them Kai picks recent contacts from the audience.
- `count` (number<double>): How many samples (default 3, max 5).

## Example request

```bash
curl --request POST \
  --url 'https://api.gleap.io/v3/engagement/emails/{engagementEmailId}/kai/sample' \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "count": 0
}'
```

## Responses

### 200 (`application/json`)

Ok
