Remove an attachment
DELETE
/attachments/{id}Takes a file off a draft. Only off a draft: a file on a sent message is part of what the recipient has.
Needs the permissionattachments:delete
Path parameters
idstringrequired- The file.
Returns
idstring- The file.
deletedboolean- Always true.
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
attachments:delete. TheX-Required-Scopeheader names what’s missing. 404not_found- There’s no such file, or the key’s owner can’t see it.
409not_a_draft- The file is on a message that has been sent.
429rate_limited- More than 120 requests a minute from this key. Wait for
Retry-Afterseconds.