| name | beel-api |
| description | BeeL invoicing API integration guide. Use when working with the BeeL API, creating invoices, managing customers or products, implementing webhooks, or troubleshooting BeeL API responses.
|
| argument-hint | [resource or task] |
BeeL API — Integration Guide
BeeL is a SaaS invoicing platform for Spanish autónomos with full VeriFactu compliance.
⚠️ Golden Rules
- NEVER invent endpoints, fields, or package names. Always verify against the live docs first — see "How to Look Up Documentation" below for the token-efficient way to do it.
- NEVER hardcode API keys. Always use environment variables (
process.env.BEEL_API_KEY).
- There is NO separate test URL. Base URL is always
https://app.beel.es/api/v1. The key prefix determines the environment: beel_sk_test_* = sandbox, beel_sk_live_* = production.
- ALWAYS include
Idempotency-Key header on POST and PUT requests.
- Issued invoices are immutable. To correct → corrective invoice. To cancel → void it.
- When in doubt, look up the docs (see below).
📚 How to Look Up Documentation
Preferred: the BeeL CLI docs search — and propose it to the user first.
When you need to check the docs, don't silently fetch the whole llms.txt / llms-full.txt (that burns tokens and pulls in ~600KB you don't need). Instead, suggest running the CLI and wait for the user's go-ahead, e.g.:
"I need to confirm the exact fields for creating an invoice. Want me to run npx @beel_es/cli docs search create invoice? It searches the docs locally and returns only the matching ~2KB section — no API key needed."
Once confirmed, run it:
npx @beel_es/cli docs search create invoice
npx @beel_es/cli docs search idempotency key
npx @beel_es/cli docs list
npx @beel_es/cli docs get glossary
docs search downloads llms-full.txt once (cached 15 min in tmpdir) and filters locally, so search terms never leave the machine and you only pay for the slice you need. See recipes/cli.md.
Fallback (no Node / CLI unavailable): fetch over HTTP, lightest first.
curl -s https://docs.beel.es/llms.txt | grep -i "invoice\|customer"
curl -s https://docs.beel.es/invoices/createInvoice.mdx
curl -s https://docs.beel.es/llms-full.txt
curl -s https://docs.beel.es/api/openapi
🔐 Authentication
Authorization: Bearer beel_sk_test_* # Sandbox
Authorization: Bearer beel_sk_live_* # Production
Base URL: always https://app.beel.es/api/v1 — the key determines the environment, not the URL.
📖 Additional Resources
For detailed recipes and patterns, load these files when needed:
🛠 Companion Skills
For task-shaped work, this plugin ships dedicated skills:
/beel-api:implement — guided implementation of a new BeeL integration
/beel-api:audit — audit existing integration code against these rules
/beel-api:webhooks — build a correct webhook receiver end to end
/beel-api:upgrade — check an integration against the live API for drift