Skip to content

List routes for a domain

Returns a paginated list of routes attached to the domain. Optionally filter by an agent identifier to find routes pointing to a specific agent.

GET
/v1/domains/{domain}/routes

Authorization

Authorization<token>

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

In: header

Path Parameters

domainRequiredstring

Query Parameters

afterstring

Cursor for pagination indicating the starting point after which to fetch results.

beforestring

Cursor for pagination indicating the ending point before which to fetch results.

limitnumber

Limit the number of items to return

orderDirectionstring

Direction of sorting

Value in: "ASC" | "DESC"
orderBystring

Field to order by

includeCursorboolean

Include cursor item in response

agentIdstring

Agent identifier to filter routes by.

Header Parameters

idempotency-keystring

A header for idempotency purposes

Response Body

OK

dataRequiredarray<object>

List of returned domain routes

nextRequiredstring | null

The cursor for the next page of results, or null if there are no more pages.

previousRequiredstring | null

The cursor for the previous page of results, or null if this is the first page.

totalCountRequirednumber

The total count of items (up to 50,000)

totalCountCappedRequiredboolean

Whether there are more than 50,000 results available

export interface Response {
  /**
   * List of returned domain routes
   */
  data: DomainRouteResponseDto[];
  /**
   * The cursor for the next page of results, or null if there are no more pages.
   */
  next: string | null;
  /**
   * The cursor for the previous page of results, or null if this is the first page.
   */
  previous: string | null;
  /**
   * The total count of items (up to 50,000)
   */
  totalCount: number;
  /**
   * Whether there are more than 50,000 results available
   */
  totalCountCapped: boolean;
}
export interface DomainRouteResponseDto {
  _id: string;
  _domainId: string;
  address: string;
  /**
   * Internal id of the destination agent. Only present for agent routes.
   */
  agentId?: string;
  type: "agent" | "webhook";
  _environmentId: string;
  _organizationId: string;
  createdAt: string;
  updatedAt: string;
  /**
   * String key-value metadata (max 10 keys, 500 characters total when set via API).
   */
  data?: {
    [k: string]: string;
  };
}
 
curl -X GET "https://api.novu.co/v1/domains/string/routes?after=string&before=string&limit=10&orderDirection=ASC&orderBy=string&includeCursor=true&agentId=string" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>"
{
  "data": [
    {
      "_id": "string",
      "_domainId": "string",
      "address": "string",
      "agentId": "string",
      "type": "agent",
      "_environmentId": "string",
      "_organizationId": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "data": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "next": "string",
  "previous": "string",
  "totalCount": 0,
  "totalCountCapped": true
}

On this page

No Headings
Edit this page on GitHub