Sending

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

Send a message or reply

POST/v1/inboxes/{inboxId}/send

Access any: any API key, or a console session.

Sends from the inbox's address. to, cc and bcc take a comma-separated string or an array. A reply passes threadId: the subject defaults to Re: <thread subject>, In-Reply-To and References are set from the thread, the previous message is quoted under the text unless includeQuote is false, to defaults to the last inbound message's Reply-To or sender, and the thread is marked read. Limits per inbox: 10 sends per minute and 200 per day (429 with Retry-After; refused sends are not counted), 50 recipients, 32 attachments, 25 MiB per message. On the free plan the account's monthly cap applies on top (402). Outbound messages are stored without a raw copy. multipart/form-data is accepted with the same field names and repeated attachments file fields. The security policy guards sends from keys and app tokens, never from a console session: a reply into a thread that holds a flagged message from a sender that is not trusted, or a recipient the inbox does not know when the policy asks for known recipients, answers 403 risk_blocked with guard. Mail an inbox rule generates is not guarded; it is never sent for a flagged message. Where the policy asks (sendApproval), a message to a recipient the inbox does not know answers 202 with a held send: it waits for the owner and must not be sent again (at most 50 wait, then 409). A failed file or link check answers 403 risk_blocked; retry a 503 scan_unavailable.

OAuth: allowed with all of mail:send, mail:read. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.send in TypeScript, client.inboxes.send in Python, the inboxes_send tool and doorman inboxes send on the command line.

Organizations: a member's console session needs mail:send and mail:read. API keys and app tokens are not held to member permissions. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • Idempotency-Keystring, in headeroptional

    1 to 255 printable ASCII characters. For 24 hours the same key with the same request replays the original answer with Idempotent-Replayed: true; the same key with a different request is refused with 422 idempotency_key_reused; a key whose first attempt is still running answers 409 idempotency_in_progress; a failed send releases the key. Example: order-2847-reply.

Request body (application/json): SendMessage

A message to send from an inbox: a new one with to and subject, or a reply with threadId.

  • tostring | string[]optional

    Recipients. Optional on a reply, where it defaults to the last inbound message's Reply-To or sender.

  • ccstring | string[]optional

  • bccstring | string[]optional

  • replyTostringoptional

    The address replies should go to instead of the inbox.

  • subjectstringoptional

    Required on a new message. A reply defaults to Re: <thread subject>.

  • textstringoptional

    The plain-text body.

  • htmlstringoptional

    The HTML body. Text is derived from it when text is absent.

  • bodystringoptional

    A convenience: treated as HTML when it looks like HTML, as text otherwise. Ignored when text or html is given.

  • threadIdstringoptional

    A thread id (thr_...). Makes the message a reply in this thread: threading headers, the default subject and recipient, and the quoted previous message come from it. An unknown, foreign or trashed thread answers 404 thread_not_found. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • includeQuotebooleanoptional

    On a reply, quote the previous message under the text. Defaults to true.

  • attachmentsSendAttachment[]optional

Request body (multipart/form-data): SendMessageForm

The same send as multipart/form-data: the text fields by name, repeated attachments file fields, includeQuote as text (false, 0 or no turn the quote off).

  • tostringoptional

  • ccstringoptional

  • bccstringoptional

  • replyTostringoptional

  • subjectstringoptional

  • textstringoptional

  • htmlstringoptional

  • bodystringoptional

  • threadIdstringoptional

  • includeQuotestringoptional

  • attachmentsbinary[]optional

Answers 201: The stored outbound message.

Response 201: SendOutcome

One of:

SentMessage

