Skip to main content

saveDraft

Requires permission sales:quote:update.

Creates an email draft, or updates one of the caller's own when an ID is given. A draft belongs to its author: another user's draft, or an unknown ID, is treated as missing. Requires permission to update quotes.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation SaveDraft($input: SaveDraftInput!) {
saveDraft(input: $input) {
id
type
createdAt
bodyHtml
ccEmails
inReplyToId
}
}

Variables:

{
"input": {}
}

Response:

{
"data": {
"saveDraft": {
"id": "id",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"bodyHtml": "string",
"ccEmails": [
"string"
],
"inReplyToId": "string"
}
}
}
saveDraft(
input: SaveDraftInput!
): EmailDraft!

Arguments​

saveDraft.input ● SaveDraftInput! non-null input​

The draft's recipients, subject and body, the quote or order it relates to, and its ID when updating.

Type​

EmailDraft object​

A saved email draft.