Skip to content

Mailbox methods: rest, retire, warm

The Mailbox Verbs rest, retire, warm as typed SDK methods, with inputs, result, refusals and an example.

Reference for Mailbox, one group of Mailbox methods.

Mailbox.rest

Rest pauses a Mailbox’s sending when a brake fires and resumes it when the reading clears. Verb page.

TypeScript
interface MailboxVerbs {
  rest(input: MailboxRestInput, options?: SB.CallOptions): SB.Call<Mailbox>
}

Emits Mailbox.rested.

Inputs

InputTypeRequiredDescription
mailboxMailboxrequiredThe Mailbox to pause.
reasonstringrequiredThe brake that fired.

Returns

OutputTypeRequiredDescription
mailboxMailboxrequiredThe Mailbox, resting.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const mailbox = await $.Mailbox.rest({ mailbox: 'mailbox_93HvOnR17L', reason: 'complaints' })

Mailbox.retire

Retire stops a Mailbox for good and keeps its address, Messages and sending history. Verb page.

TypeScript
interface MailboxVerbs {
  retire(input: MailboxRetireInput, options?: SB.CallOptions): SB.Call<Mailbox>
}

Emits Mailbox.retired.

Inputs

InputTypeRequiredDescription
mailboxMailboxrequiredThe Mailbox to retire.

Returns

OutputTypeRequiredDescription
mailboxMailboxrequiredThe retired Mailbox.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const mailbox = await $.Mailbox.retire({ mailbox: 'mailbox_93HvOnR17L' })

Mailbox.warm

Warm ramps a new Mailbox from a few sends a day to its cap over two to four weeks. Verb page.

TypeScript
interface MailboxVerbs {
  warm(input: MailboxWarmInput, options?: SB.CallOptions): SB.Call<Mailbox>
}

Emits Mailbox.warmed.

Inputs

InputTypeRequiredDescription
mailboxMailboxrequiredThe new Mailbox.
capintegerrequiredThe daily sends it ramps to.

Returns

OutputTypeRequiredDescription
mailboxMailboxrequiredThe Mailbox, warming.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const mailbox = await $.Mailbox.warm({ mailbox: 'mailbox_93HvOnR17L', cap: 1 })