The stored outbound message, with the identifier the sending provider assigned.

  • idstringrequired

    A message identifier. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • threadIdstringrequired

    A thread identifier. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • direction"inbound" | "outbound"required

  • rfcMessageIdstring | nullrequired

    The Message-ID header of inbound mail; null for mail this API sent. Example: <a1b2c3@example.com>

  • inReplyTostring | nullrequired

    The In-Reply-To header, when the message is a reply.

  • referencesstring[]required

    The References chain, oldest first.

  • fromNamedAddressrequired

  • toNamedAddress[]required

  • ccNamedAddress[]required

  • bccNamedAddress[]required

    Only outbound mail carries blind copies.

  • replyTostring | nullrequired

    The Reply-To address, when one was given.

  • deliveryRole"to" | "cc" | "bcc" | nullrequired

    How the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.

  • subjectstringrequired

    Example: Invoice 2847

  • textstring | nullrequired

    The plain-text body, or text derived from the HTML when there was none.

  • hasHtmlbooleanrequired

    Whether an HTML body is stored; read it at /v1/messages/{messageId}/html.

  • rawUrlstring | nullrequired

    Where to download the original message/rfc822; null for outbound mail.

  • sizeBytesintegerrequired

  • category"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"required

    What kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.

  • autoReplyablebooleanrequired

    False for anything an agent should not answer on its own.

  • verdict"clean" | "unverified" | "suspicious" | nullrequired

    From the authentication results; null for outbound mail.

  • spamScorenumber | nullrequired

    How likely the message is junk, from 0 to 1, when it was assessed; null otherwise.

  • authenticationAuthenticationResults | nullrequired

  • serviceMessageService | nulloptional

    The outside service the message came from, for the inbox's passport; null for any other mail and for outbound mail. Older deployments omit it.

  • riskRiskAssessment | nulloptional

    Doorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.

  • redactionRedactionoptional

    What the account's healthcare guardrails found in the message (ADR-027), and whether subject, text and the attachments' parsedText carry placeholders in place of it. Absent where no guardrail applies.

  • occurredAtstring (date-time)required

    When the message arrived or was sent. Example: 2026-11-05T10:05:00.000Z

  • attachmentsAttachment[]required

  • providerMessageIdstring | nullrequired

    The provider's message identifier, used to thread replies to this message. Example: <b2c3d4@doorman.example>

HeldSend

A message that waits for the owner: one that was asked to be sent and that the security policy kept, or a draft written for the owner to send. Every caller that can read the inbox gets who it is to and where it stands; the subject and the text are added for a caller that may decide (a console session, or an account key the account allows).

  • idstringrequired

    A held send's identifier. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • kind"held" | "draft"required

    Why it waits. held: the security policy kept a send for the owner. draft: an app or a key wrote it as a draft, and only the owner sends it.

  • status"held" | "sent" | "discarded" | "expired"required

    held while it waits. sent once the owner approved it and the mail went out. discarded when the owner said no. expired when nobody decided in time. Only a held send can be decided.

  • threadIdstring | nullrequired

    The thread a reply was written into; null for a new message.

  • tostring[]required

    Who it would go to: the recipients the request named, or on a reply that named none, the one the thread gives. Example: ["sam@example.com"]

  • ccstring[]required

  • bccstring[]required

  • unknownRecipientsstring[]required

    The recipients that made it wait: addresses the inbox neither knows nor trusts. Empty for a draft. Example: ["sam@example.com"]

  • subjectstring | nullrequired

    The subject as written, for a caller that may decide; null for every other caller, and on a reply that left it to the thread.

  • textstring | nullrequired

    The text as written (derived from the HTML when only HTML was given, and cut at 200,000 characters), for a caller that may decide; null for every other caller.

  • attachmentsintegerrequired

    How many attachments it carries.

  • requestedByobjectrequired

  • kind"app" | "key"required

    A connected app, or an API key.

  • namestring | nullrequired

    The app's or the key's name, when it has one. Example: Support agent

  • messageIdstring | nullrequired

    The message it became once it was sent; null otherwise.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • expiresAtstring (date-time)required

    When it expires unsent: 7 days after it was made, or 30 for a draft. Example: 2026-11-05T10:05:00.000Z

  • decidedAtstring (date-time) | nullrequired

    When it was sent, discarded or expired; null while it waits.

