Advanced
Sending Bulk Mail
You can send letters or postcards to thousands of recipients at once.
Doc cover pending
Diagram or screenshot for the "Sending Bulk Mail" doc page: visual that anchors what this doc explains (request flow, dashboard surface, or worked example).
Awaiting uploadOn this page
Providing Multiple Recipients
To send a print job to many people, provide a recipient object for each of them in the print job.
Node.js SDK
Node.js
import Intelliprint from 'intelliprint'
const ip = new Intelliprint('your-api-key-here')
const printJob = await ip.prints.create({
type: 'letter',
content: 'Hello World!\nThis is a letter!',
recipients: [
{
address: {
name: '1: John Doe',
line: '123 Main Street, Anytown, Anyplace',
postcode: 'AB1 2CD',
country: 'GB'
}
},
{
address: {
name: '2: Hopper Doe',
line: '456 Main Street, Anytown, Anyplace',
postcode: 'AB1 2CD',
country: 'GB'
}
},
{
address: {
name: '3: Jane Doe',
line: '789 Main Street, Anytown, Anyplace',
postcode: 'AB1 2CD',
country: 'GB'
}
}
],
confirmed: false // Set to 'true' when you're ready to start submitting mail for printing.
})
console.log('Print job created:', printJob.id)cURL
cURL
curl -X POST https://api.intelliprint.net/v1/prints \
-H 'Authorization: YOUR_API_KEY' \
-d 'type=letter' \
-d 'content=Hello World!\nThis is a letter!' \
-d 'recipients[0][address][name]=1 John Doe' \
-d 'recipients[0][address][line]=123 Main Street, Anytown, Anyplace' \
-d 'recipients[0][address][postcode]=AB1 2CD' \
-d 'recipients[0][address][country]=GB' \
-d 'recipients[1][address][name]=2 Hopper Doe' \
-d 'recipients[1][address][line]=456 Main Street, Anytown, Anyplace' \
-d 'recipients[1][address][postcode]=AB1 2CD' \
-d 'recipients[1][address][country]=GB' \
-d 'recipients[2][address][name]=3 Jane Doe' \
-d 'recipients[2][address][line]=789 Main Street, Anytown, Anyplace' \
-d 'recipients[2][address][postcode]=AB1 2CD' \
-d 'recipients[2][address][country]=GB' \
-d 'confirmed=false'Using a Mailing List
Sometimes you may want to send the same print job to the same recipients multiple times. In this case, you can use a mailing list to store the recipients and then send the print job to the mailing list.
Creating a Mailing List
Node.js SDK
Node.js
import Intelliprint from 'intelliprint'
const ip = new Intelliprint('your-api-key-here')
const mailingList = await ip.mailing_lists.create({
name: 'My Mailing List',
recipients: [
{
address: {
name: 'John Doe',
line: '123 Main Street, Anytown, Anyplace',
postcode: 'AB1 2CD',
country: 'GB'
},
variables: {
employee_id: '123456'
}
}
]
})
console.log('Mailing list created:', mailingList.id)cURL
cURL
curl -X POST https://api.intelliprint.net/v1/mailing_lists \
-H 'Authorization: YOUR_API_KEY' \
-d 'name=My Mailing List' \
-d 'recipients[0][address][name]=John Doe' \
-d 'recipients[0][address][line]=123 Main Street, Anytown, Anyplace' \
-d 'recipients[0][address][postcode]=AB1 2CD' \
-d 'recipients[0][address][country]=GB' \
-d 'recipients[0][variables][employee_id]=123456'Adding Recipients to a Mailing List
Node.js SDK
Node.js
import Intelliprint from 'intelliprint'
const ip = new Intelliprint('your-api-key-here')
const mailingList = await ip.mailing_lists.update('my-mailing-list-id', {
delete_old_recipients: false,
recipients: [ // The following recipients will be appended to the mailing list.
{
address: {
name: 'John Doe',
line: '123 Main Street, Anytown, Anyplace',
postcode: 'AB1 2CD',
country: 'GB'
},
variables: {
employee_id: '123456'
}
}
]
})cURL
cURL
curl -X POST https://api.intelliprint.net/v1/mailing_lists/my-mailing-list-id \
-H 'Authorization: YOUR_API_KEY' \
-d 'delete_old_recipients=false' \
-d 'recipients[0][address][name]=John Doe' \
-d 'recipients[0][address][line]=123 Main Street, Anytown, Anyplace' \
-d 'recipients[0][address][postcode]=AB1 2CD' \
-d 'recipients[0][address][country]=GB' \
-d 'recipients[0][variables][employee_id]=123456'
# The above recipients will be appended to the mailing list.Sending a Print Job to a Mailing List
Node.js SDK
Node.js
import Intelliprint from 'intelliprint'
const ip = new Intelliprint('your-api-key-here')
const printJob = await ip.prints.create({
template: 'tmpl_design',
mailing_list: 'mal_example',
confirmed: false // Set to 'true' when you're ready to start submitting mail for printing.
})
console.log('Print job created:', printJob.id)cURL
cURL
curl -X POST https://api.intelliprint.net/v1/prints \
-H 'Authorization: YOUR_API_KEY' \
-d 'template=tmpl_design' \
-d 'mailing_list=mal_example' \
-d 'confirmed=false'