Webhooks

Direct mail webhooks for marketingautomation and CRM updates

Power automations and keep your CRM updated with direct mail webhooks. Receive signed mailing status changes so your own workflows can plan the next customer follow-up.

DevelopersTestLive
API keysWebhooksLogs
https://hooks.mapleandpine.ca/directmailerhttps://crm.mapleandpine.ca/webhooks/mail
EventStatus
postcard.mailed200
letter.in_production200
postcard.mailed200
postcard.returned200
postcard.rendered200
batch.created200
postcard.mailed503

Mailing updates. Keep customer records current as your postcards and letters are mailed.

Signed events. Check that each update came from Direct Mailer before using it.

Automatic retries. Catch missed updates with automatic retries when your webhook receiver is unavailable.

Features

Keep customer follow-up connected to your mail

Use mailing status updates in your own workflows to update records and prepare the next customer message.

Event logFind a missed update and check the response

Webhook eventsPOST /hooks/mail
postcard.created200
postcard.rendered200
postcard.in_production200
postcard.mailed200
{ "id": "evt_5Rk1Wz", "type": "postcard.mailed",
  "data": { "status": "mailed",
    "object": { "id": "pc_7Hq2Lm", … } } }

SignaturesVerify the sender before updating your customer records

Headersevt_5Rk1Wz
Content-Type: application/json
Directmailer-Signature: t=1791662313,v1=9f2c…
webhooks/mail.ts
const sig = req.headers["directmailer-signature"];
const [t, v1] = parse(sig);
const expected = createHmac("sha256", secret)
  .update(`${t}.${rawBody}`).digest("hex");
if (!timingSafeEqual(expected, v1)) return 400;

RetriesRecover missed mailing updates after a connection problem

postcard.mailedevt_5Rk1Wz
Try 115:58:03503
Try 215:58:08503
Try 315:58:33503
Try 416:00:33200
Sent at least once, with the same event id every time.

Test eventsTry your follow-up workflow before sending live mail

Test postal code X0X 0X1Test
postcard.created+0 s200
postcard.rendered+2 s200
postcard.in_production+5 s200
postcard.mailed+9 s200
postcard.returned+14 s200

Use mailing updates in your own workflows

Update a customer’s CRM record when their postcard is mailed, or prepare the next message in your own software. Events from our print and mail API connect that follow-up to the mailing.

Use direct mail tracking to time a follow-up call or email around the mailed date and estimated arrival. Signed updates let your own software act on mailing changes.

FAQ

Frequently asked questions

Which mailing events can I receive?

Receive events for created, rendered, in production, mailed, returned, cancelled and failed mail, including rendering failures. You can also receive campaign creation and completion, import completion and do-not-mail changes, and choose the events your receiver needs.

Do webhooks confirm that mail arrived?

Ordinary postcards and letters show Mailed and an estimated arrival. A webhook reports the mailing status; it does not confirm delivery to the recipient. Use the estimate when planning follow-up in your own system.

Can I test my webhook workflow first?

Yes. Test mode produces simulated mailing statuses with real webhook requests, and you can send a test event to an endpoint. Check that your receiver handles the updates before using it for live mail.

What happens when my receiver is offline?

Failed requests are retried with increasing gaps. Each retry keeps the same event ID, so your receiver should recognize repeats. You can inspect failed attempts in the app and resend them after fixing the problem.

How do I verify a webhook signature?

Each endpoint has a secret. Use it to calculate the HMAC-SHA256 signature from the timestamp and raw request body, then compare it with the signature header and reject requests with an old timestamp.

Do you connect directly to my CRM?

Your own webhook receiver handles CRM updates and other follow-up actions. Direct Mailer sends signed events to the URL you configure. A developer can use those events to build the workflow your business needs.

Connect your next mailing to your follow-up

Try your follow-up automation in test mode before using mailing updates to contact your next customer.