Update a formMenu

Update a form

PATCH/v1/forms/{id}

Requires an API key with the forms:write scope. About keys and scopes

Works with integration, agent and partner keys.

Safe to retry: a repeat sets the same values again. About idempotency

Changes a form's fields, consent text or success behaviour. Existing submissions are not revisited. Publishing is its own call, POST /v1/forms/{id}/publish. An agent key edits drafts only: it cannot change a published form (403 AGENT_KEY_REFUSED), since a live form signs people up into its list and topics at once. A person unpublishes it before an agent edits it.

Path parameters

idstringrequired

The form's id.

uuid

Header parameters

Kirora-Workspacestringoptional

Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

pattern ^[A-Za-z0-9._:-]{1,128}$

Request body

namestringoptional

1–255 characters

headingstring | nulloptional

What visitors see above the fields; null clears it.

1–200 characters

introstring | nulloptional

A line or two under the heading; null clears it.

1–1,000 characters

slugstring | nulloptional

The readable part of the form's link (forms.kirora.io/f/acme-newsletter), unique across every workspace; null clears it. A new slug frees the old one, which then stops working; the link with publicId always works, so use that one on print and QR codes.

pattern ^a-z0-9$

shareobject | nulloptional

How the form's link previews in chat and social apps. Unset parts fall back to the heading and intro; null clears it.

3 child attributes
titlestringoptional

1–200 characters

descriptionstringoptional

1–500 characters

imageUrlstringoptional

An https image, such as one from the media library; 1200x630 shows best, and WhatsApp skips images over 300 KB.

uri · up to 2,048 characters

acceptingSubmissionsbooleanoptional

false closes the form by hand, whatever its closing time and limit.

closesAtstring | nulloptional

When the form closes; null for never.

date-time

maxSubmissionsinteger | nulloptional

The form closes once it has taken this many submissions (honeypot catches aside); null for no limit.

min > 0 · max 10000000

closedMessagestring | nulloptional

What a closed form shows; null shows the default wording.

1–1,000 characters

locationstringoptional

Where the form sits on your site, a label you choose (website-footer, checkout-page). Recorded on each submission, as properties.location on its contact.form_submitted event and on the form.submitted webhook, which is how a segment or journey uses it.

1–80 characters

listIdstring | nulloptional

The list every submitter is added to; null clears it, which only a draft may.

uuid

fieldsFormFieldInput[]optional

The fields, top to bottom. One must be a required email field.

at least 1 item · at most 20 items

6 child attributes
keystringrequired

Where the response goes: email, firstName, lastName, phone, attributes.<name>, dates.<name> (a named date that date-triggered journeys read), lists or topics. Each type accepts only some keys.