Response header Idempotent-Replayed: true when the answer was replayed for an Idempotency-Key seen before.

Answers 202: The message waits for the owner: a held send. Nothing was sent.

Response 202: SendOutcome

One of:

SentMessage

The stored outbound message, with the identifier the sending provider assigned.

  • idstringrequired

    A message identifier. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • threadIdstringrequired

    A thread identifier. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • direction"inbound" | "outbound"required

  • rfcMessageIdstring | nullrequired

    The Message-ID header of inbound mail; null for mail this API sent. Example: <a1b2c3@example.com>

  • inReplyTostring | nullrequired

    The In-Reply-To header, when the message is a reply.

  • referencesstring[]required

    The References chain, oldest first.

  • fromNamedAddressrequired

  • toNamedAddress[]required

  • ccNamedAddress[]required

  • bccNamedAddress[]required

    Only outbound mail carries blind copies.

  • replyTostring | nullrequired

    The Reply-To address, when one was given.

  • deliveryRole"to" | "cc" | "bcc" | nullrequired

    How the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.

  • subjectstringrequired

    Example: Invoice 2847

  • textstring | nullrequired

    The plain-text body, or text derived from the HTML when there was none.

  • hasHtmlbooleanrequired

    Whether an HTML body is stored; read it at /v1/messages/{messageId}/html.

  • rawUrlstring | nullrequired

    Where to download the original message/rfc822; null for outbound mail.

  • sizeBytesintegerrequired

  • category"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"required

    What kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.

  • autoReplyablebooleanrequired

    False for anything an agent should not answer on its own.

  • verdict"clean" | "unverified" | "suspicious" | nullrequired

    From the authentication results; null for outbound mail.

  • spamScorenumber | nullrequired

    How likely the message is junk, from 0 to 1, when it was assessed; null otherwise.

  • authenticationAuthenticationResults | nullrequired

  • serviceMessageService | nulloptional

    The outside service the message came from, for the inbox's passport; null for any other mail and for outbound mail. Older deployments omit it.

  • riskRiskAssessment | nulloptional

    Doorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.

  • redactionRedactionoptional

    What the account's healthcare guardrails found in the message (ADR-027), and whether subject, text and the attachments' parsedText carry placeholders in place of it. Absent where no guardrail applies.

  • occurredAtstring (date-time)required

    When the message arrived or was sent. Example: 2026-11-05T10:05:00.000Z

  • attachmentsAttachment[]required

  • providerMessageIdstring | nullrequired

    The provider's message identifier, used to thread replies to this message. Example: <b2c3d4@doorman.example>

HeldSend

A message that waits for the owner: one that was asked to be sent and that the security policy kept, or a draft written for the owner to send. Every caller that can read the inbox gets who it is to and where it stands; the subject and the text are added for a caller that may decide (a console session, or an account key the account allows).

  • idstringrequired

    A held send's identifier. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • kind"held" | "draft"required

    Why it waits. held: the security policy kept a send for the owner. draft: an app or a key wrote it as a draft, and only the owner sends it.

  • status"held" | "sent" | "discarded" | "expired"required

    held while it waits. sent once the owner approved it and the mail went out. discarded when the owner said no. expired when nobody decided in time. Only a held send can be decided.

  • threadIdstring | nullrequired

    The thread a reply was written into; null for a new message.

  • tostring[]required

    Who it would go to: the recipients the request named, or on a reply that named none, the one the thread gives. Example: ["sam@example.com"]

  • ccstring[]required

  • bccstring[]required

  • unknownRecipientsstring[]required

    The recipients that made it wait: addresses the inbox neither knows nor trusts. Empty for a draft. Example: ["sam@example.com"]

  • subjectstring | nullrequired

    The subject as written, for a caller that may decide; null for every other caller, and on a reply that left it to the thread.

  • textstring | nullrequired

    The text as written (derived from the HTML when only HTML was given, and cut at 200,000 characters), for a caller that may decide; null for every other caller.

  • attachmentsintegerrequired

    How many attachments it carries.

  • requestedByobjectrequired

  • kind"app" | "key"required

    A connected app, or an API key.

  • namestring | nullrequired

    The app's or the key's name, when it has one. Example: Support agent

  • messageIdstring | nullrequired

    The message it became once it was sent; null otherwise.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • expiresAtstring (date-time)required

    When it expires unsent: 7 days after it was made, or 30 for a draft. Example: 2026-11-05T10:05:00.000Z

  • decidedAtstring (date-time) | nullrequired

    When it was sent, discarded or expired; null while it waits.

