---
title: "Test an automation"
method: POST
path: "/v1/automations/{automationId}/test"
tags: ["Automations"]
---

# Test an automation

`POST /v1/automations/{automationId}/test`

Runs the saved automation END-TO-END through the real workflow in TEST mode — works on drafts and for both event and manual-audience automations; every node executes (filters/splits evaluate against `payload`, wait nodes fast-forward). Pass `testRecipient` to DELIVER each send-email node’s email for real to that address (real subject/preview/sender name via the Brew test domain; customer addresses are never hit) — omit it for a silent dry-run with no mail. Test runs never count against analytics rollups or send quotas. Returns `202` with the started run id; follow per-node status via `GET /v1/automations/runs?automationRunId=&include=logs`.

## Path parameters

- `automationId` string, required — Automation id returned by `POST /v1/automations` and listed by `GET /v1/automations`.

## Headers

- `Idempotency-Key` string

## Request body

- AutomationTestRequest
  - `payload` object
  - `testRecipient` string, email

## Response `202`

Test run started.

- AutomationRunStartedResponse
  - `triggerInstanceId` string
  - `automationRunIds` string[], required
  - `status` 'triggered' | 'idempotent_replay' | 'test_started' | 'replay_started', required
  - `counts` object
    - `automations` integer, required
    - `transactionalEmails` integer, required
  - `receivedAt` string, date-time, required
  - `warnings` string[]

## Other responses

- `400` — The request body or query string was invalid (unknown key, wrong type, or missing required field). Strict schemas reject unknown keys — including `brandId`, which is always resolved from the API key.
- `401` — The API key was missing, invalid, or revoked.
- `403` — The caller does not have the required `automations` permission.
- `404` — Automation not found in the API-key brand. Cross-brand ids intentionally surface as 404 (never 403) so the API does not leak cross-brand existence.
- `409` — The same `Idempotency-Key` was reused with a different request body.
- `429` — The request hit the rolling rate limit window.
- `500` — Unexpected internal error.

---

[API](https://skmtc.net/brew/apis/brew-public-api-v1.md) · [All operations](https://skmtc.net/brew/apis/brew-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brew/brew-public-api-v1/versions/db96cfedc6c5/schema)
