Resend the accepted-invoice email to the receiver
const url = 'https://api.emite.cr/v1/invoices/example/resend-email';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"to":"cliente@example.com","cc":["contabilidad@example.com","gerencia@example.com"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.emite.cr/v1/invoices/example/resend-email \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "to": "cliente@example.com", "cc": [ "contabilidad@example.com", "gerencia@example.com" ] }'Re-queues the accepted-by-Hacienda email (PDF + signed XML + Hacienda response XML) to the receiver. Use when the customer reports they never got the original. All body fields are optional: with an empty body the email goes to the receiver email stored on the invoice. to overrides the primary recipient (useful when the original address bounced); cc adds up to 3 carbon copies. Bypasses the tenant's invoiceAcceptedReceiver notification preference since the resend is explicit. Returns 409 INVOICE_NOT_ACCEPTED_FOR_RESEND when the document has not reached a terminal accepted state, and 400 RECEIVER_EMAIL_REQUIRED when no recipient is on file and none was provided.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Invoice UUID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Primary recipient override. When omitted, the invoice receiver email is used. Useful when the original receiver email bounced or was mistyped.
Example
cliente@example.comUp to 3 CC recipients (carbon copies).
Example
[ "contabilidad@example.com", "gerencia@example.com"]Responses
Section titled “Responses”Email queued; the body echoes the addresses it goes to.
object
Always true: the email was handed to the delivery queue. It is sent in the background, so this answer does not mean it was delivered.
Primary recipient the email goes to: the to of the request, or the receiver email stored on the invoice when none was sent.
The carbon copies, as requested; empty when none were sent.
Example
{ "queued": true, "to": "cliente@example.com", "cc": [ "contabilidad@example.com" ]}No recipient available (RECEIVER_EMAIL_REQUIRED), invalid to/cc, or a demo tenant (INVOICE_EMAIL_NOT_AVAILABLE_IN_DEMO — a demo session never mails anyone).
Invoice not found.
Invoice not accepted yet (INVOICE_NOT_ACCEPTED_FOR_RESEND).