Response header Idempotent-Replayed: true when the answer was replayed for an Idempotency-Key seen before.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
400invalid_formThe multipart body could not be parsed.
400recipient_suppressedA recipient previously bounced or complained and is suppressed.
400send_rejectedThe sending provider rejected the message; providerCode carries its reason.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
402plan_limit_reachedThe plan's allowance is used up; scope says whether it is the inbox count, the monthly sends or the custom domains. Upgrade rather than wait.
403inbox_suspendedThe inbox cannot send, or start a sign-in, at the moment.
403recipient_not_permittedA recipient is not permitted for this deployment.
403risk_blockedThe send or the download was refused; guard says why: reply when the thread holds a flagged message whose sender is not trusted, recipient when a recipient is not one the inbox knows, content when an attachment did not pass the check of its bytes (reasons lists what was found), guardrail when a healthcare guardrail found what may not be sent (entities lists the kinds). For reply and recipient a person can send from the console, mark the message safe or trust the sender. For content, a program or a file dressed as another kind is refused for every caller; a locked or damaged file, a script, or a document with macros, is refused for keys and app tokens only. A link that delivered harmful software when it was opened in isolation is refused for every caller.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
404thread_not_foundThe thread does not exist, belongs to another inbox or was trashed.
409idempotency_in_progressA request with this Idempotency-Key is still being processed.
409domain_not_verifiedThe custom domain has not verified its required DNS records.
409limit_reachedThe abuse ceiling for inboxes, custom domains, keys, endpoints, services, relying parties, the services an address signs in to, the sends an inbox has waiting for its owner or the invitations an organization has open; delete, revoke or decide one first.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
413message_too_largeThe message exceeds the size limit, including attachments.
422idempotency_key_reusedThis Idempotency-Key was already used for a different request.
429rate_limit_exceededA per-inbox or per-account rate limit; Retry-After and resetsAt say when to try again.
429provider_rate_limitedThe sending provider is rate limiting this deployment.
500internal_errorSomething went wrong on the server.
502send_failedThe sending provider did not accept or could not deliver the message; providerCode carries its reason.
503sending_pausedSending is paused for this deployment pending review.
503sending_unavailableThe inbox domain is not onboarded for sending, or sending is not configured.
503scan_unavailableThe malware engine did not answer in time, so an attachment could not be checked and nothing was sent. Try again after Retry-After; an Idempotency-Key makes the retry safe.

Example 201 response

{
  "id": "msg_01jc5b7h8j9k0m1n2p3q4r5s6t",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
  "direction": "outbound",
  "rfcMessageId": null,
  "inReplyTo": "<a1b2c3@example.com>",
  "references": [
    "<a1b2c3@example.com>"
  ],
  "from": {
    "address": "concierge@doorman.example",
    "name": "Acme concierge"
  },
  "to": [
    {
      "address": "sam@example.com",
      "name": null
    }
  ],
  "cc": [],
  "bcc": [],
  "replyTo": null,
  "deliveryRole": null,
  "subject": "Re: Invoice 2847",
  "text": "Thanks, confirming for Thursday.",
  "hasHtml": false,
  "rawUrl": null,
  "sizeBytes": 31,
  "category": "personal",
  "autoReplyable": false,
  "verdict": null,
  "spamScore": null,
  "authentication": null,
  "occurredAt": "2026-11-05T10:05:00.000Z",
  "attachments": [],
  "providerMessageId": "<b2c3d4@doorman.example>"
}

