> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cucu.bo/llms.txt
> Use this file to discover all available pages before exploring further.

# Reenviar Email

> Reenvia la factura por email al cliente.

Reenvia la factura (PDF + XML) por email. Puedes enviar al email original del cliente o a uno diferente.

## Path Parameters

| Parametro | Tipo   | Req | Descripcion        |
| --------- | ------ | --- | ------------------ |
| `id`      | string | Si  | UUID de la factura |

## Query Parameters

| Parametro | Tipo   | Req | Descripcion                                                      |
| --------- | ------ | --- | ---------------------------------------------------------------- |
| `email`   | string | No  | Email destino. Si se omite, se usa el email original del cliente |

## Headers

| Parametro   | Tipo   | Req | Descripcion |
| ----------- | ------ | --- | ----------- |
| `X-API-Key` | string | Si  | Tu API Key  |

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST "https://sandbox.cucu.bo/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resend-email?email=otro@ejemplo.com" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch(
    'https://sandbox.cucu.bo/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resend-email?email=otro@ejemplo.com',
    {
      method: 'POST',
      headers: { 'X-API-Key': 'YOUR_API_KEY' }
    }
  );
  const data = await response.json();
  ```

  ```python Python theme={"system"}
  import requests

  response = requests.post(
      'https://sandbox.cucu.bo/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resend-email',
      headers={'X-API-Key': 'YOUR_API_KEY'},
      params={'email': 'otro@ejemplo.com'}
  )
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "success": true,
    "message": "Email reenviado exitosamente a otro@ejemplo.com",
    "data": "Email enviado",
    "timestamp": "2026-02-11T15:00:00"
  }
  ```

  ```json 404 theme={"system"}
  {
    "success": false,
    "error": {
      "code": "NOT_FOUND",
      "details": "Factura no encontrada"
    },
    "timestamp": "2026-02-11T15:00:00"
  }
  ```
</ResponseExample>
