Remove an email attachment from a draft invoice
DELETE
/v1/invoices/{id}/attachments/{attachmentId}
const url = 'https://api.emite.cr/v1/invoices/example/attachments/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.emite.cr/v1/invoices/example/attachments/example \ --header 'Authorization: Bearer <token>'Deletes one of the extra files uploaded to this document with POST /v1/invoices/{id}/attachments, together with its stored copy, so it no longer travels with the invoice email. Unlike the upload, it is not limited to drafts: on a document already accepted it only changes later resends (POST /v1/invoices/{id}/resend-email). The company-wide fixed attachments are not removed here; PUT /v1/invoices/{id}/omitted-fixed-attachments leaves them out of one document. Requires invoices:write; recorded in the audit log as invoice.attachment_removed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Invoice UUID
attachmentId
required
string
Attachment UUID
Responses
Section titled “Responses”Attachment removed.
Invoice or attachment not found.