SDKs & Libraries

Official and community integrations for the envoice.dev API.

Official SDKs

JavaScript / TypeScript

Coming soon

npm install @envoice/sdk

Python

Coming soon

pip install envoice

REST API

The API uses standard REST conventions and can be called from any language with HTTP support. See the API Reference for full documentation.

Example with curl

curl -X POST https://api.envoice.dev/v1/generate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $ENVOICE_API_KEY" \
  -d @invoice.json

Example with fetch (JavaScript)

const response = await fetch('https://api.envoice.dev/v1/generate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': process.env.ENVOICE_API_KEY
  },
  body: JSON.stringify({
    template: 'minimal',
    invoice: { /* ... */ }
  })
});

const { pdf_base64 } = await response.json();
// Decode Base64 to save as file

Example with requests (Python)

import requests
import base64
import os

response = requests.post(
    'https://api.envoice.dev/v1/generate',
    headers={
        'Content-Type': 'application/json',
        'X-API-Key': os.environ['ENVOICE_API_KEY']
    },
    json={
        'template': 'minimal',
        'invoice': { ... }
    }
)

pdf_bytes = base64.b64decode(response.json()['pdf_base64'])
with open('invoice.pdf', 'wb') as f:
    f.write(pdf_bytes)

MCP Integration

For AI assistant integration, see the MCP Server documentation.