Webhooks

A webhook sends each new submission to your own HTTPS endpoint as JSON, so you can route it to a practice management system, CRM or internal tool. Webhooks are configured per form, on the form's Integrations tab.

Because a webhook sends patient information outside hipaaform.ai, an account owner must confirm responsibility for the destination before it is switched on, and again whenever the URL changes. Nothing is sent to a destination that has not been confirmed.

Webhook payloads contain the submitted answers, which may be protected health information. Only send them to systems that are covered by your HIPAA policies and, where required, a Business Associate Agreement.

Delivery

  • One POST request is made per submission, shortly after the visitor submits the form.
  • The endpoint must use https and must be reachable from the public internet.
  • The request times out after 10 seconds. Redirects are not followed.
  • Any response status below 300 counts as delivered.
  • A failed delivery is retried automatically: after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours (six attempts in all). After the last one it is marked failed and recorded in the audit log.
  • Every delivery is listed in the form's Delivery log, with its status and the reason for any failure, and can be sent again from there.
  • Deliveries can arrive more than once and out of order. Use submission.id to ignore repeats.
  • The submission itself is never lost when a delivery fails: the inbox remains the system of record.

Testing without a submission

On the form's Integrations tab, Send a test posts a signed sample payload to the endpoint you have entered, even before you save. It has the same shape as a real event, with made-up answers, the submission id test_submission and "test": true at the top level, so a receiver can verify the signature and parse it, and skip it if it should not create a record:

if (event.test) return res.sendStatus(204);

A test is sent once, is not retried and does not appear in the delivery log. Real events never carry test.

Request headers

HeaderValue
Content-Typeapplication/json
User-Agenthipaaform-webhook/1
X-Hipaaform-Eventsubmission.created
X-Hipaaform-TimestampUnix time in seconds when the request was signed.
X-Hipaaform-Signaturesha256= followed by a hex HMAC. Sent when the webhook has a signing secret.

Payload

{
  "event": "submission.created",
  "form": { "id": "k7m2xq9pd4tw", "name": "Appointment request" },
  "submission": {
    "id": "sub_4f9c2a7d1b8e6k3m5p",
    "created_at": "2026-11-22T15:04:05.000Z",
    "answers": [
      { "id": "f_a1b2c3d4", "label": "Full name", "type": "text", "value": "Jordan Rivera" },
      { "id": "f_e5f6g7h8", "label": "Preferred time", "type": "select", "value": "Morning" },
      { "id": "f_i9j0k1l2", "label": "Conditions", "type": "checkboxes", "value": ["Asthma"] },
      { "id": "f_m3n4o5p6", "label": "I consent to treatment", "type": "consent", "value": true }
    ],
    "signed": true,
    "attribution": {
      "tracking": { "utm_source": "google", "utm_medium": "cpc", "utm_campaign": "spring-checkups", "gclid": "Cj0KCQjw" },
      "params": { "utm_source": "google", "utm_medium": "cpc", "utm_campaign": "spring-checkups", "gclid": "Cj0KCQjw" },
      "firstTouch": {
        "params": { "utm_source": "google" },
        "landingPage": "https://www.yourpractice.com/",
        "referrer": "https://www.google.com/",
        "at": "2026-11-20T09:12:44.000Z"
      },
      "pageUrl": "https://www.yourpractice.com/book",
      "pageTitle": "Book an appointment",
      "referrer": "https://www.yourpractice.com/",
      "embedded": true,
      "timezone": "America/Chicago",
      "language": "en-US",
      "screen": "390x844"
    }
  }
}

Answer values by field type

Field typevalue
text, textarea, email, phone, number, select, radio, hiddenString
dateString in YYYY-MM-DD format
checkboxesArray of strings
consentBoolean

Signature images are never sent in webhooks. submission.signed is true when the form was signed; the signature itself can be viewed in the panel. Fields hidden by conditional logic are omitted. label is the field's label at the time of submission.

Verifying signatures

Set a signing secret on the webhook and verify every request before trusting it. The signature is an HMAC-SHA256 of the timestamp, a dot and the raw request body, keyed with your secret:

signature = hex( HMAC_SHA256( secret, timestamp + "." + raw_body ) )

Compute it over the raw bytes of the body, before any JSON parsing, and compare in constant time. Reject requests whose timestamp is more than a few minutes old to prevent replays.

Node.js

import crypto from 'node:crypto';
import express from 'express';

const app = express();
const SECRET = process.env.HIPAAFORM_WEBHOOK_SECRET;

app.post('/hooks/hipaaform', express.raw({ type: 'application/json' }), (req, res) => {
  const timestamp = req.get('X-Hipaaform-Timestamp') || '';
  const received = req.get('X-Hipaaform-Signature') || '';
  const expected = 'sha256=' + crypto.createHmac('sha256', SECRET).update(`${timestamp}.${req.body}`).digest('hex');

  const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;
  const [a, b] = [Buffer.from(received), Buffer.from(expected)];
  const valid = a.length === b.length && crypto.timingSafeEqual(a, b);
  if (!fresh || !valid) return res.status(401).end();

  const event = JSON.parse(req.body);
  // Handle event.submission here, then acknowledge quickly.
  res.status(204).end();
});

Python

import hashlib, hmac, os, time
from flask import Flask, request, abort

app = Flask(__name__)
SECRET = os.environ["HIPAAFORM_WEBHOOK_SECRET"].encode()

@app.post("/hooks/hipaaform")
def hipaaform_webhook():
    timestamp = request.headers.get("X-Hipaaform-Timestamp", "")
    received = request.headers.get("X-Hipaaform-Signature", "")
    message = timestamp.encode() + b"." + request.get_data()
    expected = "sha256=" + hmac.new(SECRET, message, hashlib.sha256).hexdigest()

    fresh = timestamp.isdigit() and abs(time.time() - int(timestamp)) < 300
    if not fresh or not hmac.compare_digest(received, expected):
        abort(401)

    event = request.get_json()
    # Handle event["submission"] here, then acknowledge quickly.
    return "", 204

PHP

<?php
$secret    = getenv('HIPAAFORM_WEBHOOK_SECRET');
$body      = file_get_contents('php://input');
$timestamp = $_SERVER['HTTP_X_HIPAAFORM_TIMESTAMP'] ?? '';
$received  = $_SERVER['HTTP_X_HIPAAFORM_SIGNATURE'] ?? '';
$expected  = 'sha256=' . hash_hmac('sha256', $timestamp . '.' . $body, $secret);

if (abs(time() - (int) $timestamp) > 300 || !hash_equals($expected, $received)) {
    http_response_code(401);
    exit;
}

$event = json_decode($body, true);
// Handle $event['submission'] here, then acknowledge quickly.
http_response_code(204);

Other ways to get data out

  • CSV export. Any form can be exported from the panel, with answers and attribution side by side. Every export is written to the audit log.
  • Email notifications. Each form can notify up to 10 addresses. By default the email contains a secure link, not the answers.

View this page as Markdown · All docs in one file