Notify Buyers
Send the delivery email to everyone who bought a digital product, in one call.
Last updated
Sends the customer notification / delivery email to every buyer of a digital
product, instead of calling POST /orders/{id}/notify
once per order. Use this after updating a product’s files to let all existing
buyers know a new version is available.
The emails are sent in the background, so the call returns immediately with the number of orders queued — it does not wait for delivery. Each buyer receives the same standard delivery email they’d get from the per-order notify endpoint, unless you override the subject or body in this request.
Path parameters
Section titled “Path parameters”-
id(string, path, required)The ID (UUID) of the digital product whose buyers should be notified.
Request body
Section titled “Request body”-
subject(string)Override the email subject for this send. Supports the same Liquid variables as your email template (
{{ order.name }},{{ customer.name }},{{ shop.name }}). When omitted, the subject from your Filemonk email settings is used. -
body(string)Override the email body for this send. Supports the same Liquid variables as your email template. When omitted, the body from your Filemonk email settings is used.
Response
Section titled “Response”-
digital_product_id(string, required)The digital product the notifications were queued for.
-
notified_count(integer, required)The number of orders queued for notification.
Example request
curl -X POST 'https://app.filemonk.io/api/v1/external/digital_products/a1b2c3d4-e5f6-7890-abcd-ef1234567890/notify_buyers' \ -H 'X-Auth-Token: fm_api_key_your_key_here' \ -H 'Content-Type: application/json'curl -X POST 'https://app.filemonk.io/api/v1/external/digital_products/a1b2c3d4-e5f6-7890-abcd-ef1234567890/notify_buyers' \ -H 'X-Auth-Token: fm_api_key_your_key_here' \ -H 'Content-Type: application/json' \ -d '{ "subject": "Your {{ shop.name }} download has been updated", "body": "Hi {{ customer.name }}, a new version of your file is ready. Use your original download link to access it." }'const DIGITAL_PRODUCT_ID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const result = await fetch( `https://app.filemonk.io/api/v1/external/digital_products/${DIGITAL_PRODUCT_ID}/notify_buyers`, { method: 'POST', headers: { 'X-Auth-Token': 'fm_api_key_your_key_here', 'Content-Type': 'application/json' }, body: JSON.stringify({ subject: 'Your {{ shop.name }} download has been updated', body: 'Hi {{ customer.name }}, a new version of your file is ready. Use your original download link to access it.' }) }).then(r => r.json());
console.log(`Queued ${result.notified_count} notifications`);DIGITAL_PRODUCT_ID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
result = requests.post( f'https://app.filemonk.io/api/v1/external/digital_products/{DIGITAL_PRODUCT_ID}/notify_buyers', headers={'X-Auth-Token': 'fm_api_key_your_key_here'}, json={ 'subject': 'Your {{ shop.name }} download has been updated', 'body': 'Hi {{ customer.name }}, a new version of your file is ready. Use your original download link to access it.' }).json()
print(f"Queued {result['notified_count']} notifications")Example response
{ "digital_product_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "notified_count": 142}{ "error": "This digital product has no orders to notify"}{ "error": "Digital product not found"}Thanks for letting us know.
Still stuck? Ask Quinn or chat with support