Skip to main content
POST
/
v1
/
domains
/
{domain}
/
routes
/
{address}
/
test
PHP
declare(strict_types=1);

require 'vendor/autoload.php';

use novu;
use novu\Models\Components;

$sdk = novu\Novu::builder()
    ->setSecurity(
        'YOUR_SECRET_KEY_HERE'
    )
    ->build();

$testDomainRouteDto = new Components\TestDomainRouteDto(
    from: new Components\TestDomainRouteFromDto(
        address: '58851 Konopelski Overpass',
    ),
    subject: '<value>',
);

$response = $sdk->domains->routes->test(
    domain: 'exalted-bonfire.com',
    address: '90499 Rowan Close',
    testDomainRouteDto: $testDomainRouteDto

);

if ($response->testDomainRouteResponseDto !== null) {
    // handle response
}
{
  "matched": true,
  "dryRun": true,
  "mxRecordConfigured": true,
  "wouldDeliverTo": "<string>",
  "payload": {},
  "webhook": {
    "latencyMs": 123,
    "skipped": true
  },
  "agent": {
    "agentId": "<string>",
    "httpStatus": 123,
    "latencyMs": 123,
    "agentReply": {}
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

Headers

idempotency-key
string

A header for idempotency purposes

Path Parameters

domain
string
required
address
string
required

Body

application/json
from
object
required
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

OK

matched
boolean
required
dryRun
boolean
required
domainStatus
enum<string>
Available options:
pending,
verified
mxRecordConfigured
boolean
type
enum<string>
Available options:
agent,
webhook
wouldDeliverTo
string

Human-readable delivery target summary in dry-run mode.

payload
object

The outbound payload (dry-run only).

webhook
object
agent
object