pattern ^(email|firstName|lastName|phone|lists|topics|attributes\.[\p{L}\p{N}\p{M}_-]{1,64}|dates\.[A-Za-z]… · up to 80 characters

typestringrequired

The input the visitor sees.

one of email, text, textarea, select, checkbox, date, phone

labelstringrequired

The text shown beside the field.

1–120 characters

placeholderstringoptional

Hint text shown inside the empty field.

up to 160 characters

requiredbooleanoptional

Whether the visitor must fill it in.

default false

optionsobject[]optional

Required for select and checkbox, refused for other types. For the lists key each value is a list id, for topics a topic id; the label is what the visitor sees beside its box.

at least 1 item · at most 50 items

2 child attributes
valuestringrequired

What is stored when chosen.

1–100 characters

labelstringrequired

What the visitor sees.

1–120 characters

hiddenFieldsmap<string, object>optional

Values saved on each submitter with no field shown: fixed, or taken from the link.

at most 50 keys · keys: pattern ^[\p{L}\p{N}\p{M}_.-]{1,64}$

One of 2 shapes
With value
2 child attributes
source"fixed"required
valuestringrequired

Saved as it is on every submitter.

up to 1,000 characters

With param
2 child attributes
source"link"required
paramstringrequired

The link parameter it takes its value from, such as utm_campaign; left unset when the link has none.

pattern ^[A-Za-z0-9_.-]{1,64}$

allowedOriginsstring[]optional

Site origins (scheme and host, no path) the embed may load from.

at most 20 items

doubleOptInbooleanoptional

Ask submitters to confirm by email before they are subscribed.

notifyUserIdsstring[]optional

Users of this workspace to tell about each submission, in the bell and by email (each can turn the email off). Each must be a user here.

at most 20 items

themeFormThemeInputoptional
12 child attributes
modestringoptional

Light or dark defaults for every colour left unset; light when unset.

one of light, dark

accentColorstringoptional

Colour of the button and focus outlines, as #RRGGBB.

pattern ^#[0-9a-fA-F]{6}$

backgroundColorstring | nulloptional

The page and form background, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

textColorstring | nulloptional

Headings, labels and text, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

buttonColorstring | nulloptional

The button's fill; unset, the accent colour, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

buttonTextColorstring | nulloptional

The button's text, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

fontFamilystringoptional

The font's id: a generic style (system, sans, serif, mono) or a named font the forms host serves itself. A font emails also offer has the same id there (EmailFont).

one of system, sans, serif, mono, inter, roboto, open-sans, lato, montserrat, poppins, source-sans-3, nunito, raleway, work-sans, dm-sans, manrope, ibm-plex-sans, noto-sans, rubik, karla, merriweather, lora, playfair-display, libre-baskerville, source-serif-4, eb-garamond, ibm-plex-mono, jetbrains-mono

borderRadiusintegeroptional

Corner rounding of inputs and the button, in px, where inputs.borderRadius or button.borderRadius does not set its own.

min 0 · max 24

buttonLabelstringoptional

Text on the submit button.

1–40 characters

inputsobjectoptional

How fields look; each part optional.

9 child attributes
widthstringoptional

fit (unset): a short answer's field is 320px and a long one fills the form; full: every field fills the form; fixed: every field widthPx wide at most.

one of fit, full, fixed

widthPxintegeroptional

With width fixed: the width, in px.

min 200 · max 720

heightintegeroptional

In px.

min 28 · max 64

backgroundColorstring | nulloptional

The field background, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

placeholderColorstring | nulloptional

Placeholder text, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

borderColorstring | nulloptional

The field border, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

borderWidthintegeroptional

In px.

min 0 · max 4

borderRadiusintegeroptional

In px; unset, the top-level borderRadius.

min 0 · max 32

spacingintegeroptional

The gap below each field, in px.

min 0 · max 48

buttonobjectoptional

How the submit button looks; each part optional.

5 child attributes
widthstringoptional

Fit its label, or the form width.

one of auto, full

heightintegeroptional

In px.

min 28 · max 64

alignstringoptional

one of start, center, end

fontSizeintegeroptional

In px.

min 12 · max 24

borderRadiusintegeroptional

In px; unset, the top-level borderRadius.

min 0 · max 32

layoutobjectoptional
2 child attributes
pageWidthintegeroptional

The form's widest, in px.

min 360 · max 960

baseFontSizeintegeroptional

Body text size, in px.

min 12 · max 20

displayobjectoptional
One of 2 shapes
Inline
1 child attribute
mode"inline"required
Popup
7 child attributes
mode"popup"required
delayDurationOrZeroInputoptional

How long after the page loads it opens, at most 10 minutes. Defaults to 5 seconds.

2 child attributes
valueintegerrequired

min 0

unitstringrequired

one of seconds, minutes, hours, days

scrollPercentintegeroptional

Opens once the visitor has scrolled this far down the page.

min 1 · max 100

exitIntentbooleanoptional

Opens when the visitor moves to leave the page (desktop only).

urlMatchobjectoptional

Limits which pages the popup opens on.

2 child attributes
containsstring[]optional

Show only on pages whose URL contains one of these.

at most 20 items

excludesstring[]optional

Never show on pages whose URL contains one of these.

at most 20 items

hideForDurationOrZeroInputoptional

How long it stays away once closed, at most 365 days. Defaults to 7 days.

2 child attributes
valueintegerrequired

min 0

unitstringrequired

one of seconds, minutes, hours, days

hideAfterSubmitbooleanoptional

Whether it stays away after a signup. Defaults to true.

captchaobject | nulloptional

CAPTCHA for submissions: { mode: "kirora" } (the default on a new form), { mode: "own", siteKey, secretKey } for your Cloudflare Turnstile widget, or null for none.

One of 2 shapes
KiroraCaptchaInput
1 child attribute
mode"kirora"required
OwnCaptchaInput
3 child attributes
mode"own"required
siteKeystringrequired

The widget's public site key.

1–200 characters

secretKeystringoptional

The widget's secret key. Write-only: omit it to keep the stored one.

1–200 characters

consentobjectoptional

The consent box every submitter must tick.

2 child attributes
requiredtruerequired

Always true: the visitor must tick the consent box.

labelstringrequired

The consent text shown beside the box.

1–500 characters

successobjectoptional

What happens after a submission.

One of 2 shapes
Show a message
2 child attributes
type"message"required
messagestringrequired

Shown in place of the form.

1–1,000 characters

Redirect
2 child attributes
type"redirect"required
redirectUrlstringrequired

An http(s) address the visitor is sent to.

uri · up to 2,048 characters

Returns

Returns 200 OK with a Form in data. It can also return 409 Conflict, 413 Payload Too Large or 415 Unsupported Media Type; see the statuses below. Otherwise returns an error; Errors lists every code and which to retry.

  • 200 OKThe updated form.
  • 409 ConflictThe request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.
  • 413 Payload Too LargeThe body is larger than this operation accepts (PAYLOAD_TOO_LARGE).
  • 415 Unsupported Media TypeThe body is not JSON, or not the upload the operation takes (UNSUPPORTED_MEDIA_TYPE).
idstringrequired

uuid

publicIdstringrequired

The id the public embed and hosted page use.

pattern ^[a-z0-9]{24}$

slugstring | nullrequired

The readable part of the form's link; null uses publicId alone.

namestringrequired
headingstring | nullrequired

What visitors see above the fields; null shows none.

introstring | nullrequired

A line or two under the heading; null shows none.

locationstringrequired

Where the form sits on your site, a label you choose (website-footer, checkout-page). Recorded on each submission, as properties.location on its contact.form_submitted event and on the form.submitted webhook, which is how a segment or journey uses it.

urlstringrequired

The hosted form's link, by its slug when it has one, else its publicId. It serves once the form is published.

uri

statusstringrequired

Whether the form accepts submissions: published once POST /v1/forms/{id}/publish puts it live, draft until then or after unpublishing.

one of draft, published

listIdstring | nullrequired

The list every submitter is added to.

uuid

fieldsobject[]required

The fields, top to bottom.

6 child attributes
keystringrequired

Where the response goes, such as email or attributes.plan.

typestringrequired

The input the visitor sees.

one of email, text, textarea, select, checkbox, date, phone

labelstringrequired

The text shown beside the field.

placeholderstringoptional

Hint text shown inside the empty field.

requiredbooleanrequired

Whether the visitor must fill it in.

optionsobject[]optional

The choices of a select or checkbox field.

2 child attributes
valuestringrequired
labelstringrequired
hiddenFieldsmap<string, object>required

Values saved on each submitter with no field shown: fixed, or taken from the link.

at most 50 keys · keys: pattern ^[\p{L}\p{N}\p{M}_.-]{1,64}$

One of 2 shapes
With value
2 child attributes
source"fixed"required
valuestringrequired

Saved as it is on every submitter.

up to 1,000 characters

With param
2 child attributes
source"link"required
paramstringrequired

The link parameter it takes its value from, such as utm_campaign; left unset when the link has none.

pattern ^[A-Za-z0-9_.-]{1,64}$

shareobject | nullrequired

How the form's link previews, as set; null falls back entirely.

3 child attributes
titlestringoptional
descriptionstringoptional
imageUrlstringoptional

uri

acceptingSubmissionsbooleanrequired

false: closed by hand, whatever its closing time and limit.

closesAtstring | nullrequired

When the form closes, if ever.

date-time

maxSubmissionsinteger | nullrequired

The submissions it closes at, if any.

closedMessagestring | nullrequired

What a closed form shows; null shows the default wording.

submissionCountintegerrequired

Submissions taken so far (honeypot catches aside), counted for the limit.

min 0

allowedOriginsstring[]required

Site origins the embed may load from.

refusedOriginsobject[]required

Origins an embed was refused from lately, newest first, not counting any since added to allowedOrigins; add one there to approve it.

2 child attributes
originstringrequired

The origin that was refused.

lastRefusedAtstringrequired

When it was last refused.

date-time

doubleOptInbooleanrequired

Whether submitters must confirm by email before they are subscribed.

notifyUserIdsstring[]required

Users of this workspace told about each submission.

themeFormThemerequired
12 child attributes
modestringoptional

Light or dark defaults for every colour left unset; light when unset.

one of light, dark

accentColorstringoptional

Colour of the button and focus outlines, as #RRGGBB.

pattern ^#[0-9a-fA-F]{6}$

backgroundColorstring | nulloptional

The page and form background, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

textColorstring | nulloptional

Headings, labels and text, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

buttonColorstring | nulloptional

The button's fill; unset, the accent colour, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

buttonTextColorstring | nulloptional

The button's text, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

fontFamilystringoptional

The font's id: a generic style (system, sans, serif, mono) or a named font the forms host serves itself. A font emails also offer has the same id there (EmailFont).

one of system, sans, serif, mono, inter, roboto, open-sans, lato, montserrat, poppins, source-sans-3, nunito, raleway, work-sans, dm-sans, manrope, ibm-plex-sans, noto-sans, rubik, karla, merriweather, lora, playfair-display, libre-baskerville, source-serif-4, eb-garamond, ibm-plex-mono, jetbrains-mono

borderRadiusintegeroptional

Corner rounding of inputs and the button, in px, where inputs.borderRadius or button.borderRadius does not set its own.

min 0 · max 24

buttonLabelstringoptional

Text on the submit button.

1–40 characters

inputsobjectoptional

How fields look; each part optional.

9 child attributes
widthstringoptional

fit (unset): a short answer's field is 320px and a long one fills the form; full: every field fills the form; fixed: every field widthPx wide at most.

one of fit, full, fixed

widthPxintegeroptional

With width fixed: the width, in px.

min 200 · max 720

heightintegeroptional

In px.

min 28 · max 64

backgroundColorstring | nulloptional

The field background, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

placeholderColorstring | nulloptional

Placeholder text, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

borderColorstring | nulloptional

The field border, as #RRGGBB; unset or null for the mode's default.

pattern ^#[0-9a-fA-F]{6}$

borderWidthintegeroptional

In px.

min 0 · max 4

borderRadiusintegeroptional

In px; unset, the top-level borderRadius.

min 0 · max 32

spacingintegeroptional

The gap below each field, in px.

min 0 · max 48

buttonobjectoptional

How the submit button looks; each part optional.

5 child attributes
widthstringoptional

Fit its label, or the form width.

one of auto, full

heightintegeroptional

In px.

min 28 · max 64

alignstringoptional

one of start, center, end

fontSizeintegeroptional

In px.

min 12 · max 24

borderRadiusintegeroptional

In px; unset, the top-level borderRadius.

min 0 · max 32

layoutobjectoptional
2 child attributes
pageWidthintegeroptional

The form's widest, in px.

min 360 · max 960

baseFontSizeintegeroptional

Body text size, in px.

min 12 · max 20

displayobjectrequired
One of 2 shapes
Inline
1 child attribute
mode"inline"required
Popup
7 child attributes
mode"popup"required
delayDurationOrZerooptional

How long after the page loads it opens, at most 10 minutes. Defaults to 5 seconds.

2 child attributes
valueintegerrequired

min 0

unitstringrequired

one of seconds, minutes, hours, days

scrollPercentintegeroptional

Opens once the visitor has scrolled this far down the page.

min 1 · max 100

exitIntentbooleanoptional

Opens when the visitor moves to leave the page (desktop only).

urlMatchobjectoptional

Limits which pages the popup opens on.

2 child attributes
containsstring[]optional

Show only on pages whose URL contains one of these.

at most 20 items

excludesstring[]optional

Never show on pages whose URL contains one of these.

at most 20 items

hideForDurationOrZerooptional

How long it stays away once closed, at most 365 days. Defaults to 7 days.

2 child attributes
valueintegerrequired

min 0

unitstringrequired

one of seconds, minutes, hours, days

hideAfterSubmitbooleanoptional

Whether it stays away after a signup. Defaults to true.

captchaobject | nullrequired

Where the CAPTCHA comes from; null while it is off. Secrets never show.

One of 2 shapes
KiroraCaptchaSetting
1 child attribute
mode"kirora"required
OwnCaptchaSetting
2 child attributes
mode"own"required
siteKeystringrequired
consentobjectrequired
2 child attributes
requiredtruerequired

Always true: the visitor must tick the consent box.

labelstringrequired

The consent text shown beside the box.

successobjectrequired
One of 2 shapes
Show a message
2 child attributes
type"message"required
messagestringrequired

Shown in place of the form.

Redirect
2 child attributes
type"redirect"required
redirectUrlstringrequired

An http(s) address the visitor is sent to.

uri

archivedAtstring | nullrequired

When it was archived; an archived form is left out of the list and stops serving.

date-time

createdAtstringrequired

date-time

updatedAtstringrequired

date-time