Skip to content

🌐 Domains module Inbound API

Manage your MailChannels Inbound domains.

Provision method

Provision a single domain to use MailChannels Inbound.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.provision({
  domain: 'example.com',
  subscriptionHandle: 'your-subscription-handle'
})
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.provision({
  domain: 'example.com',
  subscriptionHandle: 'your-subscription-handle'
})

Params

  • options DomainsProvisionOptions & DomainsData required: The provision options and domain data.
    • subscriptionHandle string required: The subscription handle that identifies the subscription that this domain should be provisioned against.

      TIP

      Subscription handles can be retrieved from the subscriptions service method.

    • domain string required: The domain name.
    • settings object optional: The abuse policy settings for the domain. These settings determine how spam messages are handled.
      • abusePolicy "block" | "flag" | "quarantine" optional: The abuse policy.
      • abusePolicyOverride boolean optional: If true, this abuse policy overrides the recipient abuse policy.
      • spamHeaderName string optional: The header name to use if the abuse policy is set to flag.
      • spamHeaderValue string optional: The header value to use if the abuse policy is set to flag.
    • admins string[] | null optional: A list of email addresses that are the domain admins for the domain.
    • downstreamAddresses object[] | null optional: The locations of mail servers to which messages will be delivered after filtering.
      • priority number required: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
      • weight number required: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
      • port number required: TCP port on which the downstream mail server is listening.
      • target string required: The canonical hostname of the host providing the service, ending in a dot.
    • aliases string[] | null optional: A list of aliases for the domain. Mail is accepted for these domains and routed to the downstreamAddresses defined for the domain.

      NOTE

      Aliases are limited to 255 characters.

    • associateKey boolean optional: If present and set to true, the domain will be associated with the api-key that created it. This means that this api-key must be used for inbound-api actions involving this domain (for example adding safe/block list entries, etc).
    • overwrite boolean optional: If present and set to true, the settings (domain settings, downstream addresses, aliases and admins) for the domain will be overwritten with the ones in the request if the domain already exists, unless a section is not included in the request or there is problem updating a setting in which case the previous settings are carried forward.

Response

  • data DomainsData | null nullable: The provisioned domain data.
    • domain string guaranteed: The domain name.
    • settings object optional: The abuse policy settings for the domain. These settings determine how spam messages are handled.
      • abusePolicy "block" | "flag" | "quarantine" optional: The abuse policy.
      • abusePolicyOverride boolean optional: If true, this abuse policy overrides the recipient abuse policy.
      • spamHeaderName string optional: The header name to use if the abuse policy is set to flag.
      • spamHeaderValue string optional: The header value to use if the abuse policy is set to flag.
    • admins string[] | null nullable: A list of email addresses that are the domain admins for the domain.
    • downstreamAddresses object[] | null nullable: The locations of mail servers to which messages will be delivered after filtering.
      • priority number guaranteed: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
      • weight number guaranteed: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
      • port number guaranteed: TCP port on which the downstream mail server is listening.
      • target string guaranteed: The canonical hostname of the host providing the service, ending in a dot.
    • aliases string[] | null nullable: A list of aliases for the domain. Mail is accepted for these domains and routed to the downstreamAddresses defined for the domain.
    • subscriptionHandle string guaranteed: The subscription handle that identifies the subscription that this domain should be provisioned against.
  • error string | null nullable

Bulk Provision method

Provision up to 1000 domains to use MailChannels Inbound.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.bulkProvision({
  subscriptionHandle: 'your-subscription-handle'
}, [
  { domain: 'example.com' },
  { domain: 'example2.com' }
])
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.bulkProvision({
  subscriptionHandle: 'your-subscription-handle'
}, [
  { domain: 'example.com' },
  { domain: 'example2.com' }
])

