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
| Name | Type | Required | Description |
|---|---|---|---|
inboxId | string | yes | The inbox the draft belongs to (required). |
threadId | string | no | The thread to reply to (for a reply draft). |
to | string[] | no | Recipient addresses. |
subject | string | no | Draft subject. |
bodyText | string | no | Draft body (plain text). |
Returns
ReturnType<TinboxTools["createDraft"]>
Example
ts
await tinbox.tools.createDraft({
"inboxId": "ibx_…"
});