Prepare a message and leave it for a person to review and send.
Sending and scheduling both commit: something leaves, now or later. A draft is
the third thing, and the only one that puts a person back in the loop —
compose a reply, leave it in the Drafts folder, let somebody read it and press
send.Required permission: Drafts → Read to list, Drafts → Write to create, edit
or delete.
Drafts written here appear in the dashboard. That is the point: a draft
nobody can see is just a string in a database. Whoever opens the web app finds
it in Drafts, opens it in the composer, edits it and sends it like any other.
These are organization drafts. A key never sees anybody’s personal drafts.Drafts written by a person in the web app belong to that person and are
invisible to every API key. Half-written mail is often the most sensitive thing
in an account, and a key leaked from a CI job should not expose what somebody
has not decided to send yet.The reverse is not symmetrical on purpose: drafts a key creates are visible
to your team in the dashboard, because a draft nobody can reach cannot be
reviewed.
201 Created, returning the draft including its id.
Every field is optional, including the recipients. A draft is unfinished by
definition — that is what makes it a draft. Refusing to save one because the
address is half-typed is how a drafts feature loses somebody’s work.Validation happens when the message is sent, not while it is being written.
This replaces the whole draft; it does not merge. A field you leave out is
cleared, not kept.A merging PATCH would need some way to say “clear the subject”, and the obvious
encoding — omit the field — is already how you say “leave it alone”. Send the
draft as you want it to be.
There is no “send this draft” call. Read it, then
POST /v1/messages with its contents and a from, and delete
the draft once the send succeeds.That is deliberate rather than missing. A draft has no sender — from is
chosen when the message goes, and a send endpoint that inherited it from a
draft would be a second, quieter way to decide which address your mail leaves
under.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Ruber","description":"Hosted email infrastructure for domains you own.","colors":{"primary":"#8a3d73","light":"#c97fb8","dark":"#632b52"},"logo":{"light":"https://mintcdn.com/ruber/CbxnSwTSSlNE8CGe/logo/light.svg?fit=max\u0026auto=format\u0026n=CbxnSwTSSlNE8CGe\u0026q=85\u0026s=902b9a9c9cdc7233b2be323b9679c3bf","dark":"https://mintcdn.com/ruber/CbxnSwTSSlNE8CGe/logo/dark.svg?fit=max\u0026auto=format\u0026n=CbxnSwTSSlNE8CGe\u0026q=85\u0026s=8d315681bba84b2740d4da62c16b4c0f","href":"https://ruber.me"},"favicon":"https://mintcdn.com/ruber/CbxnSwTSSlNE8CGe/favicon.svg?fit=max\u0026auto=format\u0026n=CbxnSwTSSlNE8CGe\u0026q=85\u0026s=7644ce157f3165c3f48abbb96bb59075","appearance":{"default":"light"},"navbar":{"links":[{"href":"https://ruber.me/support","label":"Support"},{"href":"https://status.ruber.me","label":"Status"}],"primary":{"type":"button","label":"Get started","href":"https://app.ruber.me/signup"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ruber","hasAudioNarration":false,"actualSubdomain":"ruber","customDomains":["docs.ruber.me"],"gitSource":{"type":"github","owner":"endibuka","repo":"mail-box","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad4fa97fbb786b35ab37f21","collectionId":"5ad3b9c5-d11b-4e49-aeed-65201debc958","liveDeploymentHistoryId":"6ad4fa97fbb786b35ab37f21","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad4fa97fbb786b35ab37f21","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"API","count":19},{"language":"default","tag":"Using Ruber","count":5},{"language":"default","tag":"Start here","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api/drafts","slug":"/api/drafts","pageMetadata":{"title":"Drafts","description":"Prepare a message and leave it for a person to review and send.","href":"/api/drafts"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Prepare a message and leave it for a person to review and send.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Sending and scheduling both commit: something leaves, now or later. A draft is\nthe third thing, and the only one that puts a person back in the loop —\ncompose a reply, leave it in the Drafts folder, let somebody read it and press\nsend.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Required permission:`}),` Drafts → Read to list, Drafts → Write to create, edit\nor delete.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Drafts written here appear in the dashboard.`}),` That is the point: a draft\nnobody can see is just a string in a database. Whoever opens the web app finds\nit in Drafts, opens it in the composer, edits it and sends it like any other.`]})}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`These are organization drafts. A key never sees anybody’s personal drafts.`})}),_jsx(_components.p,{children:`Drafts written by a person in the web app belong to that person and are\ninvisible to every API key. Half-written mail is often the most sensitive thing\nin an account, and a key leaked from a CI job should not expose what somebody\nhas not decided to send yet.`}),_jsxs(_components.p,{children:[`The reverse is not symmetrical on purpose: drafts a key creates `,_jsx(_components.strong,{children:`are`}),` visible\nto your team in the dashboard, because a draft nobody can reach cannot be\nreviewed.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`list-drafts`,children:`List drafts`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GET https://app.ruber.me/api/v1/drafts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Takes no parameters — drafts belong to the organization, not to a mailbox.\nNewest first, up to 200.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"61b76e1d-bd4b-4729-aae9-b3fdc8af1caa\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subject\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Re: Invoice 42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"billing@supplier.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"bcc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"attachment_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-07T22:20:05.446Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-07T22:20:18.411Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`No bodies in the list — fetch one for its text.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-draft`,children:`Create a draft`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://app.ruber.me/api/v1/drafts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://app.ruber.me/api/v1/drafts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer rk_your_key_here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"to\": [\"billing@supplier.com\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"subject\": \"Re: Invoice 42\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\": \"Thanks — paid this morning.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"html\": \"\u003cp>Thanks — paid this morning.\u003c/p>\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`to`}),`, `,_jsx(_components.code,{children:`cc`}),`, `,_jsx(_components.code,{children:`bcc`})]}),_jsx(_components.td,{children:`array or string`}),_jsxs(_components.td,{children:[`Up to 25 each. `,_jsx(_components.strong,{children:`All optional.`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subject`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Up to 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Plain-text body, up to 100,000 characters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`html`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`HTML body, up to 400,000 characters.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`201 Created`}),`, returning the draft including its `,_jsx(_components.code,{children:`id`}),`.`]}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Every field is optional, including the recipients.`}),` A draft is unfinished by\ndefinition — that is what makes it a draft. Refusing to save one because the\naddress is half-typed is how a drafts feature loses somebody’s work.`]}),_jsxs(_components.p,{children:[`Validation happens when the message is `,_jsx(_components.em,{children:`sent`}),`, not while it is being written.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`read-one`,children:`Read one`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GET https://app.ruber.me/api/v1/drafts/{id}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The same fields as the list, plus `,_jsx(_components.code,{children:`text`}),` and `,_jsx(_components.code,{children:`html`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`replace-one`,children:`Replace one`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`PATCH https://app.ruber.me/api/v1/drafts/{id}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Takes the same body as create.`}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This replaces the whole draft; it does not merge.`}),` A field you leave out is\ncleared, not kept.`]}),_jsx(_components.p,{children:`A merging PATCH would need some way to say “clear the subject”, and the obvious\nencoding — omit the field — is already how you say “leave it alone”. Send the\ndraft as you want it to be.`})]}),`\n`,_jsx(Heading,{level:`2`,id:`delete-one`,children:`Delete one`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`DELETE https://app.ruber.me/api/v1/drafts/{id}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"deleted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"61b76e1d-bd4b-4729-aae9-b3fdc8af1caa\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Gone, along with its stored body. There is no Trash for drafts.`}),`\n`,_jsx(Heading,{level:`2`,id:`sending-a-draft`,children:`Sending a draft`}),`\n`,_jsxs(_components.p,{children:[`There is no “send this draft” call. Read it, then\n`,_jsx(_components.a,{href:`/api/sending`,children:_jsx(_components.code,{children:`POST /v1/messages`})}),` with its contents and a `,_jsx(_components.code,{children:`from`}),`, and delete\nthe draft once the send succeeds.`]}),`\n`,_jsxs(_components.p,{children:[`That is deliberate rather than missing. A draft has no sender — `,_jsx(_components.code,{children:`from`}),` is\nchosen when the message goes, and a send endpoint that inherited it from a\ndraft would be a second, quieter way to decide which address your mail leaves\nunder.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_request`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:`Malformed JSON, a bad address, or a field over its limit.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unauthorized`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Missing, malformed, unknown or revoked key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`forbidden`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsxs(_components.td,{children:[`The key lacks `,_jsx(_components.code,{children:`drafts:read`}),` or `,_jsx(_components.code,{children:`drafts:write`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`not_found`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:`No organization draft with that id. A personal draft answers the same way.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rate_limited`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:`Over 600 requests in a minute.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`internal_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:`Storage was unreachable. Nothing was saved.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/api/introduction#errors`,children:`Errors`}),` for the full response shape.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Drafts","description":"Prepare a message and leave it for a person to review and send.","href":"/api/drafts"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"List drafts","slug":"list-drafts","depth":2,"children":[]},{"title":"Create a draft","slug":"create-a-draft","depth":2,"children":[]},{"title":"Read one","slug":"read-one","depth":2,"children":[]},{"title":"Replace one","slug":"replace-one","depth":2,"children":[]},{"title":"Delete one","slug":"delete-one","depth":2,"children":[]},{"title":"Sending a draft","slug":"sending-a-draft","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ruber","siteName":"Ruber","title":"Drafts - Ruber","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-08T13:59:19.985Z","originalFileLocation":"api/drafts.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Prepare a message and leave it for a person to review and send.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Ruber\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Drafts - Ruber\">\u003cmeta data-mint-head property=\"og:description\" content=\"Prepare a message and leave it for a person to review and send.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Ruber\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ruber.me/api/drafts\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ruber.mintlify.app/_mintlify/api/og/v2?division=API\u0026amp;title=Drafts\u0026amp;description=Prepare+a+message+and+leave+it+for+a+person+to+review+and+send.\u0026amp;theme=f41c7822b6c64f9ef8c1dd54\u0026amp;signature=0627e3e9da8d0a7f22e39e710c98843be79765312e8e86528e48eff251fb7830\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Drafts - Ruber\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Prepare a message and leave it for a person to review and send.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ruber.mintlify.app/_mintlify/api/og/v2?division=API\u0026amp;title=Drafts\u0026amp;description=Prepare+a+message+and+leave+it+for+a+person+to+review+and+send.\u0026amp;theme=f41c7822b6c64f9ef8c1dd54\u0026amp;signature=0627e3e9da8d0a7f22e39e710c98843be79765312e8e86528e48eff251fb7830\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ruber/awYK_A5aeomsaFIZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Ruber\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8a3d73\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ruber.me/api/drafts\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/drafts.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ruber.me/#organization\",\"name\":\"Ruber\",\"url\":\"https://docs.ruber.me\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ruber/CbxnSwTSSlNE8CGe/logo/light.svg?fit=max\u0026auto=format\u0026n=CbxnSwTSSlNE8CGe\u0026q=85\u0026s=902b9a9c9cdc7233b2be323b9679c3bf\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ruber.me#website\",\"name\":\"Ruber\",\"url\":\"https://docs.ruber.me\",\"publisher\":{\"@id\":\"https://docs.ruber.me/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ruber.me/api/drafts#webpage\",\"url\":\"https://docs.ruber.me/api/drafts\",\"name\":\"Drafts\",\"description\":\"Prepare a message and leave it for a person to review and send.\",\"dateModified\":\"2026-09-08T13:59:19.985Z\",\"isPartOf\":{\"@id\":\"https://docs.ruber.me#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ruber.me/api/drafts#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ruber.me/api/drafts#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API\",\"item\":\"https://docs.ruber.me/api/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Drafts\",\"item\":\"https://docs.ruber.me/api/drafts\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ruber.me/api/drafts#article\",\"headline\":\"Drafts\",\"name\":\"Drafts\",\"description\":\"Prepare a message and leave it for a person to review and send.\",\"url\":\"https://docs.ruber.me/api/drafts\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ruber.me/api/drafts#webpage\"},\"dateModified\":\"2026-09-08T13:59:19.985Z\",\"publisher\":{\"@id\":\"https://docs.ruber.me/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ruber.me#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Ruber\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Ruber","nav":{"global":null,"groups":[{"group":"Start here","pages":[{"title":"Documentation","sidebarTitle":"Overview","href":"/index"}]},{"group":"Using Ruber","pages":[{"title":"Mail","href":"/mail"},{"title":"IMAP \u0026 SMTP","href":"/endpoints"},{"title":"Calendar","href":"/calendar"},{"title":"Tasks","href":"/tasks"},{"title":"Contacts","href":"/contacts"}]},{"group":"API","pages":[{"title":"Quickstart","href":"/api/quickstart"},{"title":"How the API works","sidebarTitle":"How it works","href":"/api/introduction"},{"title":"Mailboxes","href":"/api/mailboxes"},{"title":"Messages","href":"/api/messages"},{"title":"Threads","href":"/api/threads"},{"title":"Attachments","href":"/api/attachments"},{"title":"Sending","description":"POST /v1/messages — send mail from an address your organization owns, with attachments, threading, and the limits that apply.","href":"/api/sending"},{"title":"Drafts","href":"/api/drafts"},{"title":"Scheduled messages","description":"Queue mail to go out later, see what is queued, and cancel it before it sends.","href":"/api/scheduled"},{"title":"Folders","href":"/api/folders"},{"title":"Labels","href":"/api/labels"},{"title":"Contacts \u0026 groups","href":"/api/contacts"},{"title":"Tasks","sidebarTitle":"Shared tasks","href":"/api/tasks"},{"title":"Calendar","sidebarTitle":"Shared calendar","href":"/api/calendar"},{"title":"Booking","sidebarTitle":"Booking links","href":"/api/booking"},{"title":"Domains \u0026 mailboxes","sidebarTitle":"Domains","href":"/api/domains"},{"title":"Filters, blocks \u0026 forwarding","sidebarTitle":"Rules \u0026 forwarding","href":"/api/rules"},{"title":"Members \u0026 usage","sidebarTitle":"Account","href":"/api/account"},{"title":"Webhooks","href":"/api/webhooks"}]}]},"basePath":"","title":"Drafts - Ruber","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":[],"chunks":[]}