TypeScript SDK reference

Every method of @doorman/inbox-sdk, grouped as the API reference groups its operations, with its signature, what it does and the operation it sends.

On this page
  1. How to read it
  2. System
  3. Account
  4. Inboxes
  5. Domains
  6. API keys
  7. Mail
  8. Passport
  9. Security
  10. Healthcare
  11. Sending
  12. Webhooks
  13. Events
  14. Stream
  15. Apps
  16. Sign in with Doorman
  17. Beyond the operations

How to read it

This is every method of the DoormanInbox client in @doorman/inbox-sdk: 143 that each send one operation of the API, and 16 helpers built on them, such as the page iterators. The SDK is the guide; this is the list.

The signatures and the descriptions are read from the package's source when this documentation is built, so they are the ones the package has. A method that sends an operation names it and links to its entry in the API reference, where the fields, the answers and the errors are. The client has a method for all 84 operations of the public surface, and the package's tests hold it to that.

  • A method's name is the operation's id: inboxes.create is client.inboxes.create.
  • A path parameter is an argument, in the order the path has them. A request body is one object after them, and query parameters are one object of options.
  • A method resolves with the answer's JSON, typed as the contract's schema, or with nothing for an operation that answers without a body.
  • A method rejects with an ApiError for an answer of 400 or more. Nothing is retried for you.

System

Liveness and this document. No credential.

MethodWhat it does
client.healthHealth check
client.openapiThe OpenAPI document

Account

The account, its plan and usage, and account-wide counts.

MethodWhat it does
client.meWho am I
client.overviewOverview
client.metricsMetrics
client.billing.checkoutStart a checkout
client.billing.portalOpen the billing portal
client.billing.syncRead billing again
client.billing.seatsChange the organization's seats
client.push.getRead notification settings
client.push.subscriptions.createSwitch notifications on for a browser
client.push.subscriptions.deleteSwitch notifications off for a browser
client.members.listList the organization's members
client.members.updateChange a member's role
client.invitations.listList the organization's invitations
client.invitations.createInvite someone to the organization
client.invitations.updateRecord that an invitation was sent
client.invitations.revokeTake an invitation back
client.organization.adoptMove a personal account into the organization

Inboxes

Addresses on the inbox domain: issue, read, rename and delete them.

MethodWhat it does
client.inboxes.listList inboxes
client.inboxes.iterateEvery inbox of the account, page by page.
client.inboxes.findByExternalIdThe inbox tagged with this externalId, or null.
client.inboxes.createIssue an inbox
client.inboxes.getRead an inbox
client.inboxes.updateUpdate an inbox
client.inboxes.deleteDelete an inbox
client.inboxes.rules.listList inbound rules
client.inboxes.rules.createCreate an inbound rule
client.inboxes.rules.getRead an inbound rule
client.inboxes.rules.updateUpdate an inbound rule
client.inboxes.rules.deleteDelete an inbound rule
client.inboxes.rules.runsList rule executions
client.inboxes.rules.iterateRunsEvery run of a rule, newest first, page by page.

Domains

Account-owned mail domains, DNS records, verification and setup.

MethodWhat it does
client.domains.listList custom domains
client.domains.createAdd a custom domain
client.domains.getRead a custom domain
client.domains.verifyCheck the domain's DNS
client.domains.connectSessionStart automatic DNS setup
client.domains.deleteRemove a custom domain

API keys

Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API.

MethodWhat it does
client.inboxes.keys.createCreate an inbox key
client.inboxes.keys.listList an inbox's keys
client.inboxes.keys.getRead an inbox key
client.inboxes.keys.revokeRevoke an inbox key
client.apiKeys.listList account keys
client.apiKeys.createCreate an account key
client.apiKeys.getRead an account key
client.apiKeys.revokeRevoke an account key

Mail

Threads, messages, raw and HTML bodies, attachments and their extracted text.

MethodWhat it does
client.inboxes.threads.listList threads
client.inboxes.threads.listBySeenList threads a person has or has not seen
client.inboxes.threads.iterateEvery thread of the inbox, page by page.
client.inboxes.messages.listList messages
client.inboxes.messages.iterateEvery message of the inbox, page by page.
client.threads.getRead a thread
client.threads.updateUpdate a thread
client.threads.trashTrash a thread
client.threads.restoreRestore a trashed thread
client.threads.seenMark a thread seen
client.threads.messagesRead a thread's messages
client.messages.getRead a message
client.messages.rawDownload the original message
client.messages.htmlRead the HTML body
client.attachments.downloadDownload an attachment
client.attachments.textRead an attachment's text

Passport

The outside services an inbox's address is signed up for, the verification codes and sign-in links they send, and how the address signs in to the ones that accept Sign in with Doorman.

MethodWhat it does
client.inboxes.services.createDeclare or add a service
client.inboxes.verifications.listRead verification codes
client.inboxes.signIns.createStart a sign-in
client.passport.getRead passport settings
client.passport.updateUpdate passport settings
client.services.listList services
client.services.iterateEvery service of the passport, page by page.
client.services.getRead a service
client.services.updateUpdate a service
client.services.deleteDelete a service

Security

Risk assessment and sender trust: the policy that warns, holds and guards sending, the senders an inbox knows, held mail and the audit log.