Params

  • options DomainsBulkProvisionOptions required: The options to provision the domains.
    • subscriptionHandle string required: The subscription handle that identifies the subscription that this domain should be provisioned against.

      TIP

      Subscription handles can be retrieved from the subscriptions service method.

    • associateKey boolean optional: If present and set to true, the domain will be associated with the api-key that created it. This means that this api-key must be used for inbound-api actions involving this domain (for example adding safe/block list entries, etc).
    • overwrite boolean optional: If present and set to true, the settings (domain settings, downstream addresses, aliases and admins) for the domain will be overwritten with the ones in the request if the domain already exists, unless a section is not included in the request or there is problem updating a setting in which case the previous settings are carried forward.
  • domains DomainsData[] required: A list of domain data to provision.
    • domain string required: The domain name.
    • settings object optional: The abuse policy settings for the domain. These settings determine how spam messages are handled.
      • abusePolicy "block" | "flag" | "quarantine" optional: The abuse policy.
      • abusePolicyOverride boolean optional: If true, this abuse policy overrides the recipient abuse policy.
      • spamHeaderName string optional: The header name to use if the abuse policy is set to flag.
      • spamHeaderValue string optional: The header value to use if the abuse policy is set to flag.
    • admins string[] | null optional: A list of email addresses that are the domain admins for the domain.
    • downstreamAddresses object[] | null optional: The locations of mail servers to which messages will be delivered after filtering.
      • priority number required: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
      • weight number required: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
      • port number required: TCP port on which the downstream mail server is listening.
      • target string required: The canonical hostname of the host providing the service, ending in a dot.
    • aliases string[] | null optional: A list of aliases for the domain. Mail is accepted for these domains and routed to the downstreamAddresses defined for the domain.

      NOTE

      Aliases are limited to 255 characters.

Response

  • data object | null nullable: If the request was processed successfully, this does not necessarily mean all the domains in the request were successfully provisioned.
    • successes object[] guaranteed: Domains that were successfully provisioned or updated.
      • code number guaranteed
      • comment string optional
      • domain DomainsData guaranteed: The provisioned domain data.
        • domain string guaranteed: The domain name.
        • settings object optional: The abuse policy settings for the domain. These settings determine how spam messages are handled.
          • abusePolicy "block" | "flag" | "quarantine" optional: The abuse policy.
          • abusePolicyOverride boolean optional: If true, this abuse policy overrides the recipient abuse policy.
          • spamHeaderName string optional: The header name to use if the abuse policy is set to flag.
          • spamHeaderValue string optional: The header value to use if the abuse policy is set to flag.
        • admins string[] | null nullable: A list of email addresses that are the domain admins for the domain.
        • downstreamAddresses object[] | null nullable: The locations of mail servers to which messages will be delivered after filtering.
          • priority number guaranteed: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
          • weight number guaranteed: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
          • port number guaranteed: TCP port on which the downstream mail server is listening.
          • target string guaranteed: The canonical hostname of the host providing the service, ending in a dot.
        • aliases string[] | null nullable: A list of aliases for the domain. Mail is accepted for these domains and routed to the downstreamAddresses defined for the domain.
        • subscriptionHandle string guaranteed: The subscription handle that identifies the subscription that this domain should be provisioned against.
    • errors object[] guaranteed: Domains that were not successfully provisioned.
      • code number guaranteed
      • comment string optional
      • domain DomainsData guaranteed: The failed to provision domain data.
        • domain string guaranteed: The domain name.
        • settings object optional: The abuse policy settings for the domain. These settings determine how spam messages are handled.
          • abusePolicy "block" | "flag" | "quarantine" optional: The abuse policy.
          • abusePolicyOverride boolean optional: If true, this abuse policy overrides the recipient abuse policy.
          • spamHeaderName string optional: The header name to use if the abuse policy is set to flag.
          • spamHeaderValue string optional: The header value to use if the abuse policy is set to flag.
        • admins string[] | null nullable: A list of email addresses that are the domain admins for the domain.
        • downstreamAddresses object[] | null nullable: The locations of mail servers to which messages will be delivered after filtering.
          • priority number guaranteed: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
          • weight number guaranteed: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
          • port number guaranteed: TCP port on which the downstream mail server is listening.
          • target string guaranteed: The canonical hostname of the host providing the service, ending in a dot.
        • aliases string[] | null nullable: A list of aliases for the domain. Mail is accepted for these domains and routed to the downstreamAddresses defined for the domain.
        • subscriptionHandle string guaranteed: The subscription handle that identifies the subscription that this domain should be provisioned against.
  • error string | null nullable

