forms

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-forms"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/3a095c68-d07c-4776-8a75-070cf1437150/social-card.svg?v=3e7ae33eec8b" alt="forms" width="600" height="315"></a>
PATCHhttps://hermeticor.com/v1/forms/{id}

Parameters

idstringpathrequired

Request body

application/json
namestring
definitionobject
Show child parameters
captchaobject
Show child parameters
providerstringrequired
turnstile | hcaptcha | recaptcha | friendlycaptcha
siteKeystringrequired
actionsActionsItem3[]
= []
redirectsobject
Show child parameters
alreadySubscribedstring
errorstring
pendingstring
confirmedstring
progressivestring
off | hide | prefill = off
kioskboolean
= false
themeobject
Show child parameters
primarystring
= #1f6feb
backgroundstring
= #ffffff
textstring
= #111111
fontstring
system | serif | mono = system
radiusinteger
= 8
buttonStylestring
solid | outline = solid
logoUrlstring
teaserobject
Show child parameters
textstringrequired
sidestring
left | right | bottom | top_left | top_right | bottom_left | bottom_right = right
showstring
instead | after_close | before_trigger = instead
countdownobject
Show child parameters
tostringrequired
labelstring
expiredTextstring
spinobject
Show child parameters
segmentsSegmentsItem[]required
barobject
Show child parameters
positionstring
top | bottom = bottom
textstring
stepsStepsItem5[]required
Show child parameters
titlestring
fieldsFieldsItem[]required
submitLabelstring
optionalboolean
saveEachStepboolean
successSuccessVariant | object | SuccessVariant2 | SuccessVariant3
= {"type":"message","text":"Thanks!"}
doubleOptInobject
Show child parameters
connectionIdstringrequired
subjectstring
= Please confirm your subscription
ttlHoursinteger
= 72
bodystring
templateIdstring
topicIdstring
tagsstring[]
= []
listIdsstring[]
= []
progressiveLimitinteger
submissionLimitobject
Show child parameters
maxintegerrequired
messagestring
= This form is no longer accepting responses.
maxPerIpPerDayinteger
maxPerVisitorPerDayinteger
localestring
minFillMsinteger
= 1500
welcomeEmailobject
Show child parameters
connectionIdstringrequired
subjectstringrequired
textstringrequired
alreadySubscribedEmailobject
Show child parameters
connectionIdstringrequired
subjectstringrequired
textstringrequired
blockFreeEmailboolean
= false
submitLabelstring
failureTextstring
targetingobject
Show child parameters
urlIncludestring[]
urlExcludestring[]
delaySecondsnumber
scrollPercentnumber
exitIntentboolean
mobileBackExitboolean
inactivitySecondsnumber
devicestring
all | desktop | mobile
visitorstring
all | new | returning
minPageViewsinteger
frequencyDaysnumber
audienceobject
Show child parameters
modestring
show | hide = show
listIdsstring[]
= []
segmentIdsstring[]
= []
hideKnownSubscribersboolean
countriesstring[]
countriesExcludestring[]
utmobject
Show child parameters
sourcestring
mediumstring
campaignstring
referrerIncludestring[]
cartobject
Show child parameters
minValuenumber
minItemsinteger
emptyboolean
productPagestring
only | never
adIdstring
{
  "name": "string",
  "definition": {
    "captcha": {
      "provider": "turnstile",
      "siteKey": "string"
    },
    "actions": [],
    "redirects": {
      "alreadySubscribed": "string",
      "error": "string",
      "pending": "string",
      "confirmed": "string"
    },
    "progressive": "off",
    "kiosk": false,
    "theme": {
      "primary": "#1f6feb",
      "background": "#ffffff",
      "text": "#111111",
      "font": "system",
      "radius": 8,
      "buttonStyle": "solid",
      "logoUrl": "string"
    },
    "teaser": {
      "text": "string",
      "side": "right",
      "show": "instead"
    },
    "countdown": {
      "to": "2024-01-01T00:00:00Z",
      "label": "",
      "expiredText": ""
    },
    "spin": {
      "segments": [
        {
          "label": "string",
          "weight": 0,
          "poolId": "string"
        }
      ]
    },
    "bar": {
      "position": "bottom",
      "text": ""
    },
    "steps": [
      {
        "title": "string",
        "fields": [
          {
            "type": "email",
            "key": "string",
            "label": "",
            "required": false,
            "when": [
              {
                "field": "string",
                "op": "eq",
                "value": ""
              }
            ],
            "placeholder": "string",
            "helpText": "string",
            "className": "string",
            "saveTo": "string",
            "attributes": {},
            "pattern": "string",
            "validationMessage": "string",
            "requiredMessage": "string",
            "minLength": 0,
            "maxLength": 0,
            "always": true,
            "readOnly": true,
            "group": "string",
            "groupCollapsed": true
          }
        ],
        "submitLabel": "string",
        "optional": true
      }
    ],
    "saveEachStep": true,
    "success": {
      "type": "message",
      "text": "Thanks!"
    },
    "doubleOptIn": {
      "connectionId": "string",
      "subject": "Please confirm your subscription",
      "ttlHours": 72,
      "body": "string",
      "templateId": "string"
    },
    "topicId": "string",
    "tags": [],
    "listIds": [],
    "progressiveLimit": 0,
    "submissionLimit": {
      "max": 0,
      "message": "This form is no longer accepting responses."
    },
    "maxPerIpPerDay": 0,
    "maxPerVisitorPerDay": 0,
    "locale": "string",
    "minFillMs": 1500,
    "welcomeEmail": {
      "connectionId": "string",
      "subject": "string",
      "text": "string"
    },
    "alreadySubscribedEmail": {
      "connectionId": "string",
      "subject": "string",
      "text": "string"
    },
    "blockFreeEmail": false,
    "submitLabel": "string",
    "failureText": "string"
  },
  "targeting": {
    "urlInclude": [
      "string"
    ],
    "urlExclude": [
      "string"
    ],
    "delaySeconds": 0,
    "scrollPercent": 0,
    "exitIntent": true,
    "mobileBackExit": true,
    "inactivitySeconds": 0,
    "device": "all",
    "visitor": "all",
    "minPageViews": 0,
    "frequencyDays": 0,
    "audience": {
      "mode": "show",
      "listIds": [],
      "segmentIds": []
    },
    "hideKnownSubscribers": true,
    "countries": [
      "string"
    ],
    "countriesExclude": [
      "string"
    ],
    "utm": {
      "source": "string",
      "medium": "string",
      "campaign": "string"
    },
    "referrerInclude": [
      "string"
    ],
    "cart": {
      "minValue": 0,
      "minItems": 0,
      "empty": true
    },
    "productPage": "only"
  },
  "adId": "string"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/forms/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","definition":{"captcha":{"provider":"turnstile","siteKey":"string"},"actions":[],"redirects":{"alreadySubscribed":"string","error":"string","pending":"string","confirmed":"string"},"progressive":"off","kiosk":false,"theme":{"primary":"#1f6feb","background":"#ffffff","text":"#111111","font":"system","radius":8,"buttonStyle":"solid","logoUrl":"string"},"teaser":{"text":"string","side":"right","show":"instead"},"countdown":{"to":"2024-01-01T00:00:00Z","label":"","expiredText":""},"spin":{"segments":[{"label":"string","weight":0,"poolId":"string"}]},"bar":{"position":"bottom","text":""},"steps":[{"title":"string","fields":[{"type":"email","key":"string","label":"","required":false,"when":[{"field":"string","op":"eq","value":""}],"placeholder":"string","helpText":"string","className":"string","saveTo":"string","attributes":{},"pattern":"string","validationMessage":"string","requiredMessage":"string","minLength":0,"maxLength":0,"always":true,"readOnly":true,"group":"string","groupCollapsed":true}],"submitLabel":"string","optional":true}],"saveEachStep":true,"success":{"type":"message","text":"Thanks!"},"doubleOptIn":{"connectionId":"string","subject":"Please confirm your subscription","ttlHours":72,"body":"string","templateId":"string"},"topicId":"string","tags":[],"listIds":[],"progressiveLimit":0,"submissionLimit":{"max":0,"message":"This form is no longer accepting responses."},"maxPerIpPerDay":0,"maxPerVisitorPerDay":0,"locale":"string","minFillMs":1500,"welcomeEmail":{"connectionId":"string","subject":"string","text":"string"},"alreadySubscribedEmail":{"connectionId":"string","subject":"string","text":"string"},"blockFreeEmail":false,"submitLabel":"string","failureText":"string"},"targeting":{"urlInclude":["string"],"urlExclude":["string"],"delaySeconds":0,"scrollPercent":0,"exitIntent":true,"mobileBackExit":true,"inactivitySeconds":0,"device":"all","visitor":"all","minPageViews":0,"frequencyDays":0,"audience":{"mode":"show","listIds":[],"segmentIds":[]},"hideKnownSubscribers":true,"countries":["string"],"countriesExclude":["string"],"utm":{"source":"string","medium":"string","campaign":"string"},"referrerInclude":["string"],"cart":{"minValue":0,"minItems":0,"empty":true},"productPage":"only"},"adId":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "name": "string",
  "kind": "embed",
  "status": "draft"
}
Schema
idstringrequired
namestringrequired
kindstringrequired
embed | popup | flyout | full_page | preference_center | bar
statusstringrequired
draft | published | archived
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

