Send invoice by email
Sends the invoice by email to the customer. **Email:** Sent to the billing emails configured for the client. **Attachments:** Includes the invoice PDF.
API Key authentication.
Format: X-API-Key: beel_sk_<key>
Obtaining Keys: API Keys are managed from the BeeL dashboard
Security: API Keys are secret credentials. Do not share them or store them in source code
In: header
Path Parameters
Invoice ID
uuidIf not specified, uses the customer's email
Email subject (optional, if not specified uses a default)
1 <= length <= 200Custom message (optional, added before standard message)
1 <= length <= 2000trueSupported languages
"es""es" | "en" | "ca"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.beel.es/api/v1/facturas/550e8400-e29b-41d4-a716-446655440000/enviar" \ -H "Content-Type: application/json" \ -d '{}'{
"success": true,
"data": {
"email_id": "550e8400-e29b-41d4-a716-446655440000",
"enviado_a": [
"usuario@ejemplo.com"
],
"enviado_en": "2019-08-24T14:15:22Z"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The provided data is not valid",
"details": {
"campo": "specific error message"
}
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "123e4567-e89b-12d3-a456-426614174000"
}
}Issue invoice (BORRADOR → EMITIDA) POST
Finalizes a draft invoice and marks it as issued. **Status change:** `BORRADOR` → `EMITIDA` **Actions performed:** - Assigns definitive invoice number according to configured series - Marks invoice as finalized (not modifiable) - Prepares invoice for sending to customer **Validations:** - Invoice must be in BORRADOR status - All invoice data must be complete and valid **Note:** After issuing, the invoice can be sent to the customer via the `/facturas/{id}/enviar` endpoint
Submit invoice to VeriFactu (AEAT) POST
Submits the invoice to the Spanish Tax Agency's VeriFactu system. **Requirements:** - VeriFactu must be enabled in settings - Invoice must have all required data - Only invoices NOT previously submitted **Process:** 1. Validates invoice data 2. Generates electronic fingerprint 3. Digitally signs 4. Sends to AEAT 5. Stores response and CSV