Integration guide · v1

Inbound lead webhook

Send every lead straight to the dispatch board.

Connect a form, inbox automation, or messaging workflow to Quillwright with one signed JSON request. The endpoint is built for retries, so a flaky automation does not create duplicate work for your team.

Endpoint

POST /api/inbound-leads
Content-Type: application/json

The request must include an X-Webhook-Secret header. Keep that value in your server or automation secret store — never in browser code.

01 · Make the request

One signed POST is all it takes.

Use the live host for your deployed app. The INBOUND_LEADS_SECRET variable below is a placeholder that your server-side automation should resolve from its own secret store.

curl · server or automation onlycopy / paste
curl -X POST "https://<live-host>/api/inbound-leads" \
  -H "Content-Type: application/json" \
  -H "X-Webhook-Secret: ${INBOUND_LEADS_SECRET}" \
  -d '{
    "name": "Jamie Rivera",
    "email": "jamie@example.com",
    "message": "I need a quote for a leaking kitchen line.",
    "source": "web",
    "intent": "quote",
    "trade": "plumber"
  }'

02 · Shape the payload

Keep the body small and useful.

Required

name, message, and source, plus at least one of phone or email.

Defaults and enums

intent defaults to quote and accepts emergency, quote, or schedule. trade defaults to plumber and accepts plumber, hvac, roofer, dentist, med-spa, or pest-control.

Contact fields

phone and email are each optional, but the validator requires at least one. Email must be a valid email address.

json · minimal valid bodycopy / paste
{
  "name": "Jamie Rivera",
  "phone": "+1 319 555 0142",
  "message": "Can someone come this afternoon?",
  "source": "phone"
}

03 · Tag the source

Use the standard tags, or bring your own.

These are Quillwright’s canonical source tags. The current validator also accepts any trimmed, non-empty source string up to 40 characters, so an internal campaign or tool name can pass through without a schema change.

google
web
dm
referral
email
phone
webhook
draft-reply
Retry-safe by design

Repeated submissions are deduplicated using the endpoint’s existing fingerprint behavior. A matching message-and-trade submission updates the existing lead instead of creating a second card.

04 · Read the response

Confirm the handoff, then move on.

A successful response is JSON with id, fingerprint, status, and created.

json · successful responsecopy / paste
{
  "id": "clx_lead_123",
  "fingerprint": "7a4c2f9e1d6b3a80c14e5f7b2a9d6c11",
  "status": "new",
  "created": true
}
201

Created

A new lead was added to the pipeline.

200

Existing lead

An idempotent retry updated the matching lead.

400

Bad request

The JSON is malformed or a field failed validation.

401

Unauthorized

The X-Webhook-Secret header is missing or incorrect.

500

Server error

An unexpected failure occurred while processing the lead.

Ready to connect a source?

Send a test lead, then watch it land in New.

Go to pipeline