POSThttps://hermeticor.com/v1/forms/{id}/publish

Parameters

idstringpathrequired

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/forms/{id}/publish" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string"
}
Schema
idstringrequired
4XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

5XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

POSThttps://hermeticor.com/v1/forms/{id}/ab

Parameters

idstringpathrequired

Request body

application/json
namestring
variantsobject[]required
Show child parameters
formIdstringrequired
weightintegerrequired
{
  "name": "string",
  "variants": [
    {
      "formId": "string",
      "weight": 0
    }
  ]
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/forms/{id}/ab" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","variants":[{"formId":"string","weight":0}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response

Same as 200 · POST /v1/forms/{id}/publish

4XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

5XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

GEThttps://hermeticor.com/v1/forms/{id}/ab-report

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/forms/{id}/ab-report" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
{}
4XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

5XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

POSThttps://hermeticor.com/v1/forms/{id}/ab-promote

Parameters

idstringpathrequired

Request body

application/json
winnerFormIdstringrequired
{
  "winnerFormId": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/forms/{id}/ab-promote" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"winnerFormId":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · POST /v1/forms/{id}/publish

4XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

5XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

POSThttps://hermeticor.com/v1/forms/{id}/unpublish

Parameters

idstringpathrequired

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/forms/{id}/unpublish" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · PATCH /v1/forms/{id}

4XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

5XX Default Response

Same as 4XX · PATCH /v1/forms/{id}

Updated