Example 202 response

{
  "id": "msg_01jc5b7h8j9k0m1n2p3q4r5s6t",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
  "direction": "outbound",
  "rfcMessageId": null,
  "inReplyTo": "<a1b2c3@example.com>",
  "references": [
    "<a1b2c3@example.com>"
  ],
  "from": {
    "address": "concierge@doorman.example",
    "name": "Acme concierge"
  },
  "to": [
    {
      "address": "sam@example.com",
      "name": null
    }
  ],
  "cc": [],
  "bcc": [],
  "replyTo": null,
  "deliveryRole": null,
  "subject": "Re: Invoice 2847",
  "text": "Thanks, confirming for Thursday.",
  "hasHtml": false,
  "rawUrl": null,
  "sizeBytes": 31,
  "category": "personal",
  "autoReplyable": false,
  "verdict": null,
  "spamScore": null,
  "authentication": null,
  "occurredAt": "2026-11-05T10:05:00.000Z",
  "attachments": [],
  "providerMessageId": "<b2c3d4@doorman.example>"
}
curl -s -X POST "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/send" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "idempotency-key: order-2847-reply" \
  -H "content-type: application/json" \
  -d '{
    "to": "sam@example.com",
    "subject": "Thursday",
    "text": "Thursday works."
  }'

Write a draft for the owner to send

POST/v1/inboxes/{inboxId}/drafts

Access key: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused.

Writes a message and leaves it for the owner: nothing is sent, and only the owner sends it, from the console or with heldSends.approve. The body is the one a send takes, and it is checked as a send would be (recipients, size, thread) so the owner is not handed something that cannot go out. The answer is a held send with kind draft; send.held fires, and message.sent follows if the owner sends it. An inbox has at most 100 drafts waiting, and one nobody sends expires after 30 days. A draft cannot be changed: take it back with drafts.delete and write it again.

OAuth: allowed with all of mail:draft, mail:read. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.drafts.create in TypeScript, client.inboxes.drafts.create in Python, the inboxes_drafts_create tool and doorman inboxes drafts create on the command line.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Request body (application/json): SendMessage

A message to send from an inbox: a new one with to and subject, or a reply with threadId.

  • tostring | string[]optional

    Recipients. Optional on a reply, where it defaults to the last inbound message's Reply-To or sender.

  • ccstring | string[]optional

  • bccstring | string[]optional

  • replyTostringoptional

    The address replies should go to instead of the inbox.

  • subjectstringoptional

    Required on a new message. A reply defaults to Re: <thread subject>.

  • textstringoptional

    The plain-text body.

  • htmlstringoptional

    The HTML body. Text is derived from it when text is absent.

  • bodystringoptional

    A convenience: treated as HTML when it looks like HTML, as text otherwise. Ignored when text or html is given.

  • threadIdstringoptional

    A thread id (thr_...). Makes the message a reply in this thread: threading headers, the default subject and recipient, and the quoted previous message come from it. An unknown, foreign or trashed thread answers 404 thread_not_found. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • includeQuotebooleanoptional

    On a reply, quote the previous message under the text. Defaults to true.

  • attachmentsSendAttachment[]optional

Request body (multipart/form-data): SendMessageForm

The same send as multipart/form-data: the text fields by name, repeated attachments file fields, includeQuote as text (false, 0 or no turn the quote off).

  • tostringoptional

  • ccstringoptional

  • bccstringoptional

  • replyTostringoptional

  • subjectstringoptional

  • textstringoptional

  • htmlstringoptional

  • bodystringoptional

  • threadIdstringoptional

  • includeQuotestringoptional

  • attachmentsbinary[]optional

Answers 201: The draft, waiting for the owner.

Response 201: HeldSend

