Overview
The e-invoice.be API uses Bearer Token Authentication for all endpoints. You’ll need to include your API key in theAuthorization header of every request.
Quick Start for New Users
If you’re just getting started:- Use the production API:
https://api.e-invoice.be - Create a sandbox company: In app.e-invoice.be, click Create sandbox company to get a test-mode company and its own API key
- Start developing: A sandbox company prevents real Peppol transmission while you build your integration
For most users, you only need to know about
api.e-invoice.be and test mode.Understanding the Setup
What API Should I Use?
Answer: Usehttps://api.e-invoice.be - This single API works for both development and live transactions.
How Do I Test Without Sending Real Invoices?
Answer: Create a sandbox company. A sandbox company runs in test mode: documents are emailed instead of being sent via Peppol. This lets you:- Test your integration safely
- Verify invoice data and UBL generation
- See exactly what would be sent via Peppol
API Host
Production API: api.e-invoice.be
Base URL: https://api.e-invoice.be
This is the only API host you need:
- ✅ For development: With test mode enabled
- ✅ For production: With test mode disabled
- ✅ Stable features: Well-tested, production-ready
- ✅ Standard rate limits: Suitable for most applications
Test Mode Explained
Test mode is delivered through a sandbox company — a dedicated company that changes how documents are transmitted:Key Points About Test Mode
- It’s determined by the company you authenticate as, not by which base URL you use
- A sandbox company has its own API key, separate from your live company’s key
- A sandbox company cannot be converted to a live one — create a separate regular company to go live
- Everything else works the same (validation, webhooks, API endpoints, etc.)
Create a sandbox company from app.e-invoice.be. See Test Mode for details.
Getting Your API Key
If you haven’t already obtained your API key:- Log in to app.e-invoice.be
- Go to Settings → API Keys
- Click Create API Key
- Copy and securely store your key
Making Authenticated Requests
Include your API key in theAuthorization header with the Bearer prefix:
Request Format
YOUR_API_KEY with your actual API key.
Code Examples
Best Practices
Store API Keys Securely
Use environment variables or secure credential management systems:Never Hardcode Keys
Development Workflow
- Create a sandbox company in app.e-invoice.be and use its API key
- Use the production API (
api.e-invoice.be) for development - Switch to your live company’s API key when you’re ready to go live
You don’t need to change your base URL or code when switching from development to production - just use your live company’s API key and documents will be sent via Peppol instead of email. Learn more about test mode →
Rotate Keys Regularly
For security best practices:- Generate a new API key in your dashboard
- Update your applications to use the new key
- Delete the old key once migration is complete
Use Multiple API Keys
Create separate API keys for:- Sandbox companies (test mode) and real companies (production)
- Different applications or services
- Different team members or departments
- Programmatic access vs. manual testing
Error Responses
401 Unauthorized
If authentication fails, you’ll receive a 401 error:- Missing
Authorizationheader - Invalid API key format
- Expired or revoked API key
- Typo in API key
- Using a sandbox company’s API key for production sends (or vice versa)
Troubleshooting
- Verify the header format: Ensure you’re using
Bearer YOUR_API_KEY - Check for whitespace: Trim any extra spaces from your API key
- Confirm the workspace: Make sure you’re using the correct API key (sandbox company vs. real company)
- Test with curl: Verify your key works with a simple curl command
Testing Your Authentication
Use the/api/me/ endpoint to verify your authentication is working:
Next Steps
Create Your First Invoice
Learn how to create and send e-invoices
Validate During Development
Test your invoice data before sending