List method

Fetch a list of all domains associated with this API key.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.list()
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.list()

Params

  • options DomainsListOptions optional: List domains options.
    • domains string[] optional: A list of domains to fetch. If this parameter is present, only domains whose name matches an item in this list are returned.
    • limit number optional: The maximum number of domains included in the response. Possible values are 1 to 5000.
    • offset number optional: Offset into the list of domains to return.

    TIP

    If no options are provided, the default limit is 10 and the offset is 0.

Response

  • data object | null nullable
    • domains DomainsData[] guaranteed: A list of domain data.
      • domain string guaranteed: The domain name.
      • settings object optional: The abuse policy settings for the domain. These settings determine how spam messages are handled.
        • abusePolicy "block" | "flag" | "quarantine" optional: The abuse policy.
        • abusePolicyOverride boolean optional: If true, this abuse policy overrides the recipient abuse policy.
        • spamHeaderName string optional: The header name to use if the abuse policy is set to flag.
        • spamHeaderValue string optional: The header value to use if the abuse policy is set to flag.
      • admins string[] | null nullable: A list of email addresses that are the domain admins for the domain.
      • downstreamAddresses object[] | null nullable: The locations of mail servers to which messages will be delivered after filtering.
        • priority number guaranteed: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
        • weight number guaranteed: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
        • port number guaranteed: TCP port on which the downstream mail server is listening.
        • target string guaranteed: The canonical hostname of the host providing the service, ending in a dot.
      • aliases string[] | null nullable: A list of aliases for the domain. Mail is accepted for these domains and routed to the downstreamAddresses defined for the domain.
      • subscriptionHandle string guaranteed: The subscription handle that identifies the subscription that this domain should be provisioned against.
    • total number guaranteed: The total number of domains that are accessible with the given API key that match the list of domains in the 'domains' parameter. If there is no 'domains' parameter, this field is the total number of domains that are accessible with with this API key. A domain is accessible with a given API key if it is associated with that API key, or if it is not associated with any API key.
  • error string | null nullable

Delete method

De-provision a domain to cease protecting it with MailChannels Inbound.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { success, error } = await domains.delete('example.com')
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { success, error } = await mailchannels.domains.delete('example.com')

Params

  • domain string required: The domain name to be removed.

Response

  • success boolean guaranteed: Whether the operation was successful.
  • error string | null nullable

Add List Entry method

Add an entry to a domain blocklist or safelist.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.addListEntry('example.com', {
  listName: 'safelist',
  item: 'name@domain.com'
})
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.addListEntry('example.com', {
  listName: 'safelist',
  item: 'name@domain.com'
})

Params

  • domain string required: The domain name.
  • options ListEntryOptions required: Add list entry options.
    • listName "blocklist" | "safelist" | "blacklist" | "whitelist" required: The list to add the item to.
    • item string required: The item to add to the list. This can be a domain, email address, or IP address.

Response

  • data ListEntry | null nullable
    • action "blocklist" | "safelist" guaranteed
    • item string guaranteed
    • type "domain" | "email_address" | "ip_address" guaranteed
  • error string | null nullable

List Entries method

Get domain list entries.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.listEntries('example.com', 'safelist')
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.listEntries('example.com', 'safelist')

Params

  • domain string required: The domain name whose list will be fetched.
  • listName "blocklist" | "safelist" | "blacklist" | "whitelist" required: The name of the list to fetch.

Response

  • data ListEntry[] | null nullable
    • action "blocklist" | "safelist" guaranteed
    • item string guaranteed
    • type "domain" | "email_address" | "ip_address" guaranteed
  • error string | null nullable

Delete List Entry method

Delete item from domain list.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { success, error } = await domains.deleteListEntry('example.com', {
  listName: 'safelist',
  item: 'name@domain.com'
})
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { success, error } = await mailchannels.domains.deleteListEntry('example.com', {
  listName: 'safelist',
  item: 'name@domain.com'
})

Params

  • domain string required: The domain name whose list will be modified.
  • options ListEntryOptions required: Add list entry options.
    • listName "blocklist" | "safelist" | "blacklist" | "whitelist" required: The name of the list to remove an entry from.
    • item string required: The list entry which should be removed. This can be a domain, email address, or IP address.

