---
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`

## Request

- Base URL: `https://api.novu.co`
- URL: `https://api.novu.co/v1/domains/{domain}/routes/{address}/test`
- Auth: API key in header `Authorization`

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, email, 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.

## Changes

- **2026-10-21** `a5b639d63138`: 1 breaking
  - the `from/address` request property format changed from no format to `email`

[Operation history](https://skmtc.dev/novu/apis/novu-api/changes/v1/domains/:domain/routes/:address/test/post.md)

---

[API](https://skmtc.dev/novu/apis/novu-api.md) - [All operations](https://skmtc.dev/novu/apis/novu-api/llms.txt) - [OpenAPI document](https://skmtc.dev/novu/apis/novu-api/revisions/6349165a6e58?raw)
