prawnwire Developers

Zapier and webhook hooks

Connect Prawnwire Newsletters to Zapier, or subscribe your own endpoint to subscriber events with a REST hook.

POST/v1/hooks

Zapier

The Prawnwire Newsletters app for Zapier is not listed in Zapier’s app directory yet. Once it is, it uses an API key with contacts:read and contacts:write. Create one in Developers > API keys in the console and paste it when Zapier asks you to connect your account. The app offers:

  • New Subscriber and Contact Unsubscribed triggers, delivered as soon as the event happens.
  • Create or Update Contact and Add Tag to Contact actions. Creating a contact needs a consent statement.
  • Find Contact, a search by email address.

Someone who unsubscribed is never resubscribed by a Zap. See Newsletter contacts.

Subscribe a hook

POST /v1/hooks needs contacts:write. It makes a webhook endpoint for one event type in your organization, which is how Zapier’s triggers work:

Subscribe a hook
curl -X POST https://api.prawnwire.com/v1/hooks \
  -H "Authorization: Bearer $PRAWNWIRE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event":"subscribed","target_url":"https://hooks.zapier.com/hooks/standard/1/abc/"}'
Subscribe a hook response
{
  "data": {
    "id": "5f0e2a52-0c1c-4c52-9d6e-3a8a7f1f6b22",
    "event": "subscribed",
    "target_url": "https://hooks.zapier.com/hooks/standard/1/abc/",
    "created_at": "2026-11-20T10:00:00.000Z",
    "secret": "whsec_..."
  }
}
FieldMeaning
eventOne of subscribed, unsubscribed, tag_added, tag_removed, consent_changed, status_changed, sent, bounced, complained, clicked or opened.
target_urlA public https:// address. Addresses with credentials, IP addresses and names that only resolve inside a network are refused with ErrorCode 300.

The secret signs every delivery and is shown once, so keep it if you verify signatures. The endpoint starts at the present: it does not receive events from before it was subscribed. An organization can have 10 endpoints; the 11th is refused with 300.

Each delivery is a JSON body with the event’s id, type, createdAt, orgId and data, where data.contactId names the contact. Fetch it with GET /v1/contacts/{ContactID}. Failed deliveries are retried with backoff for 24 hours. Endpoints made this way also appear with the others in the console, where an admin can see deliveries and turn them off.

Unsubscribe a hook

DELETE /v1/hooks/{HookID} needs contacts:write and deletes the endpoint, with its pending deliveries. An id that is not in your organization returns ErrorCode 1240. A deployment that cannot store a signing secret answers 1243 with HTTP 503.

Polling instead

Zapier also polls GET /v1/contacts/recent?event=subscribed and event=unsubscribed, newest first, for its sample data. You can do the same when you cannot receive webhooks.

Search documentation

Type to search the documentation.