Webhooks
Preview a posting spec
/v1/webhooks/{webhookId}/posting-spec/previewSee the body a form webhook's posting spec would post, without sending anything. By default it maps a made-up lead.
Path parameters
webhookIdstringrequiredThe webhook's
id.
Body
JSON, with Content-Type: application/json.
specobjectA draft spec to preview, in the same shape as
POST /v1/webhooks/{webhookId}/posting-spec. Header values aren't needed. Leave it out to preview the saved spec.Show 3 fieldsHide 3 fields
formatenumrequiredHow the body is encoded.
"json"sends application/json and"form"sends application/x-www-form-urlencoded.One of
"json","form"entriesarray of objectrequiredThe body's keys, in order. The body holds exactly these keys. As JSON, it is a flat object of strings.
1–200 items
Show 3 fieldsHide 3 fields
keystringrequiredThe key in the body, exactly as the buyer names it.
1–200 chars
valueone of 3requiredWhat to send under the key. Every value is sent as a string.
Show 3 optionsHide 3 options
kind: "field"
kind"field"requiredA question's answer. Lists are joined with commas and files are sent as their links. A question that's gone or wasn't answered sends an empty string.
fieldIdstringrequiredA question's id in the form's definition.
1–100 chars
partenumOne part of the answer. For a name question,
firstorlast. For an address question,line1,line2,city,state,ziporcountry.stateis the region, such as a state, province or county.zipis the postal code.countryis the ISO 3166-1 alpha-2 code. Leave it out to send the whole answer. A whole address is one line, written the way its country writes addresses, with the country's name.One of
"first","last","line1","line2","city","state","zip","country"
kind: "meta"
kind"meta"requiredA contact or tracking value.
sourceenumrequiredWhich value to send.
trustedFormCertUrlis the response's TrustedForm certificate URL. It is empty until responses carry one.consentisyeswhen the person agreed to be called and texted andnootherwise.consentAtis when they agreed, andconsentTextthe wording they agreed to. Both are empty unless they agreed.phoneVerifiedisyeswhen the number was verified with a texted code, separate from consent.One of
"email","phone","fullName","firstName","lastName","ip","userAgent","pageUrl","submittedAt","responseId","formName","jornayaLeadId","trustedFormCertUrl","consent","consentAt","consentText","phoneVerified"
kind: "constant"
kind"constant"requiredThe same text on every lead.
valuestringrequiredmax 2000 chars
formatenumHow to write the value. For phones,
phoneDigitsgives just the digits, without the +1 for US and Canada numbers and with the country code for others.phoneE164gives E.164, andphoneUsgives (415) 555-0123. For dates,submittedAtandconsentAt,dateIsogives YYYY-MM-DD anddateUsgives MM/DD/YYYY. For yes/no values, such asconsent, a yes/no question or a consent question,boolTrueFalsegives true or false,boolOneZerogives 1 or 0, andboolYNgives Y or N. Leave it out to send the value as stored. Constants ignore it.One of
"phoneDigits","phoneE164","phoneUs","dateIso","dateUs","boolTrueFalse","boolOneZero","boolYN"
headersarray of objectExtra headers to send, such as the buyer's API key. They go alongside Forms-Event, Forms-Delivery and Forms-Signature. Header values are never returned.
max 20 items
Show 2 fieldsHide 2 fields
namestringrequired1–100 chars
valuestringThe header's value. Leave it out to keep the saved value. Header values are never returned.
max 2000 chars
submissionIdstringMap this response of the webhook's form instead of a made-up lead.
latestbooleanMap the form's latest response instead of a made-up lead. When the form has no responses, it falls back to a made-up lead.
Response
sourceenumrequired"sample"when it mapped a made-up lead, which also happens whenlatestfound no response."response"when it mapped a real one.One of
"sample","response"submissionIdstring or nullrequiredThe response it mapped. Null for a made-up lead.
contentTypestringrequiredThe Content-Type the body is sent with.
bodystringrequiredThe body, exactly as it would be posted. Files show their names here, while real deliveries carry links.
pairsarray of objectrequiredThe keys and values, in order.
Show 2 fieldsHide 2 fields
keystringrequiredvaluestringrequired
headersarray of objectrequiredThe extra headers' names.
Show 1 fieldHide 1 field
namestringrequired
warningsarray of objectrequiredThe spec's entries to check.
Show 3 fieldsHide 3 fields
indexnumberrequiredThe entry's position in
entries.keystringrequiredThe entry's key.
messagestringrequiredWhat to check, in plain words.
questionsarray of objectrequiredThe form's questions. These are what
fieldIdcan name.Show 3 fieldsHide 3 fields
idstringrequiredlabelstringrequiredtypestringrequired
Errors answer with a status and the error shape.