A message that waits for the owner: one that was asked to be sent and that the security policy kept, or a draft written for the owner to send. Every caller that can read the inbox gets who it is to and where it stands; the subject and the text are added for a caller that may decide (a console session, or an account key the account allows).

  • idstringrequired

    A held send's identifier. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • kind"held" | "draft"required

    Why it waits. held: the security policy kept a send for the owner. draft: an app or a key wrote it as a draft, and only the owner sends it.

  • status"held" | "sent" | "discarded" | "expired"required

    held while it waits. sent once the owner approved it and the mail went out. discarded when the owner said no. expired when nobody decided in time. Only a held send can be decided.

  • threadIdstring | nullrequired

    The thread a reply was written into; null for a new message.

  • tostring[]required

    Who it would go to: the recipients the request named, or on a reply that named none, the one the thread gives. Example: ["sam@example.com"]

  • ccstring[]required

  • bccstring[]required

  • unknownRecipientsstring[]required

    The recipients that made it wait: addresses the inbox neither knows nor trusts. Empty for a draft. Example: ["sam@example.com"]

  • subjectstring | nullrequired

    The subject as written, for a caller that may decide; null for every other caller, and on a reply that left it to the thread.

  • textstring | nullrequired

    The text as written (derived from the HTML when only HTML was given, and cut at 200,000 characters), for a caller that may decide; null for every other caller.

  • attachmentsintegerrequired

    How many attachments it carries.

  • requestedByobjectrequired

  • kind"app" | "key"required

    A connected app, or an API key.

  • namestring | nullrequired

    The app's or the key's name, when it has one. Example: Support agent

  • messageIdstring | nullrequired

    The message it became once it was sent; null otherwise.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • expiresAtstring (date-time)required

    When it expires unsent: 7 days after it was made, or 30 for a draft. Example: 2026-11-05T10:05:00.000Z

  • decidedAtstring (date-time) | nullrequired

    When it was sent, discarded or expired; null while it waits.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
400invalid_formThe multipart body could not be parsed.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403inbox_suspendedThe inbox cannot send, or start a sign-in, at the moment.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
404not_foundNo such resource for this caller, or no such route.
404thread_not_foundThe thread does not exist, belongs to another inbox or was trashed.
409limit_reachedThe abuse ceiling for inboxes, custom domains, keys, endpoints, services, relying parties, the services an address signs in to, the sends an inbox has waiting for its owner or the invitations an organization has open; delete, revoke or decide one first.
413message_too_largeThe message exceeds the size limit, including attachments.
500internal_errorSomething went wrong on the server.

Example 201 response

{
  "id": "hsd_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "kind": "held",
  "status": "held",
  "threadId": null,
  "to": [
    "sam@example.com"
  ],
  "cc": [],
  "bcc": [],
  "unknownRecipients": [
    "sam@example.com"
  ],
  "subject": null,
  "text": null,
  "attachments": 0,
  "requestedBy": {
    "kind": "app",
    "name": "Support agent"
  },
  "messageId": null,
  "createdAt": "2026-11-05T10:05:00.000Z",
  "expiresAt": "2026-11-12T10:05:00.000Z",
  "decidedAt": null
}
curl -s -X POST "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/drafts" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "to": "sam@example.com",
    "subject": "Thursday",
    "text": "Thursday works."
  }'

Take a draft back

DELETE/v1/drafts/{heldSendId}

Access key: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused.

Removes a draft that still waits, with what it carried; send.discarded fires. For the app or the key that wrote it, or a caller that may decide. A send the security policy kept is not a draft and answers 404 here: the owner ends that one.

OAuth: allowed with all of mail:draft. App permissions apply in addition to account and resource checks.

Also available as client.drafts.delete in TypeScript, client.drafts.delete in Python, the drafts_delete tool and doorman drafts delete on the command line.

Parameters
  • heldSendIdstring, in pathrequired

    The held send. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 204: Removed.

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
404not_foundNo such resource for this caller, or no such route.
500internal_errorSomething went wrong on the server.
curl -s -X DELETE "https://api.doorman.fyi/v1/drafts/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

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