Pattern
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
| Field | Type | Description |
|---|---|---|
aliasAddress | string | null | Target alias pattern when destinationType='alias', otherwise null |
createdAt | number | Creation timestamp in epoch seconds |
destinationType | ('mailbox' | 'webhook' | 'remote' | 'alias') | Destination type |
domain | string | Domain name this pattern applies to |
id | number | Pattern routing rule ID |
mailboxId | string | null | Target mailbox ULID when destinationType='mailbox', otherwise null |
paced | boolean | True if inbound delivery to this pattern is rate-paced |
pattern | string | Pattern wildcard match (e.g. support-*@example.com or *@example.com) |
priority | number | Evaluation priority (higher values evaluate first) |
remoteAddress | string | null | Target 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 |
webhookUrl | string | null | Target webhook URL when destinationType='webhook', otherwise null |
Used by
| Method | What it does |
|---|---|
patterns.create | Create pattern route |
patterns.list | List pattern routes |
patterns.update | Update pattern route |