MethodWhat it does
client.inboxes.security.getRead an inbox's security policy
client.inboxes.security.updateGive an inbox its own security policy
client.inboxes.security.resetReturn an inbox to the account's security policy
client.inboxes.senders.listList an inbox's senders
client.inboxes.senders.iterateEvery sender of the inbox, page by page.
client.inboxes.held.listList held messages
client.inboxes.held.iterateEvery held message stub of the inbox, page by page.
client.inboxes.heldSends.listList held sends
client.inboxes.heldSends.iterateEvery held send of the inbox in one state, page by page.
client.messages.releaseRelease a held message
client.messages.discardDiscard a held message
client.messages.feedbackMark a message safe or unsafe
client.security.getRead the security policy
client.security.updateChange the security policy
client.security.auditRead the security audit log
client.security.iterateAuditEvery entry of the security audit log, page by page.
client.security.previewPreview what a policy does to a message
client.senderRules.listList sender rules
client.senderRules.iterateEvery sender rule matching the filters, page by page.
client.senderRules.createTrust or block a sender
client.senderRules.deleteRemove a sender rule
client.heldSends.getRead a held send
client.heldSends.approveSend a held send
client.heldSends.discardDiscard a held send

Healthcare

The business associate agreement an eligible team signs, and the guardrails it unlocks: protected health information replaced in everything an agent or a system is given, held or refused on the way out, and custom guardrails. Every operation answers 404 until the deployment switches the capability on.

MethodWhat it does
client.inboxes.guardrails.getRead an inbox's guardrails
client.inboxes.guardrails.updateGive an inbox its own guardrails
client.inboxes.guardrails.resetReturn an inbox to the account's guardrails
client.messages.originalRead a message as it arrived
client.baa.getRead the agreement's standing
client.baa.documentRead the agreement
client.baa.signSign the agreement
client.baa.terminateEnd the agreement
client.guardrails.getRead the guardrails
client.guardrails.updateChange the guardrails
client.guardrails.previewPreview what the guardrails do to a text
client.guardrails.rules.listList custom guardrails
client.guardrails.rules.createWrite a custom guardrail
client.guardrails.rules.updateChange a custom guardrail
client.guardrails.rules.deleteRemove a custom guardrail

Sending

New messages and replies from an inbox, with idempotent retries.

MethodWhat it does
client.inboxes.sendSend a message or reply
client.inboxes.replyA reply in a thread: inboxes.send with threadId.
client.inboxes.drafts.createWrite a draft for the owner to send
client.drafts.deleteTake a draft back

Webhooks

The inbox webhook, account endpoints, their signed deliveries and the delivery log.

MethodWhat it does
client.inboxes.webhook.getRead the inbox webhook
client.inboxes.webhook.setSet the inbox webhook
client.inboxes.webhook.rotateSecretRotate the inbox webhook's secret
client.inboxes.webhook.deleteRemove the inbox webhook
client.inboxes.webhook.deliveriesList the inbox webhook's deliveries
client.inboxes.webhook.iterateDeliveriesEvery delivery of the inbox webhook's log, newest first, page by page.
client.webhooks.listList endpoints
client.webhooks.createCreate an endpoint
client.webhooks.getRead an endpoint
client.webhooks.updateChange an endpoint
client.webhooks.deleteDelete an endpoint
client.webhooks.rotateSecretRotate an endpoint's secret
client.webhooks.testSend a test delivery
client.webhooks.deliveriesList an endpoint's deliveries
client.webhooks.iterateDeliveriesEvery delivery of the endpoint's log, newest first, page by page.
client.deliveries.retryRetry a delivery

Events

The account's event log: page back through it, or poll it forward.

MethodWhat it does
client.events.listList or poll events
client.events.iterateEvery event of the log, newest first, page by page.
client.events.pollevents.list with after: the events with a larger seq, oldest first, and latestSeq to poll from next.
client.events.getRead an event

Stream

Events pushed over a WebSocket, with replay.

MethodWhat it does
client.streamOpen the event stream

Apps

Developer clients, installed apps and explicit session-bound consent.

MethodWhat it does
client.apps.listList developer apps
client.apps.createRegister an app
client.apps.getRead an app
client.apps.updateUpdate an app
client.apps.deleteDelete an app
client.apps.rotateSecretRotate a client secret
client.installs.listList installed apps
client.installs.revokeRevoke an installation
client.oauthRequests.getRead a consent request
client.oauthRequests.decideDecide a consent request

Sign in with Doorman

The relying parties a developer registers, the sign-ins that wait for the owner's decision, and what the web app does for a browser on the way. Every operation answers 404 until the deployment switches sign-in on.

MethodWhat it does
client.signIn.clients.listList relying parties
client.signIn.clients.createRegister a relying party
client.signIn.clients.getRead a relying party
client.signIn.clients.updateUpdate a relying party
client.signIn.clients.deleteDelete a relying party
client.signIn.clients.rotateSecretRotate a relying party's secret
client.signIn.clients.verifyVerify a relying party's host
client.signIn.requests.getRead a sign-in that waits for the owner
client.signIn.requests.decideDecide a sign-in
client.signIn.requests.resumeResume a sign-in
client.signIn.links.readRead a sign-in link
client.signIn.links.openOpen a sign-in link

Beyond the operations

  • Client and helpers: What @doorman/inbox-sdk exports besides the resources of the API: the client and its options, the parameters of lists and sends, pagination, errors, the stream, webhook verification, OAuth and the transport.

Up Down to move, Enter to open, Esc to close