Response

  • success boolean guaranteed: Whether the operation was successful.
  • error string | null nullable

Generate a link that allows a user to log in as a domain administrator.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.createLoginLink("example.com")
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.createLoginLink("example.com")

Params

  • domain string required: The domain name.

Response

  • data object | null nullable
    • link string guaranteed: If a user browses to this URL, they will be automatically logged in as a domain admin.
  • error string | null nullable

Set Downstream Address method

Sets the list of downstream addresses for the domain.

WARNING

This action deletes any existing downstream address for the domain before creating new ones.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { success, error } = await domains.setDownstreamAddress('example.com', [
  {
    port: 25,
    priority: 10,
    target: 'example.com.',
    weight: 10
  }
])
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { success, error } = await mailchannels.domains.setDownstreamAddress('example.com', [
  {
    port: 25,
    priority: 10,
    target: 'example.com.',
    weight: 10
  }
])

Params

  • domain string required: The domain name to set downstream addresses for.
  • records DomainsDownstreamAddress[] required: The list of downstream addresses to set for the domain.
    • port number required: TCP port on which the downstream mail server is listening.
    • priority number required: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
    • target string required: The canonical hostname of the host providing the service, ending in a dot.
    • weight number required: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.

IMPORTANT

If the records parameter is an empty array, all downstream address records will be deleted.

Response

  • success boolean guaranteed: Whether the operation was successful.
  • error string | null nullable

List Downstream Addresses method

Retrieve stored downstream addresses for the domain.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.listDownstreamAddresses('example.com')
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.listDownstreamAddresses('example.com')

Params

  • domain string required: The domain name to get downstream addresses records for.
  • options DomainsListDownstreamAddressesOptions optional: List domains options.
    • limit number optional: The number of records to return.
    • offset number optional: The offset into the records to return.

    TIP

    If no options are provided, the default limit is 10 and the offset is 0.

Response

  • data DomainsDownstreamAddress[] | null nullable
    • port number guaranteed: TCP port on which the downstream mail server is listening.
    • priority number guaranteed: The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
    • target string guaranteed: The canonical hostname of the host providing the service, ending in a dot.
    • weight number guaranteed: Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
  • error string | null nullable

Update API Key method

Update the API key that is associated with a domain.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { success, error } = await domains.updateApiKey('example.com', 'your-api-key')
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { success, error } = await mailchannels.domains.updateApiKey('example.com', 'your-api-key')

Params

  • domain string required: The domain name.
  • key string required: The new API key to associate with this domain.

Response

  • success boolean guaranteed: Whether the operation was successful.
  • error string | null nullable

Generate a batch of links that allow a user to log in as a domain administrator to their different domains.

Usage

ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)

const { data, error } = await domains.bulkCreateLoginLinks([
  'example.com',
  'example2.com'
])
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { data, error } = await mailchannels.domains.bulkCreateLoginLinks([
  'example.com',
  'example2.com'
])

Params

  • domains string[] required: A list of domain names to generate login links for. Maximum of 1000 domains per request.

Response

  • data DomainsBulkCreateLoginLinks | null nullable
    • successes DomainsBulkCreateLoginLinkResult[] guaranteed
      • domain string guaranteed: The domain the request was for.
      • code 200 guaranteed
      • comment string optional
      • loginLink string guaranteed: If a user browses to this URL, they will be automatically logged in as a domain admin.
    • errors DomainsBulkCreateLoginLinkResult[] guaranteed
      • domain string guaranteed: The domain the request was for.
      • code 400 | 401 | 403 | 404 | 500 guaranteed
      • comment string optional
  • error string | null nullable

Type declarations

