Skip to content
Tinbox

SDK method

tools.createDraft

Create a draft. Convenience alias for create_draft, forwarding to tinbox.api.drafts.create.mutate.

Signature

ts
createDraft(input: Parameters<TinboxTools["createDraft"]>[0]): ReturnType<TinboxTools["createDraft"]>

Parameters

NameTypeRequiredDescription
inboxIdstringyesThe inbox the draft belongs to (required).
threadIdstringnoThe thread to reply to (for a reply draft).
tostring[]noRecipient addresses.
subjectstringnoDraft subject.
bodyTextstringnoDraft body (plain text).
followUpunknownnoSave a fixed conditional plan {afterDays:1..365,body:plain text up to16000 chars}; null means no plan. Saving never schedules or sends. Blank body is allowed only while drafting.

Returns

ReturnType<TinboxTools["createDraft"]>

Example

ts
await tinbox.tools.createDraft({
  "inboxId": "ibx_…"
});