---
title: "Test an inbound route"
method: POST
path: "/v1/domains/{domain}/routes/{address}/test"
tags: ["Domains"]
---

# Test an inbound route

`POST /v1/domains/{domain}/routes/{address}/test`

Sends a synthetic inbound email through the same delivery path as production (outbound webhooks for webhook routes, signed HTTP to the agent for agent routes). Use `dryRun: true` to preview the payload without delivering.

## Path parameters

- `domain` string, required
- `address` string, required

## Headers

- `idempotency-key` string

## Request body

- TestDomainRouteDto
  - `from` TestDomainRouteFromDto, required
    - `address` string, required
    - `name` string
  - `subject` string, required
  - `text` string
  - `html` string
  - `dryRun` boolean — When true, returns the payload that would be delivered without invoking outbound webhooks or the agent HTTP endpoint.

## Response `200`

OK

- TestDomainRouteResponseDto
  - `matched` boolean, required
  - `dryRun` boolean, required
  - `domainStatus` 'pending' | 'verified'
  - `mxRecordConfigured` boolean
  - `type` 'agent' | 'webhook'
  - `wouldDeliverTo` string — Human-readable delivery target summary in dry-run mode.
  - `payload` object — The outbound payload (dry-run only).
  - `webhook` TestDomainRouteWebhookResultDto
    - `skipped` boolean — True when outbound webhooks are disabled for this environment (nothing was emitted).
    - `latencyMs` number, required
  - `agent` TestDomainRouteAgentResultDto
    - `agentId` string, required
    - `httpStatus` number, required
    - `agentReply` object — Parsed JSON body from the agent webhook response when JSON.
    - `latencyMs` number, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `413` — Payload Too Large
- `414` — URI Too Long
- `415` — Unsupported Media Type
- `422` — Unprocessable Entity
- `429` — The client has sent too many requests in a given amount of time.
- `500` — Internal Server Error
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

---

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