Skip to content

List domains for an environment

Returns a paginated list of inbound-email domains in the current environment. Supports cursor pagination and a name contains filter.

GET
/v1/domains

Authorization

Authorization<token>

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

In: header

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

namestring

Domain name to filter results by.

Header Parameters

idempotency-keystring

A header for idempotency purposes

Response Body

OK

dataRequiredarray<object>

List of returned domains

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 domains
   */
  data: DomainResponseDto[];
  /**
   * 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 DomainResponseDto {
  _id: string;
  name: string;
  status: "pending" | "verified";
  mxRecordConfigured: boolean;
  dnsProvider?: string;
  _environmentId: string;
  _organizationId: string;
  createdAt: string;
  updatedAt: string;
  expectedDnsRecords?: ExpectedDnsRecordDto[];
  /**
   * String key-value metadata (max 10 keys, 500 characters total when set via API).
   */
  data?: {
    [k: string]: string;
  };
}
export interface ExpectedDnsRecordDto {
  type: string;
  name: string;
  content: string;
  ttl: string;
  priority?: number;
}
 
curl -X GET "https://api.novu.co/v1/domains?after=string&before=string&limit=10&orderDirection=ASC&orderBy=string&includeCursor=true&name=string" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>"
{
  "data": [
    {
      "_id": "string",
      "name": "string",
      "status": "pending",
      "mxRecordConfigured": true,
      "dnsProvider": "string",
      "_environmentId": "string",
      "_organizationId": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "expectedDnsRecords": [
        {
          "type": "MX",
          "name": "inbound",
          "content": "inbound-smtp.us-east-1.amazonaws.com",
          "ttl": "Auto",
          "priority": 10
        }
      ],
      "data": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "next": "string",
  "previous": "string",
  "totalCount": 0,
  "totalCountCapped": true
}

On this page

No Headings
Edit this page on GitHub