---
title: "Send a test email"
description: "Sends one email step of the draft to an address of your choice, filled in with sample values, so you can read it before anybody else does."
url: "https://openemail.uk/docs/api/automations/test"
area: "API"
category: "Mailbox"
---

# Send a test email

Sends one email step of the draft to an address of your choice, filled in with sample values, so you can read it before anybody else does.

`POST /automations/{id}/test`

## POST /automations/{id}/test

Sends one email step of the draft to an address of your choice, filled in with sample values, so you can read it before anybody else does.

## Example

Needs `automations:write` and `emails:send`.

**curl**

```
curl -X POST "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/test" -H "$AUTH" -H 'content-type: application/json' -d '{
  "stepKey": "welcome",
  "to": "me@acme.com"
}'
```

**Response**

```
{
  "object": "automation_test",
  "automationId": "aut_7c2e9a1f4b8d30c65e1a9f27",
  "emailId": "msg_8cd0a316930b4482a8b8440b",
  "to": "me@acme.com",
  "stepKey": "welcome"
}
```

> Leave `to` out and the test goes to the account email of the person the key or app acts for.

> A test enrolls nobody and counts in no numbers. Its subject starts with `[Test]`, and its unsubscribe link unsubscribes nobody.

> `stepKey` has to name a `send_email` step of the draft, or the answer is 422 `invalid_automation`.

## Reference

- [`POST /automations/{id}/test`](https://openemail.uk/docs/api/reference/automations#post-automations-id-test): full reference
