Getting started
Three steps: obtain an API key, authenticate, and issue an invoice. This guide uses an API key; for third-party apps, see OAuth2 with PKCE.
1. Create an API key
In the Bilteo dashboard, generate an API key for your tenant and assign the scopes you need. The key starts with bk_live_ (production) or bk_test_ (test).
Keep it safe
The key is shown only once. Treat it as a secret: do not embed it in public clients (browsers or mobile apps) or commit it to version control.
If you lose it, revoke it in the Bilteo dashboard and generate a new one.
2. Authenticate
In this example, every request carries the key in the Authorization header:
curl https://api.test.bilteo.com/api/v1/invoices \
-H "Authorization: Bearer bk_live_xxxxxxxxxxxxxxxx"3. Create and issue an invoice
Create an invoice; it remains a draft:
curl -X POST https://api.test.bilteo.com/api/v1/invoices \
-H "Authorization: Bearer bk_live_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"partner_id": "…",
"lines": [
{ "description": "Consulting service", "quantity": 1, "unit_price": "100.00" }
]
}'Issue it; Bilteo assigns the number and starts submission to the AEAT through Veri*Factu:
curl -X POST https://api.test.bilteo.com/api/v1/invoices/{id}/actions/issue \
-H "Authorization: Bearer bk_live_xxxxxxxxxxxxxxxx"TIP
The exact body and every field for each endpoint are in the API reference, generated from the service OpenAPI specification.
What's next
- Verifactu Direct API — register invoices already issued by your software
- API reference — endpoints, parameters, schemas, and examples