Forms
Update a form
/v1/forms/{formId}Update a form's draft, name or overrides. Each field you send replaces the stored value. The live form changes only when you publish. See Paid checks and AI builds and fixes.
Path parameters
formIdstringrequiredThe form's id.
Body
JSON, with Content-Type: application/json.
namestringThe form's name.
1–200 chars
draftobjectThe whole form, with
stepsin order and thenendings. A visitor walks through the steps. When they leave a step, the step's first matching rule decides where they go. Without one, the first question on the step whose chosen answer has a goto decides; that's an option'sgotoon single choice and dropdown questions, orrouteson yes_no. Otherwise the step'snextdecides, and"following"means the next step, or the first ending after the last step. Every path stops at an ending, which submits the response. An ending shows a message, redirects, or hands back to the site, and says whether it counts as a lead for ad tracking. To disqualify someone, route them to an ending that doesn't count as a lead. Here the draft is only checked for its shape.POST /v1/forms/{formId}/publishchecks that everything it refers to exists.Show 3 fieldsHide 3 fields
stepsarray of objectrequiredmin 1 item
Show 7 fieldsHide 7 fields
idstringrequiredblocksarray of one of 2requiredShow 2 optionsHide 2 options
Option 1
Option 2
rulesarray of objectrequiredShow 2 fieldsHide 2 fields
whenarray of objectrequiredAll must match (AND).
min 1 item
Show 3 fieldsHide 3 fields
fieldIdstringrequiredopenumrequiredOne of
"equals","not_equals","in","not_in","includes","gt","lt","answered"valuestring or number or array of string
gotoone of 2requiredWhere the visitor goes next: { kind: "step", stepId } shows that step; { kind: "ending", endingId } finishes the form at that ending (the response is submitted).
Show 2 optionsHide 2 options
kind: "step"
kind"step"requiredstepIdstringrequired
kind: "ending"
kind"ending"requiredendingIdstringrequired
nextone of 2requiredThe default way on: a step or ending, or { kind: "following" }: the next step in order, or after the last step the first ending.
Show 2 optionsHide 2 options
Option 1
Where the visitor goes next: { kind: "step", stepId } shows that step; { kind: "ending", endingId } finishes the form at that ending (the response is submitted).
kind: "following"
kind"following"required
titlestringdescriptionstringbuttonLabelstring
endingsarray of objectrequiredEvery path stops at one of these. The first is where the last step goes by default.
min 1 item
Show 4 fieldsHide 4 fields
idstringrequiredUnique among endings (its own namespace).
namestringrequiredThe builder's name for it, e.g. "Qualified" or "Not a fit". Reported in responses, webhooks and page events.
min 1 char
actionone of 3requiredShow 3 optionsHide 3 options
kind: "message"
Show a thank-you message (body is Markdown).
kind"message"requiredtitlestringrequiredbodystringrequired
kind: "redirect"
Send the visitor to a URL (no thank-you screen).
kind"redirect"requiredurlstringrequiredappendContactbooleanrequiredAdd first_name, last_name, email and phone to the URL.
kind: "handoff"
Hand back to the site: the form closes and the page gets the forms:submit event, nothing else.
kind"handoff"required
countsAsLeadbooleanrequiredReaching this ending reports a Lead to ad tracking (Meta Pixel + CAPI Lead, GA4 generate_lead). Turn off for disqualifying endings.
settingsobjectrequiredShow 7 fieldsHide 7 fields
progressBarbooleanrequiredpartialCapturebooleanrequiredSave unfinished responses: keeps what visitors entered even if they don't finish, once there's a valid email, phone or Telegram username (stored with status partial). Webhook events: submission.abandoned (left without finishing after giving a valid email, phone or Telegram username: page closed, or 5 minutes with no activity; once per response), submission.completed. Needs the plan feature partialCapture (workspaces.entitlements features): turning it on without it is 403 plan_feature, and a new form on such a plan starts with it false. If the plan later loses the feature, the live form stops saving unfinished responses at once (no resume, no submission.abandoned) and this stays true, applying again after an upgrade.
turnstilebooleanrequiredsubmitLabelstringrequiredmin 1 char
returningVisitorenumWith partialCapture on: what happens when someone with an unfinished response comes back later and finishes. "update" (default): in the same browser (a resume token the server issued with the first save, kept in localStorage on the host site; valid 30 days after the last activity, Safari may clear it after 7 days without a visit), their earlier response is completed (same submission id). "new": the earlier response stays as it was and a new one is saved. The same email or phone never continues or changes a response, since anyone can type it: in another browser it saves a new response whose earlierSubmissionId links to that unfinished one. A completed response is never changed.
One of
"update","new"displayobjectShow 4 fieldsHide 4 fields
viewenumrequiredHow the form opens: "popup" or "fullscreen" for a button or inline field; "widget" is the corner card and goes with onPage "widget". Ignored by onPage "embed", which opens nothing (any value is accepted; a data-forms-open button or Forms.open for the same form still opens in this view).
One of
"popup","widget","fullscreen"sideenumrequiredThe corner the widget docks to. Ignored by the other views.
One of
"right","left"onPageenumWhat starts the form on the site. "button": the site's own buttons or links with data-forms-open. "inline" (Field and Button): the first question on the page with a button beside it (an element with data-forms-inline). "embed" (Full form): the whole form in the page, inside an element with data-forms-embed, at that element's width; every step, the progress bar, Back, a texted-code step and the ending stay in that element, and nothing opens over the page (so view and buttonLabel don't apply; the form uses its own Continue and submit labels). "widget" (Corner widget): a floating button in a bottom corner, shown as the page loads (an element with data-forms-widget on the page), that opens the form in a card in that corner. Left out: "widget" when view is "widget", else "button".
One of
"button","inline","embed","widget"buttonLabelstringThe button's text: the corner widget's floating button and the inline field's button ("Get started" when left out or blank). A site's own data-forms-open button keeps its own text; data-forms-button on an inline element overrides this. Ignored by onPage "embed".
max 40 chars
hideBadgebooleantrue: the live form leaves out the "Powered by ayeform" badge under it (default false: shown). Needs the plan feature hideBadge (workspaces.entitlements features): turning it on without it is 403 plan_feature. If the plan later loses the feature, the live form shows the badge again at once and this stays true, applying again after an upgrade. Like every setting, it goes live on publish.
themeOverridesobjectTheme values that override the brand theme for this form.
Show 13 fieldsHide 13 fields
accentstringaccentTextstringbackgroundstringsurfacestringtextstringmutedstringborderstringradiusnumber0–48
buttonRadiusnumber0–48
fontstringheadingFontstringmax 500 chars
backdropstringfontStylesheetstringmax 2000 chars · uri
trackingOverridesobjectWhether this form fires the brand's Meta and GA4 tracking, and its own Jornaya campaign key. Setting a campaign key needs the plan's
leadIdfeature, or it answers403 plan_feature.Show 3 fieldsHide 3 fields
metabooleanrequiredWhether this form fires the brand's Meta Lead, in the browser and through the Conversions API.
ga4booleanrequiredWhether this form fires the brand's GA4
generate_leadevent.jornayaCampaignKeystringThis form's own Jornaya campaign key. Leave it out to use the brand's. It applies while the brand has Jornaya on. A page loads one campaign script, so with two forms on a page the first one's key is used.
Response
idstringrequiredThe form's id.
brandIdstringrequiredThe brand the form belongs to.
workspaceIdstringrequiredThe workspace the form belongs to.
namestringrequiredThe form's name.
statusenumrequireddraftuntil it's first published, thenpublishedwhile it's live.unpublishedonce it's taken offline; its versions are kept.One of
"draft","published","unpublished"publishedVersionnumber or nullrequiredThe number of the live version. Null if the form was never published.
publishedAtnumber or nullrequiredWhen the latest version was published, in milliseconds since the epoch. Null if never.
hasUnpublishedChangesbooleanrequiredWhether the draft or theme overrides changed since the form was last published.
changedAtnumber or nullrequiredWhen the draft or theme overrides last changed, in milliseconds since the epoch. Null if they were never edited.
partialCapturebooleanrequiredWhether the draft has "Save unfinished responses" on. The webhook event for people who left (
submission.abandoned) needs it, and the plan featurepartialCapturetoo.stepCountintegerrequiredHow many steps the draft has.
-9007199254740991–9007199254740991
blockCountintegerrequiredHow many questions and other blocks the draft has, across all steps.
-9007199254740991–9007199254740991
createdAtnumberrequiredWhen the form was created, in milliseconds since the epoch.
updatedAtnumberrequiredWhen anything about the form last changed, in milliseconds since the epoch.
draftobjectrequiredThe whole form as it is now, unpublished edits included. It holds
stepsin order, thenendings, andsettings, in the same shape asdraftinPATCH /v1/forms/{formId}.themeOverridesobjectrequiredTheme values that override the brand theme for this form.
Show 13 fieldsHide 13 fields
accentstringaccentTextstringbackgroundstringsurfacestringtextstringmutedstringborderstringradiusnumber0–48
buttonRadiusnumber0–48
fontstringheadingFontstringmax 500 chars
backdropstringfontStylesheetstringmax 2000 chars · uri
trackingOverridesobjectrequiredWhether this form fires the brand's Meta and GA4 tracking, and its own Jornaya campaign key.
Show 3 fieldsHide 3 fields
metabooleanrequiredWhether this form fires the brand's Meta Lead, in the browser and through the Conversions API.
ga4booleanrequiredWhether this form fires the brand's GA4
generate_leadevent.jornayaCampaignKeystringThis form's own Jornaya campaign key. Leave it out to use the brand's. It applies while the brand has Jornaya on. A page loads one campaign script, so with two forms on a page the first one's key is used.
picturesarray of objectrequiredPictures AI is making in the background for image choice options after an AI build or fix. If a picture can't be made, or its option was removed or got a picture in the meantime, it drops off this list and the option stays as it is. You can add a picture yourself with
POST /v1/forms/{formId}/images. Publishing while a picture is stillmakingfails like a missing picture would, with a message that it's still coming.Show 4 fieldsHide 4 fields
blockIdstringrequiredThe id of the image choice question.
valuestringrequiredThe
valueof the option the picture is for.statusenumrequiredmakingwhile AI makes the picture.addedonce it's on the option asimageIdin the draft.One of
"making","added"imageIdstring or nullrequiredThe picture's id once it's added. Null while it's being made.
Errors answer with a status and the error shape.