Skip to main content
PATCH
/
v1
/
domains
/
{domain}
/
routes
/
{address}
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();

$updateDomainRouteDto = new Components\UpdateDomainRouteDto();

$response = $sdk->domains->routes->update(
    domain: 'cavernous-cycle.com',
    address: '70213 Gerlach Rue',
    updateDomainRouteDto: $updateDomainRouteDto

);

if ($response->domainRouteResponseDto !== null) {
    // handle response
}
{
  "_id": "<string>",
  "_domainId": "<string>",
  "address": "<string>",
  "_environmentId": "<string>",
  "_organizationId": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "agentId": "<string>",
  "data": {}
}

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
agentId
string

Agent identifier; required when type is agent, ignored when type is webhook.

type
enum<string>
Available options:
agent,
webhook
data
object

Replaces route metadata when provided (max 10 keys, 500 characters total for keys+values).

Response

OK

_id
string
required
_domainId
string
required
address
string
required
type
enum<string>
required
Available options:
agent,
webhook
_environmentId
string
required
_organizationId
string
required
createdAt
string
required
updatedAt
string
required
agentId
string

Internal id of the destination agent. Only present for agent routes.

data
object

String key-value metadata (max 10 keys, 500 characters total when set via API).