Skip to content

Mailbox routes: rest, retire, warm

The Mailbox Verbs rest, retire, warm as api.sb routes, with inputs, result, refusals and an example.

Reference for Mailbox, one group of Mailbox routes.

Mailbox.rest

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

Text
POST /{namespace}/mailboxes/{mailbox}/rest

Path: mailbox. Body, as JSON: the other inputs. 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

Terminal
curl -X POST https://api.sb/leaseline.app/mailboxes/mailbox_93HvOnR17L/rest \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"complaints"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "mailbox": {
    "$id": "https://api.sb/leaseline.app/mailboxes/mailbox_93HvOnR17L",
    "$type": "Mailbox",
    "medium": "email",
    "address": "dana@leaseline.app",
    "stream": "transactional"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Mailbox.rest",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Mailbox.retire

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

Text
POST /{namespace}/mailboxes/{mailbox}/retire

Path: 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

Terminal
curl -X POST https://api.sb/leaseline.app/mailboxes/mailbox_93HvOnR17L/retire \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "mailbox": {
    "$id": "https://api.sb/leaseline.app/mailboxes/mailbox_93HvOnR17L",
    "$type": "Mailbox",
    "medium": "email",
    "address": "dana@leaseline.app",
    "stream": "transactional"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Mailbox.retire",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Mailbox.warm

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

Text
POST /{namespace}/mailboxes/{mailbox}/warm

Path: mailbox. Body, as JSON: the other inputs. 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

Terminal
curl -X POST https://api.sb/leaseline.app/mailboxes/mailbox_93HvOnR17L/warm \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cap":1}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "mailbox": {
    "$id": "https://api.sb/leaseline.app/mailboxes/mailbox_93HvOnR17L",
    "$type": "Mailbox",
    "medium": "email",
    "address": "dana@leaseline.app",
    "stream": "transactional"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Mailbox.warm",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}