Skip to Content

The Pattern type of the TypeScript SDK, which patterns.create and 2 more methods take or answer.

type Pattern = {
  aliasAddress: string | null
  createdAt: number
  destinationType: ('mailbox' | 'webhook' | 'remote' | 'alias')
  domain: string
  id: number
  mailboxId: string | null
  paced: boolean
  pattern: string
  priority: number
  remoteAddress: string | null
  webhookFormat: ('parsed' | 'reference')
  webhookUrl: string | null
}

Fields

FieldTypeDescription
aliasAddressstring | nullTarget alias pattern when destinationType='alias', otherwise null
createdAtnumberCreation timestamp in epoch seconds
destinationType('mailbox' | 'webhook' | 'remote' | 'alias')Destination type
domainstringDomain name this pattern applies to
idnumberPattern routing rule ID
mailboxIdstring | nullTarget mailbox ULID when destinationType='mailbox', otherwise null
pacedbooleanTrue if inbound delivery to this pattern is rate-paced
patternstringPattern wildcard match (e.g. support-*@example.com or *@example.com)
prioritynumberEvaluation priority (higher values evaluate first)
remoteAddressstring | nullTarget remote email address when destinationType='remote', otherwise null
webhookFormat('parsed' | 'reference')Payload format when destinationType='webhook': 'parsed' (the default — decoded bodies and inlined attachments) or 'reference' (headers plus rawUrl, no MIME walk). 'parsed' and inert on every other destination type
webhookUrlstring | nullTarget webhook URL when destinationType='webhook', otherwise null

Used by

MethodWhat it does
patterns.createCreate pattern route
patterns.listList pattern routes
patterns.updateUpdate pattern route

On this page