Mailboxes
Update a draft
Updates the fields you name and keeps the rest; `null` clears an optional field. A draft whose send waits for approval cannot change and conflicts.
PATCH
Updates the fields you name and keeps the rest; null clears an optional field. A draft whose send waits for approval cannot change and conflicts.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$draftId*stringMatch
^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
to?array<string>|nullcc?array<string>|null|nullbcc?array<string>|null|nullreplyTo?array<string>|null|nullsubject?string|null|nulltext?string|null|nullhtml?string|null|nullattachments?array<>|null|nullMailboxDraft
application/json- response
id*MailboxDraftIdMatch
^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$channel*"email"Value in
"email"threadId*|nullinReplyToMessageId*|nullstate*MailboxDraftStateValue in
"saved""locked""sent"lockedByActionId*|nullto*array<string>subject*string|nullcreatedAt*stringupdatedAt*stringendpointId*|nullcc*array<string>bcc*array<string>replyTo*array<string>html*string|nulltext*string|nullattachments*array<>Items
items <= 10import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.updateDraft({ "id": "example", "draftId": "example"});Example Response
{ "id": "string", "channel": "email", "threadId": "string", "inReplyToMessageId": "string", "state": "saved", "lockedByActionId": "string", "to": [ "string" ], "subject": "string", "createdAt": "string", "updatedAt": "string", "endpointId": "string", "cc": [ "string" ], "bcc": [ "string" ], "replyTo": [ "string" ], "html": "string", "text": "string", "attachments": [ { "filename": "string", "content": "string", "mediaId": "string", "contentType": "string", "size": 1 } ]}