API Integration Guide
Learn how to integrate Intelliprint's hybrid mail services into your applications
Getting Started with the API
The Intelliprint API allows you to programmatically send mail, manage templates, track deliveries, and more. Our RESTful API uses standard HTTP methods and returns JSON responses.
Authentication
All API requests require authentication using an API key. To get your API key:
- Log in to your Intelliprint account
- Go to Settings > API Integration
- Click "Generate New API Key"
- Store your API key securely - it won't be shown again
Base URL
All API endpoints are relative to this base URL. Always use HTTPS for secure communication.
Security Note: Never expose your API key in client-side code or public repositories. Always make API calls from your backend services.
Core API Endpoints
Sending Mail
POST /mail/send
Send a single piece of mail or batch of letters.
POST /mail/batch
Process a mail merge using a template and recipient data.
Templates
GET /templates
List all available templates.
POST /templates
Create a new template.
Tracking & Status
GET /mail/{id}
Get status and tracking information for a specific mail piece.
GET /mail/batch/{id}
Get status for an entire batch of mail.
Code Examples
Here are some common integration scenarios with code examples:
Sending a Single Letter
const response = await fetch('https://api.intelliprint.net/v1/mail/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
recipient: {
name: 'John Smith',
address_line_1: '123 Sample Street',
city: 'London',
postcode: 'SW1A 1AA'
},
document: {
content: base64EncodedPDF,
type: 'pdf'
},
options: {
class: 'first',
colour: true,
duplex: false
}
})
});
Processing a Mail Merge
const response = await fetch('https://api.intelliprint.net/v1/mail/batch', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template_id: 'template_123',
recipients: [
{
name: 'John Smith',
address_line_1: '123 Sample Street',
city: 'London',
postcode: 'SW1A 1AA',
merge_fields: {
invoice_number: 'INV-001',
amount: '£99.99'
}
}
// ... more recipients
],
options: {
class: 'standard',
colour: false,
duplex: true
}
})
});
Rate Limits & Best Practices
Rate Limits
- 1,000 requests per minute for standard accounts
- 5,000 requests per minute for enterprise accounts
- Maximum batch size of 10,000 recipients
- Maximum file size of 10MB per document
Best Practices
- Implement retry logic with exponential backoff
- Cache template IDs and other frequently used data
- Use webhooks for status updates instead of polling
- Compress large documents before sending
- Validate addresses before submission
Pro Tip: Use our test environment (api.test.intelliprint.net) for development and testing. Test API keys are available in your account settings.
Ready to Start Integrating?
Get your API keys and explore our complete API reference documentation.
View Full API Documentation