ts
class Domains {
  constructor (protected mailchannels: MailChannelsClient);
  async provision (options: DomainsProvisionOptions & DomainsData): Promise<DomainsProvisionResponse>;
  async bulkProvision (options: DomainsBulkProvisionOptions, domains: Omit<DomainsData, "subscriptionHandle">[]): Promise<DomainsBulkProvisionResponse>;
  async list (options?: DomainsListOptions): Promise<DomainsListResponse>;
  async delete (domain: string): Promise<SuccessResponse>;
  async addListEntry (domain: string, options: ListEntryOptions): Promise<ListEntryResponse>;
  async listEntries (domain: string, listName: ListNames): Promise<ListEntriesResponse>;
  async deleteListEntry (domain: string, options: ListEntryOptions): Promise<SuccessResponse>;
  async createLoginLink (domain: string): Promise<DomainsCreateLoginLinkResponse>;
  async setDownstreamAddress (domain: string, records?: DomainsDownstreamAddress[]): Promise<SuccessResponse>;
  async listDownstreamAddresses (domain: string, options?: DomainsListDownstreamAddressesOptions): Promise<DomainsListDownstreamAddressesResponse>;
  async updateApiKey (domain: string, key: string): Promise<SuccessResponse>;
  async bulkCreateLoginLinks (domains: string[]): Promise<DomainsBulkCreateLoginLinksResponse>;
}
All type declarations

Responses

ts
interface DataResponse<T> {
  data: T | null;
  error: string | null;
}
ts
interface SuccessResponse {
  success: boolean;
  error: string | null;
}

Provision type declarations

ts
interface DomainsData {
  domain: string;
  settings?: Partial<{
    abusePolicy: "block" | "flag" | "quarantine";
    abusePolicyOverride: boolean;
    spamHeaderName: string;
    spamHeaderValue: string;
  }>;
  admins?: string[] | null;
  downstreamAddresses?: {
    priority: number;
    weight: number;
    port: number;
    target: string;
  }[] | null;
  aliases?: string[] | null;
  subscriptionHandle: string;
}
ts
interface DomainsProvisionOptions {
  associateKey?: boolean;
  overwrite?: boolean;
}
ts
type DomainsProvisionResponse = DataResponse<DomainsData>;

Bulk Provision type declarations

ts
type DomainsBulkProvisionOptions = DomainsProvisionOptions & Pick<DomainsData, "subscriptionHandle">;
ts
type DomainsBulkProvisionResponse = DataResponse<{
  successes: {
    domain: DomainsData;
    code: number;
    comment?: string;
  }[];
  errors: {
    domain: DomainsData;
    code: number;
    comment?: string;
  }[];
}>;

List type declarations

ts
interface DomainsListOptions {
  domains?: string[];
  limit?: number;
  offset?: number;
}
ts
type DomainsListResponse = DataResponse<{
  domains: DomainsData[];
  total: number;
}>;

List Entry type declarations

ts
type ListNames = "blocklist" | "safelist" | "blacklist" | "whitelist";
ts
interface ListEntryOptions {
  listName: ListNames;
  item: string;
}
ts
interface ListEntry {
  action: Extract<ListNames, "blocklist" | "safelist">;
  item: string;
  type: "domain" | "email_address" | "ip_address";
}
ts
type ListEntryResponse = DataResponse<ListEntry>;
ts
type ListEntriesResponse = DataResponse<ListEntry[]>;

Downstream Addresses type declarations

ts
interface DomainsDownstreamAddress {
  port: number;
  priority: number;
  target: string;
  weight: number;
}
ts
interface DomainsListDownstreamAddressesOptions {
  limit?: number;
  offset?: number;
}
ts
type DomainsListDownstreamAddressesResponse = DataResponse<DomainsDownstreamAddress[]>;

Create Login Link type declarations

ts
type DomainsCreateLoginLinkResponse = DataResponse<DomainsCreateLoginLink>;

Bulk Create Login Links type declarations

ts
interface DomainsBulkCreateLoginLinkResult {
  domain: string;
  code: 200 | 400 | 401 | 403 | 404 | 500;
  comment?: string;
  loginLink: string;
}
ts
interface DomainsBulkCreateLoginLinks {
  successes: DomainsBulkCreateLoginLinkResult[];
  errors: Omit<DomainsBulkCreateLoginLinkResult, "loginLink">[];
}
ts
type DomainsBulkCreateLoginLinksResponse = DataResponse<DomainsBulkCreateLoginLinks>;

Source

SourcePlaygroundDocs

Released under the MIT License.