Getting Started
Getting Started with EnvoyX API
This guide will walk you through making your first API call in just a few minutes.
Prerequisites
Before you begin, make sure you have:
- An EnvoyX account (sign up at the EnvoyX Dashboard)
- An API key (created from your dashboard)
- A tool to make HTTP requests (curl, Postman, or your favorite HTTP client)
- A PDF invoice file to test with
Quick Start
Create Your Account
Sign up for an EnvoyX account through the dashboard. You'll receive an email to verify your account. Complete the verification before proceeding.
Create an API Key
Once logged in to the dashboard:
- Navigate to Settings > API Keys
- Click Create New Key
- Give your key a descriptive name (e.g., "Production Server")
- Copy the key immediately — it won't be shown again
Important: Store your API key securely. It will only be displayed once during creation.
Upload Your First Invoice
Use your API key to upload an invoice:
curl -X POST https://staging-api.tryenvoyx.com/api/v1/invoices/upload \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@/path/to/invoice.pdf"const formData = new FormData()
formData.append('file', fileInput.files[0])
const response = await fetch('https://staging-api.tryenvoyx.com/api/v1/invoices/upload', {
method: 'POST',
headers: {
'X-API-Key': process.env.ENVOYX_API_KEY,
},
body: formData,
})
const { data } = await response.json()
console.log('Invoice uploaded:', data)import requests
api_key = "YOUR_API_KEY"
with open('invoice.pdf', 'rb') as file:
response = requests.post(
'https://staging-api.tryenvoyx.com/api/v1/invoices/upload',
headers={'X-API-Key': api_key},
files={'file': file}
)
invoice_data = response.json()['data']
print(f"Invoice ID: {invoice_data['id']}")Response:
{
"success": true,
"status": 201,
"code": "INVOICE_UPLOADED",
"message": "Invoice uploaded successfully",
"data": {
"id": "clx1234567890",
"file_name": "invoice.pdf",
"file_size": 245678,
"status": "PENDING",
"uploaded_at": "2024-02-10T12:00:00Z"
}
}Check Processing Status
Poll the invoice status to see when processing is complete:
curl -X GET https://staging-api.tryenvoyx.com/api/v1/invoices/clx1234567890 \
-H "X-API-Key: YOUR_API_KEY"const invoiceId = 'clx1234567890'
const response = await fetch(
`https://staging-api.tryenvoyx.com/api/v1/invoices/${invoiceId}`,
{
headers: {
'X-API-Key': process.env.ENVOYX_API_KEY,
},
}
)
const { data } = await response.json()
console.log('Invoice status:', data.status)
console.log('Extracted data:', data.extracted_data)invoice_id = 'clx1234567890'
response = requests.get(
f'https://staging-api.tryenvoyx.com/api/v1/invoices/{invoice_id}',
headers={'X-API-Key': api_key}
)
invoice = response.json()['data']
print(f"Status: {invoice['status']}")
print(f"Extracted data: {invoice['extracted_data']}")Processing Complete! Once the status changes to PROCESSED, you'll have access to all extracted invoice data.
Next Steps
Now that you've made your first API call, here's what to explore next:
- Invoices — Full invoice API reference (upload, list, status updates)
- Webhooks — Receive real-time notifications instead of polling
- WebSockets — Live event streaming for dashboards
- Dashboard — Analytics and reporting endpoints
- Authentication — API key management and best practices
Common Issues
Invalid API Key
If you see this error:
{
"success": false,
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid or has been revoked"
}Make sure you're using the correct API key in the X-API-Key header.
Rate Limiting
If you're hitting rate limits, consider:
- Using webhooks instead of polling
- Implementing exponential backoff
- Contacting support for higher limits
Need Help?
- Check the FAQ for common questions
- Email us at Email Support
- Report issues on GitHub