Healthcare Intake Pipeline
Webhook → PostgreSQL → API pipeline. Retell AI call_ended payload in, pre-registration record out. Live demo — synthetic data only.
1. Paste bearer tokens
From the Upwork application message. Commands below regenerate as you type.
2. Try it — copy & run
Paste any of these into a terminal. Replace <PRE_REG_ID> / <INTAKE_EVENT_ID> with UUIDs from earlier responses.
Confirms the app is running and can reach Postgres. Returns {"status":"ok","db":"ok"}. No authentication required — anyone can check liveness.
Simulates Retell posting a completed call. Validates the payload, stores the raw JSON as an audit event, and creates a pre_reg record. Posting the same call_id again returns {"status":"duplicate"} — idempotent by design.
Returns pre-registration records, most recent first. Cursor-paginated: add ?limit=20&cursor=... to page through. Filter by status with ?status=reviewed. Soft-deleted rows are never returned.
Fetches a single pre_reg record by UUID, plus metadata about the intake event it was derived from. Returns 404 if the record is missing or soft-deleted.
Partially updates a record — any subset of fields is allowed, empty body returns 400. Fields go through the same validators the webhook uses (E.164 phones, ISO dates, email format). Useful for a coordinator marking a record reviewed or fixing a typo.
Recovery for events whose derivation failed on the first try (bad payload, transient bug). Retries the derivation now. If a pre_reg already exists for that event, returns already_derived — safe to call either way. Without this endpoint, failed events would be permanently orphaned.
3. Build a custom payload (optional)
Generate a synthetic Retell call_ended event
A default payload is generated on page load and wired into the submit command above. Change any field and click Generate payload to refresh the JSON (and the submit command). Reset to default restores the sample values.
Notes + links
GitHub repo README Retell research notes Retell docs
- Demo only. Synthetic data. Weekly wipe. Takedown scheduled.
- Webhook auth: demo mode uses a bearer token. Real Retell traffic uses
X-Retell-SignatureHMAC-SHA256 per Retell's docs; details inRETELL_NOTES.md. - Idempotency: posting the same
call_idtwice yields onepre_regrow; the second call returns{"status":"duplicate"}. - Event filtering: only
event === "call_ended"creates a record; other Retell events return{"status":"ignored_event"}. - PII hygiene: transcripts, emails, DOBs, phone numbers, and the Authorization header are redacted in structured logs.