Update a draft
PATCH
/drafts/{id}Changes a draft’s recipients, subject or body. What you leave out stays as it is.
Needs the permissiondrafts:update
A list you send replaces the one there, and bodyHtml replaces the whole body, signature and quote included.
If somebody has the draft open in DMU Mail, you get 409 draft_locked: what they’re typing isn’t overwritten.
Path parameters
idstringrequired- The draft.
Body
tolist of stringsoptional- With
ccandbcc: new recipients. subjectstringoptional- A new subject.
bodyHtmlstringoptional- A new body.
Returns
idstring- The draft.
tolist of strings- With
ccandbcc: its recipients. subjectstring- Its subject.
bodyHtmlstring- Its body, sanitised.
updatedAtstring- When it last changed.
Errors
401invalid_key- The key is wrong, expired or revoked. With no Authorization header at all, the code is
missing_credentials. 403missing_scope- The key doesn’t have
drafts:update. TheX-Required-Scopeheader names what’s missing. 404not_found- There’s no such draft, or the key’s owner can’t see it.
409draft_locked- Somebody has the draft open in DMU Mail, or it has been sent.
429rate_limited- More than 120 requests a minute from this key. Wait for
Retry-Afterseconds.